Commit Graph

3131 Commits

Author SHA1 Message Date
Stéphane Bidoul e25b183459
Update pre-commit hooks 2021-01-24 15:25:37 +01:00
Pradyun Gedam 8d042c4487
Merge pull request #9464 from NoahGorny/fix-pip-debug-parse-version
commands: debug: Use packaging.version.parse to compare
2021-01-23 17:38:25 +00:00
Paul Moore b944419af1 Bump for development 2021-01-23 14:42:05 +00:00
Paul Moore 6c09bdd7c0 Bump for release 2021-01-23 14:42:04 +00:00
Paul Moore f03051540c Revert "Bump for release"
This reverts commit 91f43f1fd4.
2021-01-23 14:39:29 +00:00
Paul Moore e01c7d719a Revert "Bump for development"
This reverts commit c1382e9155.
2021-01-23 14:37:51 +00:00
Paul Moore c1382e9155 Bump for development 2021-01-23 13:14:09 +00:00
Paul Moore 91f43f1fd4 Bump for release 2021-01-23 13:14:09 +00:00
Paul Moore d6a21011b3 Remove support for extras after specifier in requirements 2021-01-23 12:06:44 +00:00
Paul Moore 6739f56351 Use our own copy of strtobool, rather than the one from distutils 2021-01-20 15:42:29 +00:00
Stéphane Bidoul 8de9edf401
Merge pull request #9436 from sbidoul/vcs-url-sbi
Remove deprecated support for VCS pseudo URLs
2021-01-19 11:07:17 +01:00
Tzu-ping Chung 6c0e484703 Include both sources in inconsistency error 2021-01-18 19:00:52 +08:00
Stéphane Bidoul 7ee22ba995
Show full list of supported VCS scheme in error message
When an editable requirement is neither a local directory nor
a URL with a supported VCS scheme, we show the full list
of supported VCS schemes in the error message.
2021-01-18 09:11:08 +01:00
Stéphane Bidoul 78b891a6d1
Remove unused VCS schemes
These schemes without + are support in an ad-hoc fashion in
parse_editable_requirement.
2021-01-18 09:11:08 +01:00
Stéphane Bidoul 28bbf898ea
Improve syntax
Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
2021-01-18 09:11:07 +01:00
Stéphane Bidoul b3761f6fab
Remove support for git+git@ pseudo VCS URLs.
Now that we don't need to support git@
pseudo-urls, we can simplify the test for
valid VCS URLs based on link.is_vcs, which
is turns is based on the URL scheme.

This also means we fail earlier if a git@ pseudo
URL is used.

Since VCS requirements are not validated to be URLs
in Requirement constructors, we can simplify update_editable.
2021-01-18 09:11:07 +01:00
Stéphane Bidoul 5385d8a6cd
Construct valid backends list for error message. 2021-01-18 09:08:24 +01:00
Pradyun Gedam 3af9093a73
Merge pull request #9274 from sbidoul/pip-wheel-must-keep-clone-sbi 2021-01-17 15:30:57 +00:00
Noah Gorny c09bc1432b commands: debug: Use packaging.version.parse to compare 2021-01-16 19:23:02 +02:00
Paul Moore a79758c13f Add leading zero in certifi version 2021-01-16 11:19:06 +00:00
Paul Moore 7deba59c33 Upgrade msgpack and requests 2021-01-16 10:36:11 +00:00
Paul Moore d5b461d28f Vendoring changes for 21.0 2021-01-16 10:29:55 +00:00
Stéphane Bidoul aa089883a8
Merge pull request #9438 from sbidoul/legacy-cache-cleanup
Remove support for legacy cache entries
2021-01-13 16:03:43 +01:00
Xavier Fernandez 363132659b
Merge pull request #9367 from hugovk/rm-2-default_time_format
Use Formatter.default_time_format after dropping PY2
2021-01-13 10:32:38 +01:00
Pradyun Gedam c1251a85f7
Merge pull request #9432 from uranusjr/new-resolver-dedup-on-backtracking
Avoid downloading multiple candidates of a same version
2021-01-11 19:31:03 +00:00
Stéphane Bidoul 750b8a32fe
Remove support for legacy cache entries 2021-01-10 11:50:13 +01:00
Pradyun Gedam 9b83654de8
Merge pull request #9331 from sbidoul/7969-revert-sbi
Revert #7969 and fix VCS stdout/stderr capture
2021-01-09 21:09:04 +00:00
Stéphane Bidoul e157cf56b2
Merge pull request #9418 from sbidoul/freeze-does-not-need-wheel-cache
Remove unused wheel_cache argument in freeze operation
2021-01-09 13:42:53 +01:00
Stéphane Bidoul 5629e09a57
Merge pull request #9423 from sbidoul/8368-no-deadline
Remove deprecation deadline for #8368
2021-01-09 13:42:00 +01:00
Xavier Fernandez b33e791742
Merge pull request #9375 from jdufresne/dict-set-comprehension
Use dict and set comprehension where available
2021-01-07 15:04:05 +01:00
Tzu-ping Chung 79cbe6b93f Avoid downloading candidates of a same version
Since 41a30089de, Candidate objects prepare their underlying
distribution eagerly on creation, so the error can be caught
deterministically to trigger backtracking.

