1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

1124 commits

Author SHA1 Message Date
DiegoCaraballo 3fbbcb8b6f The was_installed_by_pip function is modified 2019-06-15 15:36:21 -03:00
Chris Jerdonek e5a730a89f Improve the error message when reading a bad requirements file. 2019-06-15 10:47:24 -07:00
Pradyun Gedam dada009254
Merge pull request #6601 from pradyunsg/refactor/distributions
Introduce a "distributions" abstraction to hold the build logic
2019-06-15 22:31:51 +05:30
Chris Jerdonek 3f8df24875
Merge pull request #6600 from lkollar/consolidate-path-opt-parsing
Consolidate `--path` parsing into `cmdoptions.py`
2019-06-14 14:56:53 -07:00
Pradyun Gedam ad68a85e45
Add TODOs to improve the names for Distribution's methods 2019-06-14 23:28:22 +05:30
Pradyun Gedam 6f1e2ce5bc
Add docstrings to Distribution classes 2019-06-14 23:28:21 +05:30
Pradyun Gedam d43e31802b
Add distributions sub-package for holding build logic
This moves the DistAbstraction logic into a dedicated 'distributions'
sub-package, with separated modules for the concrete implementations of
various distribution handling logic.
2019-06-14 23:27:42 +05:30
Pradyun Gedam d3987fe114
Sort imports 2019-06-14 23:27:42 +05:30
Chris Jerdonek c0bda1b906 Log when adding a trusted host from a file. 2019-06-14 01:14:36 -07:00
Laszlo Kiss-Kollar 246130c48f Consolidate --path parsing into cmdoptions.py
This option is used both in the `freeze` and `list` commands. The code
to parse the option and validate that it's not used with incompatible
arguments should be done in one place.
2019-06-13 09:37:16 +01:00
Chris Jerdonek d72758394d Fully support --trusted-host inside requirements files. 2019-06-13 01:21:05 -07:00
Laszlo Kiss-Kollar a240a98701 Add --path option to pip list
This makes `pip list` consistent with `pip freeze` which also supports
listing packages in arbitrary file paths.
2019-06-12 16:10:06 +02:00
Chris Jerdonek 4c1ccaec73 Store PackageFinder.trusted_hosts instead of secure_origins. 2019-06-12 02:18:23 -07:00
Chris Jerdonek 93769d0a9c
Merge pull request #6591 from cjerdonek/target-python-class
Add a TargetPython class.
2019-06-11 19:03:13 -07:00
Chris Jerdonek b8d693c71e Add a TargetPython class. 2019-06-11 18:19:20 -07:00
Chris Jerdonek 5776ddd058
Merge pull request #6418 from gzpan123/master
FIX #6413 pip install <url> allow directory traversal
2019-06-11 01:11:42 -07:00
gzpan123 a4c735b14a FIX #6413 pip install <url> allow directory traversal 2019-06-11 00:22:29 -07:00
Chris Jerdonek 4bb225d486 Allow dotted version strings for --python-version. 2019-06-08 19:59:09 -07:00
Chris Jerdonek 8dbf88dff7 Update pip-download to respect --python-version. 2019-06-06 13:20:29 -07:00
Chris Jerdonek e6b1070e14 Add normalize_version_info() with tests. 2019-06-06 13:20:26 -07:00
Chris Jerdonek 99228e503a Import path_to_url() from utils/misc.py instead of download.py. 2019-06-03 02:31:40 -07:00
Chris Jerdonek ce46f8524e
Merge pull request #6545 from cjerdonek/vcs-imports
Remove from pip/_internal/__init__.py the vcs module imports
2019-06-03 02:10:43 -07:00
Chris Jerdonek 5c89643d3d Remove importing from vcs in pip/_internal/__init__.py.
This also renames the current vcs/__init__.py to vcs/versioncontrol.py.
2019-06-03 01:18:36 -07:00
Pradyun Gedam 83d813c01e
Updated comment-matching regex to be Jython-compatible (#5959) 2019-05-29 23:03:27 -04:00
Chris Jerdonek 798d814629 Change PackageFinder to use Tuple[int, ...] instead of List[str] for --python-version. 2019-05-28 03:05:14 -07:00
Chris Jerdonek fada348b00 Make all Option callbacks start with the same prefix. 2019-05-28 02:32:18 -07:00
László Kiss Kollár 929fefdbae Add --path to pip freeze to support --target installations (#6450)
* Add support for --path in pip freeze
2019-05-28 02:28:18 -07:00
Pradyun Gedam 24e9e4aa37
Display install instructions for pre-releases (#5921) 2019-05-27 16:38:17 -04:00
Pradyun Gedam a1ad4b7c41
Improve deprecation warnings (#6549) 2019-05-27 16:33:45 -04:00
Pradyun Gedam 2ff13e4340
Use a loop instead of multiple similar conditionals 2019-05-27 13:57:38 -04:00
Pradyun Gedam bf728499be
🎨 2019-05-27 13:57:37 -04:00
Chris Jerdonek 2d450936c6 Move path_to_url() from download.py to misc.py. 2019-05-26 22:51:00 -07:00
Chris Jerdonek 30855ff9b7
Merge pull request #6542 from cjerdonek/issue-5082-missing-metadata-error
Improve error message if METADATA or PKG-INFO metadata is None
2019-05-26 16:17:22 -07:00
Chris Jerdonek 6178f9681b
Merge pull request #6540 from cjerdonek/issue-6121-incompatible-wheel-message
Improve the debug log message when installing an incompatible wheel
2019-05-26 14:10:09 -07:00
Chris Jerdonek cd5bd2cd52 Improve error message if METADATA or PKG-INFO metadata is None. 2019-05-26 12:35:07 -07:00
Chris Jerdonek a9a9cfd98c Improve the debug log message when installing an incompatible wheel. 2019-05-25 23:59:32 -07:00
Pradyun Gedam 2e77720446
Mention gone_in version in deprecation messages 2019-05-25 21:52:15 -04:00
Chris Jerdonek f44344f122
Merge pull request #6515 from johnthagen/svn-interactive-final
Properly support interactive Subversion client
2019-05-25 14:47:51 -07:00
Chris Jerdonek 98a77a9317
Merge pull request #6538 from cjerdonek/issue-6513-freeze-requirement-error
Include more details in a pip freeze warning message
2019-05-25 11:17:23 -07:00
Pradyun Gedam c197b11816
Move Resolver to a legacy_resolve module (#6535) 2019-05-25 13:36:29 -04:00
Pradyun Gedam 287aa4b7bf
Merge pull request #6008 from jaraco/bugfix/4106-distutils-option-error-target-prefix-conflict
Prevent distutils option error target prefix conflict
2019-05-25 13:29:49 -04:00
Pradyun Gedam b05c66722e
Move Resolver to a legacy_resolve module 2019-05-25 12:35:31 -04:00
Pradyun Gedam 77da032c91
Make _check_dist_requires_python() parallel _check_link_requires_python(), and add more complete tests (#6528) 2019-05-25 12:09:25 -04:00
Chris Jerdonek 7c42f0ed8e Include more details in a pip freeze warning message. 2019-05-25 00:31:44 -07:00
Chris Jerdonek f82ea77217 Simplify the _check_dist_requires_python() call site. 2019-05-24 21:33:12 -07:00
Chris Jerdonek ba53909375
Merge pull request #6522 from theacodes/add-pip-ci
Check for explicit PIP_IS_CI environment variable to report automated installs to Warehouse.
2019-05-24 13:57:09 -07:00
Thea Flowers 03ad0421ee Check for explicit `PIP_IS_CI` environment variable to report automated installs to Warehouse. 2019-05-24 13:01:04 -07:00
Chris Jerdonek cc70cf5ba3 Move check_dist_requires_python() to resolve.py. 2019-05-23 22:58:10 -07:00
johnthagen eb3db3b032 Add type hints to methods to improve documentation and type safety 2019-05-23 07:38:22 -04:00
Chris Jerdonek eeb74aeb29
Merge pull request #6518 from cjerdonek/issue-6371-ignore-requires-python
Fix #6371: make pip install respect --ignore-requires-python
2019-05-22 22:38:20 -07:00
Chris Jerdonek ad2b07898d Fix pip-install to respect --ignore-requires-python. 2019-05-22 21:34:41 -07:00
Andreas Lutro 9eccfae10d redact passwords in output when using --find-links (#6489) 2019-05-22 23:33:41 +02:00
johnthagen fcbefc01e1
Merge branch 'master' into svn-interactive-final 2019-05-22 14:49:29 -04:00
Chris Jerdonek c34191ff75
Merge pull request #6519 from cjerdonek/vcs-subversion-fetch-new
Make VersionControl.fetch_new() an instance method
2019-05-22 11:30:08 -07:00
Chris Jerdonek 7e142bae64 Refactor out _check_link_requires_python(), and test. 2019-05-22 09:07:14 -07:00
Chris Jerdonek b554c15b91
Merge pull request #6514 from cjerdonek/candidate-evaluator-pre-releases
Add allow_all_prereleases to CandidateEvaluator's constructor
2019-05-22 08:54:59 -07:00
johnthagen a708240d2b Document why get_remote_call_options is not needed for svn info invocation 2019-05-22 07:05:35 -04:00
Chris Jerdonek 68c105c29d Make VersionControl.fetch_new() an instance method. 2019-05-22 00:11:07 -07:00
Mike d62bef4362 Document caveats for UNC paths in uninstall and add .pth unit tests 2019-05-21 11:14:11 -07:00
johnthagen 00efe18954 Remove unnecessary get_remote_call_options() invocation for local svn info call 2019-05-21 07:13:53 -04:00
johnthagen b47bc7ad5c Properly support interactive Subversion features based on Subversion client version 2019-05-20 07:37:20 -04:00
Chris Jerdonek 07ce2ab2b7
Merge pull request #6439 from johnthagen/svn-interactive
Subversion interactive support
2019-05-19 15:27:36 -07:00
Chris Jerdonek 4f26eba472 Add CandidateEvaluator.make_found_candidates(). 2019-05-19 13:18:43 -07:00
Chris Jerdonek 7995e2d5a9 Move get_install_candidate() to PackageFinder. 2019-05-19 11:03:47 -07:00
Chris Jerdonek 33959b02d3 Use try-else inside _evaluate_link(). 2019-05-19 09:59:06 -07:00
Chris Jerdonek 1875a8e3f6
Merge pull request #6511 from cjerdonek/package-finder-create-function
Simplify PackageFinder's constructor by accepting a CandidateEvaluator
2019-05-19 09:39:32 -07:00
Chris Jerdonek 10ae49d932 Add py_version_info to CandidateEvaluator's constructor. 2019-05-18 22:40:08 +02:00
johnthagen 1c07d87c9c Move Subversion.__init__() and call_vcs_version(). 2019-05-18 13:34:50 -07:00
johnthagen a83a78ef4d Add Subversion interactive support. 2019-05-18 13:34:45 -07:00
Chris Jerdonek cad71a7117 Add PackageFinder.create(), and simplify PackageFinder(). 2019-05-17 11:55:21 -07:00
Xavier Fernandez 6387867288
Merge pull request #6491 from DavidBord/fix-5963-fail-elegantly-incorrect-config
fix-5963: fail elegantly
2019-05-13 22:04:01 +02:00
Chris Jerdonek bc8857d6ff
Merge pull request #6484 from cjerdonek/simplify-evaluate-link
Simplify CandidateEvaluator.evaluate_link()
2019-05-12 16:13:36 -04:00
Chris Jerdonek c54e50f50b Simplify CandidateEvaluator.evaluate_link(). 2019-05-12 15:21:14 -04:00
Chris Jerdonek b4e1e48372
Merge pull request #6492 from cjerdonek/vcs-registry
Store VersionControl objects instead of classes in the VCS registry
2019-05-12 12:03:16 -04:00
Donald Stufft 3596ad5cd8
Merge pull request #5952 from zooba/issue-5948
Fixes #5948 Adds keyring support
2019-05-10 08:13:55 -04:00
Chris Jerdonek 3cfa8a76c7 Store instances in the VcsSupport registry instead of classes. 2019-05-09 22:35:26 -04:00
Chris Jerdonek 6553dd0aa5 Remove unused cls argument from VcsSupport.unregister(). 2019-05-09 20:12:52 -04:00
David Bordeynik 8f330a5959 fix-5963: fail elegantly on missing name or section in config set / unset 2019-05-09 20:33:30 +03:00
Chris Jerdonek 6217335a41 Remove unnecessary slices. 2019-05-08 19:34:55 -04:00
Chris Jerdonek 3a2a28aeb7 Fix typo. 2019-05-08 19:34:43 -04:00
Chris Jerdonek 9ab91a19ff
Merge pull request #6389 from cjerdonek/issue-5518-global-option-vcs-install
Respect --global-option and --install-option for VCS installs.
2019-05-08 19:22:07 -04:00
Chris Jerdonek 5be4e1481e Remove utils/packaging.py's dependence on the current environment. 2019-05-07 21:51:39 -04:00
Chris Jerdonek 919ee314fc
Merge pull request #6425 from cjerdonek/move-link-package-versions
Move _link_package_versions() to CandidateEvaluator
2019-05-07 21:42:50 -04:00
Steve Dower 49b9298a44 Improve import error handling
Fix --no-index usage
Fix missing type annotation type
2019-05-07 17:01:41 -04:00
Chris Jerdonek 0573d7f81f
Merge pull request #6408 from cjerdonek/vcs-remove-url-attribute
Remove url as an attribute of VersionControl
2019-05-07 15:17:56 -04:00
Chris Jerdonek 10c68e674b Rename _link_package_versions() to evaluate_link(). 2019-05-07 11:54:28 -04:00
Chris Jerdonek 651d6fe705 Move _link_package_versions() to CandidateEvaluator. 2019-05-07 11:46:08 -04:00
Chris Jerdonek 58ee598b03 Refine return type of _package_versions() and find_all_candidates(). 2019-05-07 11:46:08 -04:00
Pradyun Gedam 422d989056
Merge pull request #5931 from xrmx/fix5059
Remove last use of SafeConfigParser
2019-05-07 11:37:37 -04:00
Steve Dower c63ee61027 Issue #5948: Enable keyring support
This requires keyring and any backends to be installed separately.
Once discovered, it will be used to retrieve credentials by index URL
and netloc before prompting. If the user is prompted and the
credentials work, they will (optionally) be saved to keyring against
the netloc of the requested URL.
2019-05-07 09:55:02 -04:00
Chris Jerdonek a163ae5af1
Fix some formatting issues in the pip-install docs (#6432) 2019-05-07 09:13:56 -04:00
Pradyun Gedam 2386806ab4
Cleanup outdated warning check code (#6467) 2019-05-07 08:17:51 -04:00
Chris Jerdonek 0ea639d644 Remove url as an instance attribute of the VersionControl class. 2019-05-06 22:59:18 -04:00
Chris Jerdonek 4cf8f4240a Refactor away Git.__init__(). 2019-05-06 22:59:18 -04:00
Masaki cf1bab093d Refactor local_version_is_older conditional
Exit conditional sooner if not local_version_is_older for faster execution

Delete whitespace
2019-05-06 16:34:50 -04:00
Masaki 8738ef401e Refactor outdated for readability
Moved local and remote pip version check conditional to a variable
2019-05-06 15:23:07 -04:00
Chris Jerdonek dc1217713e Fix freeze log debug message. 2019-05-06 14:55:16 -04:00
Donald Stufft bc1f9d92dd Bump version for release 2019-05-06 10:08:24 -04:00
Chris Jerdonek 285a23fb8f Revert "Refactor out read_pyproject_toml() and resolve_pyproject_toml()."
This reverts commit f66c1f7639.
2019-04-26 20:21:04 -07:00
Chris Jerdonek fb2533a945 Revert "Error out if installing a pyproject.toml-style (PEP 517) project in editable mode."
This reverts commit cc2d299f76.
2019-04-26 20:19:24 -07:00
Chris Jerdonek 24688ee8e8 Revert "Require --no-use-pep517 if using editable mode with pyproject.toml."
This reverts commit 71f506e71e.
2019-04-26 20:19:05 -07:00
Chris Jerdonek 0453f79b9e Revert "Allow --no-use-pep517 to be used with editable mode in more cases."
This reverts commit f069769948.
2019-04-26 20:18:43 -07:00
Chris Jerdonek 1f27d9659e Revert "Fix "build_system value" to "build-system table" in pyproject.toml messages."
This reverts commit ee80bf98ff.
2019-04-26 20:18:27 -07:00
Chris Jerdonek 8d0b73fc5b
Merge pull request #6445 from cjerdonek/tweak-pyproject-messages
Fix "build_system value" to "build-system table" in pyproject.toml messages
2019-04-25 15:43:39 -07:00
Chris Jerdonek 60d3f11961
Merge pull request #6440 from nicolasbock/index_with_git
Protect `@` as safe character when cleaning URLs
2019-04-25 13:28:48 -07:00
Chris Jerdonek ee80bf98ff Fix "build_system value" to "build-system table" in pyproject.toml messages. 2019-04-25 13:12:27 -07:00
Nicolas Bock 265b4e7e65
Protect @ as safe character when cleaning URLs
Remote URLs that contain a link to a git repository and a tag
reference will have the `@` character converted into `%40`. This is
incorrect.

Fixes: #6437

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2019-04-25 06:26:04 -06:00
Chris Jerdonek f069769948 Allow --no-use-pep517 to be used with editable mode in more cases. 2019-04-25 01:42:11 -07:00
Donald Stufft dbf0feba8f Reopen for development 2019-04-23 22:35:01 -04:00
Donald Stufft 307410c24b Bump to 19.1 2019-04-23 22:28:44 -04:00
Donald Stufft 5db1344c23 Upgrade vendored dependencies 2019-04-23 17:54:36 -04:00
Donald Stufft 627eeecd15
Merge pull request #6319 from pquentin/progress1.5
Update progress to 1.5
2019-04-23 17:06:42 -04:00
Chris Jerdonek dddd28b8de
Add CandidateEvaluator class to encapsulate sorting. (#6424) 2019-04-22 03:40:35 -07:00
Tzu-ping Chung 1ef8857b4d Finder found candidates cleanup (#6415) 2019-04-20 01:22:46 -07:00
Andy Freeland bb14ff42b0 Fix NameError when handling InvalidRequirement in install_req_from_req_string (#6419)
Previously, an InvalidRequirement would raise a NameError while trying
to raise an InstallationError because `req` was not defined.

Discovered while working on #6402.
2019-04-19 02:37:33 -07:00
johnthagen c8e9caa8a7 Add Subversion.get_vcs_version method (#6390)
Add Subversion.get_vcs_version method to return the version of the currently installed Subversion client.
2019-04-17 00:34:19 -07:00
Tzu-ping Chung 14cb4f4fb6 Isolate, reuse PackageFinder best candidate logic (#5971)
Split out how PackageFinder finds the best candidate, and reuse it in the
self version check, to avoid the latter duplicating (and incorrectly
implementing) the same logic.
2019-04-16 16:46:25 -07:00
Chris Jerdonek 32c11ee2c3 Respect --global-option and --install-option for VCS installs. 2019-04-08 02:03:17 -07:00
Nicolas Bock 913757cb53
Do not clean base_url
When the `base_url` is a `[]` protected IPv6 address, the
`_clean_link()` function converts `[` to `%5B` and `]` to `%5D`, which
renders the `base_url` invalid. For example:

```
	Starting new HTTP connection (1): fd00:0:0:236:💯8181
	http://fd00:0:0:236:💯8181 "GET /os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt HTTP/1.1" 200 None
	Setting setuptools==40.6.3 (from -c http://[fd00:0:0:236::100]:8181/os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt (line 204)) extras to: ()
	Looking in indexes: http://[fd00:0:0:236::100]:8181/simple
	Collecting setuptools==40.6.3 (from -c http://[fd00:0:0:236::100]:8181/os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt (line 204))
	  1 location(s) to search for versions of setuptools:
	  * http://[fd00:0:0:236::100]:8181/simple/setuptools/
	  Getting page http://[fd00:0:0:236::100]:8181/simple/setuptools/
	  http://fd00:0:0:236:💯8181 "GET /simple/setuptools/ HTTP/1.1" 200 376
	  Analyzing links from page http://[fd00:0:0:236::100]:8181/simple/setuptools/
	    _package_versions: link = http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00:0:0:
	236::100]:8181/simple/setuptools/)
	    _link_package_versions: link = http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00
	:0:0:236::100]:8181/simple/setuptools/)
	    Found link http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00:0:0:236::100]:8181/
	simple/setuptools/), version: 40.6.3
	  Using version 40.6.3 (newest of versions: 40.6.3)
        Could not install packages due to an EnvironmentError.
        InvalidURL: Failed to parse: %5bfd00:0:0:236::100%5d:8181
```

This change uses the vendored `urllib` library to split the host part
off of the url before URL quoting only the path part.

Fixes: #6285
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2019-04-07 05:57:03 -06:00
Chris Jerdonek 78744e8071
Merge pull request #6370 from cjerdonek/editable-and-pep-517-optional
Fix editable-mode logic when pyproject.toml present
2019-04-06 15:31:53 -07:00
Chris Jerdonek 20e42271f2
Merge pull request #6367 from cboylan/vendored-exceptions
Consistently catch exceptions in index.py
2019-04-03 14:39:29 -07:00
Chris Jerdonek 68bc0e0c53
Merge pull request #6339 from cjerdonek/vcs-subprocess-logging
Fix #1219: Prevent subprocess stdout and stderr from cluttering pip's stdout.
2019-04-03 14:36:44 -07:00
Clark Boylan 63ccc286a0 Consistently catch exceptions in index.py
In index.py we were catching requests.exceptions.RetryError and
requests.exceptions.SSLError but then also caught requests.HTTPError.
For consistency catch all of these requests exceptions using the
requests.exceptions path.
2019-04-03 11:49:07 -07:00
Quentin Pradet 015ceb1377
Remove helpers.py from progress vendor
Noticed by https://github.com/eli-schwartz
2019-04-01 17:50:49 +04:00
Quentin Pradet c86460d1a4
Update progress to 1.5 2019-04-01 17:50:49 +04:00
Chih-Hsuan Yen e4936da2e1
Fix handling of requests exceptions when dependencies are debundled 2019-04-01 14:56:08 +08:00
Chris Jerdonek 71f506e71e Require --no-use-pep517 if using editable mode with pyproject.toml. 2019-03-31 05:40:08 -07:00
Caleb Martinez ac9010e87c Allow adding a custom string to pip's User-Agent via an environment variable (#5550) 2019-03-31 02:37:02 -07:00
Chris Jerdonek f47d012970 Refactor install_backend_dependencies() out from prep_for_dist(). 2019-03-31 01:11:30 -07:00
Chris Jerdonek e5353f27cd
Merge pull request #6356 from cjerdonek/vcs-class-methods-2
Make VersionControl methods into class methods (part 2)
2019-03-25 16:35:26 -07:00
Chris Jerdonek e0505bb152 Prevent subprocess stdout and stderr from cluttering pip's stdout. 2019-03-25 00:21:20 -07:00
Chris Jerdonek 55f7a712aa
Merge pull request #6331 from cjerdonek/issue-6314-editable-with-pep517
Show a nice error if editable mode is attempted with a pyproject.toml source tree
2019-03-23 17:32:22 -07:00
Chris Jerdonek 1bb21fd3ff
Merge pull request #6093 from mkurnikov/req-types-finished
Finish types for pip._internal.req, set disallow_untyped_defs flag
2019-03-23 02:16:35 -07:00
Chris Jerdonek 352ac8144e Make compare_urls() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek a829362e6a Make fetch_new() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 36909437f3 Make update_submodules() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 7a4e8b34da Make get_current_branch() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 977d3f6f8c Make is_commit_id_equal() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 31d6a4f975 Make resolve_revision() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 79b64739a9 Make get_revision_sha() a class method. 2019-03-22 00:04:50 -07:00
Alex Loosley d245434c02 Fix #5889: AttributeError: 'NoneType' object has no attribute 'netloc' (#6336) 2019-03-20 16:59:24 +01:00
Chris Jerdonek 22e4be1410 Address review comment: make two methods static. 2019-03-17 00:27:09 -07:00
Chris Jerdonek 4c5d712057 Change RevOptions to accept a VersionControl subclass. 2019-03-16 01:46:32 -07:00
Chris Jerdonek 12e41eef8b Make VersionControl.get_base_rev_args() a class method. 2019-03-16 01:21:30 -07:00
Chris Jerdonek e1e94530ad Make VersionControl.make_rev_args() a class method. 2019-03-16 01:15:48 -07:00
Chris Jerdonek 3ba489864b Make VersionControl.get_url_rev_and_auth() a class method. 2019-03-16 01:13:25 -07:00
Chris Jerdonek 67b384b8c7 Make VersionControl.get_netloc_and_auth() a class method. 2019-03-16 01:04:44 -07:00
Chih-Hsuan Yen 8ef3283fcf Ensure all pip._vendor.* modules are mapped to debundled correspondences (#6113)
With the original `vendored()` implementation and such an initialization sequence:

```
vendored("packaging")
vendored("packaging.version")
```

In `sys.modules`, `pip._vendor.packaging` is correctly connected to the debundled `packaging`, while `pip._vendor.packaging.version` is not, as the latter is `__import__`ed from the existing `pip._vendor.packaging` module. That results in the same issue as https://github.com/pypa/pip/issues/5429 - `pip._vendor.packaging.version.Version` and `packaging.version.Version` cannot be compared.

This patch attempts to fix this issue by skipping `__import__` from the vendored name. This is safe because `vendored()` is called only when `DEBUNDLED = True`, and vendored libraries are already deleted as per [debundling instructions](https://github.com/pypa/pip/blob/master/src/pip/_vendor/README.rst#debundling).
2019-03-15 10:26:35 +05:30
Chris Jerdonek 7f6edbd252
Merge pull request #6130 from cjerdonek/move-get-src-requirement-to-base-class
Move get_src_requirement() to the VersionControl base class
2019-03-14 15:22:54 -07:00
Chris Jerdonek cc2d299f76 Error out if installing a pyproject.toml-style (PEP 517) project in editable mode. 2019-03-14 05:49:39 -07:00
Pi Delport 5f3c56e188 Fix some typos 2019-03-12 21:54:18 +01:00
Chris Jerdonek f66c1f7639 Refactor out read_pyproject_toml() and resolve_pyproject_toml(). 2019-03-12 03:32:38 -07:00
Chris Jerdonek 1599d65d36
Merge pull request #6312 from cjerdonek/subprocess-tests-and-spinner-fixes
Test call_subprocess more thoroughly; fix spinner edge cases
2019-03-11 23:19:58 -07:00
Steve Dower 293c91ee8a Configuration files may now also be stored under sys.prefix (#6268)
* Rename kinds.VENV to kinds.SITE and site_config_files to global_config_files
* Add tests for config file options
* Deprecate --venv in pip config
2019-03-07 11:14:56 +05:30
Juanjo Bazán 61e5970fa4 Fix typo (extra parenthesis). (#6316) 2019-03-06 03:43:20 -08:00
Chris Jerdonek fe793722b1 Fix a couple spinner edge cases. 2019-03-03 11:05:39 -08:00
Miro Hrončok d48475d008 Fix utils.encoding.auto_decode() LookupError with invalid encodings
utils.encoding.auto_decode() was broken when decoding Big Endian BOM
byte-strings on Little Endian or vice versa.

The TestEncoding.test_auto_decode_utf_16_le test was failing on Big Endian
systems, such as Fedora's s390x builders. A similar test, but with BE BOM
test_auto_decode_utf_16_be was added in order to reproduce this on a Little
Endian system (which is much easier to come by).

A regression test was added to check that all listed encodings in
utils.encoding.BOMS are valid.

Fixes https://github.com/pypa/pip/issues/6054
2019-03-01 20:16:18 +01:00
Chris Jerdonek 632896d70b Move make_vcs_requirement_url() to vcs/__init__.py. 2019-03-01 11:06:24 -08:00
Chris Jerdonek f4f447ccb8 Move get_src_requirement() before the __init__ method. 2019-03-01 11:01:25 -08:00
Chris Jerdonek fdbfde03e1 Implement get_src_requirement() in the VersionControl base class. 2019-03-01 11:01:25 -08:00
Daniele Esposti 729404d4c5 Redact the password from the extra index URL in log messages (#6295) 2019-03-01 04:21:45 -08:00
Chris Jerdonek 1fdd7e26c5
Merge pull request #6139 from jelmer/bazaar-export-perf
Bazaar: Export directly from the remote branch.
2019-03-01 01:36:02 -08:00
Chris Jerdonek a2ed253788 Whether to build wheels is no longer affected by --no-cache-dir. 2019-02-27 20:38:09 -08:00
Chris Jerdonek 8e531be255 Refactor out build_wheels(), and test. 2019-02-27 20:36:25 -08:00
Paul Moore 9921442d1f Reject --build-options for PEP 517 builds 2019-02-27 17:40:52 +00:00
Chris Jerdonek 8d78ff0fce Prefix warning and error log messages. 2019-02-27 03:22:26 -08:00
Maxim Kurnikov 8c70363262 add missing trailing commas on multiline imports 2019-02-25 14:24:55 +03:00
Chris Jerdonek 821247dc36
Merge pull request #6273 from cjerdonek/issue-5499-detect-ci-for-user-agent
Fix #5499: Include in pip's User-Agent whether it looks like pip is in CI
2019-02-24 14:24:55 -08:00
Chris Jerdonek b88239918b
Merge pull request #6290 from cjerdonek/add-format-command
Add format_command_args().
2019-02-24 13:23:51 -08:00
Jon Dufresne 5779f55bd4 Replace six.next() with builtin next()
The builtin has been available since Python 2.6. Makes the code slightly
more forward compatible by removing an unnecessary use of six.
2019-02-24 22:04:16 +01:00
Xavier Fernandez c286c55d51 Tweak tests & url_to_path after review 2019-02-24 21:40:25 +01:00
Benoit Pierre 61baf5fe80 improve handling of file URIs 2019-02-24 21:40:25 +01:00
Pradyun Gedam 54c0538583
Merge pull request #6294 from atugushev/patch-1
Use link.is_artifact property instead of scheme checking
2019-02-24 22:43:06 +05:30
Pradyun Gedam d4217f0cc3
Merge pull request #6129 from asottile/dead
delete some dead code
2019-02-24 22:08:16 +05:30
Maxim Kurnikov 30ce730e70 add type annotations to StashedUninstallPathSet 2019-02-23 17:01:34 +03:00
Maxim Kurnikov 2d3cd4de86 merge latest master 2019-02-23 16:58:54 +03:00
Albert Tugushev f0f31998d5 Use is_artifact prop instead of scheme checking 2019-02-23 11:55:37 +03:00
Pradyun Gedam 04f1e70427
Merge pull request #6282 from mkurnikov/update-flake8-to-3.7.6
Update flake8 to 3.7.6
2019-02-22 21:56:28 +05:30
Maxim Kurnikov c4dfdbe265 remove unused imports 2019-02-22 14:18:46 +03:00
Maxim Kurnikov 7977443556 remove unused exc variable 2019-02-22 14:17:49 +03:00
Maxim Kurnikov f77b8ca051 remove #noqa: F401 2019-02-22 14:17:07 +03:00
Chris Jerdonek 87f0539b78 Change format_command_result() to use format_command_args(). 2019-02-22 02:52:06 -08:00
Chris Jerdonek 0f6776388c Change format_command() to use shlex.quote(). 2019-02-22 02:52:06 -08:00
Chris Jerdonek 1d0645e86f Add format_command_args() with tests. 2019-02-22 02:52:02 -08:00
Chris Jerdonek aec72bd0cd Add log divider variable. 2019-02-22 00:14:58 -08:00
Maxim Kurnikov 8fd009850a remove unused # type: ignore 2019-02-22 00:40:57 +03:00
Maxim Kurnikov 4ddfcb9227 rename variable to fix mypy redefinition error 2019-02-22 00:40:29 +03:00
Anthony Sottile 2c53b709cd Remove hidden
last reference removed in 8447f39fe1
2019-02-20 11:51:24 -08:00
Anthony Sottile 1ea2140f32 Remove _copy_dist_from_dir
introduced in 4c405a0ad3 but not referenced
2019-02-20 11:51:23 -08:00
Anthony Sottile ccdbccee95 Remove has_requirements
last reference removed in 893f0b0029
2019-02-20 11:50:59 -08:00
Anthony Sottile f388ccf1c3 Remove read_text_file
last reference removed in 52d87f2e30
2019-02-20 11:50:59 -08:00
Anthony Sottile 54247561ac Remove progress bar types
introduced in 0552ffeeda but never referenced
2019-02-20 11:50:59 -08:00
Pradyun Gedam 88bcb261f7
Merge pull request #6154 from cjerdonek/show-stdout-default
Change call_subprocess()'s show_stdout default from True to False
2019-02-21 01:08:05 +05:30
Pradyun Gedam 149cab1c62
Bump for development 2019-02-20 23:00:03 +05:30
Pradyun Gedam b1d12870b6
Bump version for release 2019-02-20 22:42:54 +05:30
Chris Jerdonek a229f114e6 Address review comments. 2019-02-18 19:29:07 -08:00
Chris Jerdonek 14a6aaabff Include in pip's User-Agent whether it looks like pip is in CI. 2019-02-17 07:16:01 -08:00
Chris Jerdonek ebe2417110 Fix the RECORD filename of installed files appearing in the old RECORD. 2019-02-15 02:33:02 -08:00
Chris Jerdonek d3a1b8536a Improve logging in the case of a failed legacy build. 2019-02-14 13:57:07 -08:00
Chris Jerdonek d2051f14bb Change the default of call_subprocess()'s show_stdout from True to False. 2019-02-12 05:11:51 -08:00