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

794 commits

Author SHA1 Message Date
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
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
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 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