This however has a negative side-effect. Since dist preparation involves
metadata validation, a remote distribution must be downloaded on
Candidate creation. This means that an sdist will be downloaded,
validated, and discarded (since its version is known to be incompatible)
during backtracking.

This commit moves version deduplication of candidates from indexes to
before the Candidate object is created, to avoid unneeded preparation.

Note that we still need another round of deduplication in FoundCandidates
to remove duplicated candidates when a distribution is already installed.
2021-01-06 17:19:59 +08:00
Pradyun Gedam c7419b2aac
Merge pull request #9320 from uranusjr/wheel-check-valid
Verify built wheel contains valid metadata
2021-01-05 21:47:53 +00:00
Stéphane Bidoul b43062d428
Remove deprecation deadline for 8368 2021-01-03 15:34:05 +01:00
Pradyun Gedam 47493d8227
Merge pull request #9410 from jdufresne/get-similar-commands
Make get_similar_command() return None for no value
2021-01-02 22:29:35 +00:00
Stéphane Bidoul e76eadc9d6
Pass freeze() kwargs directly 2021-01-02 13:46:55 +01:00
Stéphane Bidoul 93a51f1de3
The freeze operation does not need a wheel_cache 2021-01-02 13:43:56 +01:00
Jon Dufresne 004b2cf9a8 Remove unused utility function consume()
Unused since e706af20fe.
2021-01-01 16:07:53 -08:00
Jon Dufresne 014ccec8ca Make get_similar_command() return None for no value
Follows the more conventional pattern of using None, instead of False,
when no value can be returned. This simplifies typing a bit by using
Optional instead of Union[bool, ...].
2021-01-01 11:50:37 -08:00
Stéphane Bidoul 062f0e54d9
Merge pull request #9401 from jdufresne/ne
Remove unnecessary __ne__ definitions
2021-01-01 19:38:09 +01:00
Stéphane Bidoul 35604e5a4c
Merge pull request #9403 from jdufresne/get-revision
Harmonize return type of VersionControl.get_revision in subclasses
2021-01-01 19:36:20 +01:00
Stéphane Bidoul df6ac53382
Merge pull request #9406 from sbidoul/simplify-check_binary_allowed-sbi
Simplify check_binary_allowed
2021-01-01 19:33:13 +01:00
Jon Dufresne ca053fbe88 Handle ._get_svn_url_rev() returning None in .get_remote_url()
The method Subversion._get_svn_url_rev() will sometimes return None for
a remote URL. The calling code should handle this. If it is None, raise
a RemoteNotFoundError as prescribed by the parent class docstring.

Followup to 0b761a164c.
2020-12-31 14:36:58 -08:00
Stéphane Bidoul 06f1eff024
Simplify check_binary_allowed
check_binary_allowed is only used to check
if a wheel needs to be built in 'pip install' mode.
It mixed format control and pep517 mode check.

We change it so it checks allowed formats only,
which leads to better readability of _should_build().
2020-12-31 13:17:44 +01:00
Jon Dufresne c513c5e890 Harmonize return type of VersionControl.get_revision in subclasses
Previously, the Subversion subclass violated the parent's type signature
by returning an int, but it is now coerced to a str to match the
expected signature.
2020-12-30 11:25:29 -08:00
Jon Dufresne a49f1732e9 Remove unnecessary __ne__ definitions
Unnecessary since dropping Python 2 support. In Python 3, `__ne__`
defaults to the opposite of of `__eq__`.

https://docs.python.org/3/reference/datamodel.html#object.__ne__

> For `__ne__()`, by default it delegates to `__eq__()` and inverts the
> result unless it is `NotImplemented`.
2020-12-30 08:23:04 -08:00
Jon Dufresne 5150129f6b Replace compat.expanduser() with os.path.expanduser()
The upstream bug has been fixed and released in all supported Python
version: https://bugs.python.org/issue14768
2020-12-29 08:15:55 -08:00
Pradyun Gedam af5b7fe1f9
Merge pull request #9390 from jdufresne/noqa
Remove unnecessary "noqa" comments
2020-12-29 09:01:17 +00:00
Pradyun Gedam 914b7c2165
Merge pull request #9389 from jdufresne/copy-tree-kwargs
Remove unused class CopytreeKwargs
2020-12-29 08:57:42 +00:00
Jon Dufresne 133e146a88 Remove unused type VersionCandidate
Unused since 6a8956d7a8.
2020-12-28 19:18:20 -08:00
Jon Dufresne b78f71216f Remove unnecessary "noqa" comments 2020-12-28 18:19:09 -08:00