Commit Graph

3020 Commits

Author SHA1 Message Date
Pradyun Gedam be9637f7f5
Merge pull request #9189 from pradyunsg/drop-old-python-support
Drop support for Python 2.7 and Python 3.5
2020-12-20 18:57:41 +00:00
Pradyun Gedam 7281ed9d98
No longer print a deprecation warning on 2.7/3.5
These versions are no longer supported.
2020-12-19 19:55:04 +00:00
Nikita Chepanov f8b03eefe2 Add `--ignore-requires-python` support to pip download 2020-12-17 12:40:01 -05:00
Pradyun Gedam 7165ab8cb9
Revert "Skip candidate not providing valid metadata" 2020-12-15 10:17:20 +00:00
gpiks 6b2ccdd10d Update packaging to version 20.8
To account for Python 3.10, update the packaging version to 20.8.
2020-12-14 14:12:47 -05:00
Tzu-ping Chung d869e0cbfd Merge master 2020-12-12 18:49:14 +08:00
Tzu-ping Chung b2c04877fa Add comments explaining InstallationError handling 2020-12-12 18:47:37 +08:00
Pradyun Gedam 0aee48ff1f
Merge pull request #9265 from uranusjr/new-resolver-cache-installed-candidates
Cache AlreadyInstalledCandidate
2020-12-11 21:03:56 +00:00
Tzu-ping Chung 120105d3e8 Cache AlreadyInstalledCandidate
Since the "Requirement already satisfied" message is printed during
candidate preparation, instantiating the candidate multiple times result
in excessive logging during intensive backtracking. By caching the
already-installed candidates, each package is only prepared, and thus
only logged once.
2020-12-12 02:39:54 +08:00
Tzu-ping Chung d45541c8f3 Skip candidate not providing valid metadata
This is done by catching InstallationError from the underlying
distribution preparation logic. There are three cases to catch:

1. Candidates from indexes. These are simply ignored since we can
   potentially satisfy the requirement with other candidates.
2. Candidates from URLs with a dist name (PEP 508 or #egg=). A new
   UnsatisfiableRequirement class is introduced to represent this; it is
   like an ExplicitRequirement without an underlying candidate. As the
   name suggests, an instance of this can never be satisfied, and will
   cause eventual backtracking.
3. Candidates from URLs without a dist name. This is only possible for
   top-level user requirements, and no recourse is possible for them. So
   we error out eagerly.

The InstallationError raised during distribution preparation is cached
in the factory, like successfully prepared candidates, since we don't
want to repeatedly try to build a candidate if we already know it'd
fail. Plus pip's preparation logic also does not allow packages to be
built multiple times anyway.
2020-12-12 02:23:32 +08:00
Tzu-ping Chung 8bf159f4c7 Intentionally delay resolving setuptools 2020-12-09 12:04:37 +08:00
Pradyun Gedam 643217bc35
Merge pull request #9207 from NoahGorny/fix-redact-url-from-help 2020-12-08 12:56:00 +00:00
Tzu-ping Chung e2fb3e12ab Use the project name to look up constraints
User-specified constraints only contain the project name without extras,
but a constraint a project A would also apply to A's extra variants.
This introduces a new project_name property on Requirement and Candidate
classes for this lookup.
2020-12-08 16:32:24 +08:00
Tzu-ping Chung ffb3d1bc76 Correctly implement yanking logic
Do not return yanked versions from an index, unless the version
range can only be satisfied by yanked candidates.
2020-12-04 23:46:25 +08:00
Noah Gorny 5cfd8a7c3e Handle case of list default values in UpdatingDefaultsHelpFormatter
Happens because we pass a list from --extra-index-url
2020-12-04 15:29:50 +02:00
Tzu-ping Chung 82fe333c09 Also prefer requirements with non-empty specifiers 2020-12-03 20:06:28 +08:00
Tzu-ping Chung 4ad924a66f Resolve direct and pinned requirements first 2020-12-03 17:44:23 +08:00
Stéphane Bidoul 31a2e1a586
Restore --build-dir 2020-12-01 23:22:07 +01:00
Pradyun Gedam 4ba207020e
Bump for development 2020-11-30 11:58:32 +00:00
Pradyun Gedam c31c148a5b
Bump for release 2020-11-30 11:58:32 +00:00
Pradyun Gedam b5304f307f
Merge pull request #9170 from pradyunsg/vendoring/nov-2020-again 2020-11-29 19:17:28 +00:00
Pradyun Gedam b23591f4da
Upgrade resolvelib to 0.5.3 2020-11-28 15:11:52 +00:00
Pradyun Gedam d2671af23d
Upgrade packaging to 20.7 2020-11-28 14:48:58 +00:00
Pradyun Gedam 1133342f30
Always reinstall editables
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-28 13:56:40 +00:00
Pradyun Gedam 9f4c5409d0
🎨 Breakup and move comment
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-28 13:54:39 +00:00
Pradyun Gedam 8b4652efad Merge pull request #9163 from NoahGorny/redact-url-from-help
Redact auth from URL in UpdatingDefaultsHelpFormatter
2020-11-27 09:04:14 +00:00
Noah Gorny 8f821866d6 Redact auth from URL in UpdatingDefaultsHelpFormatter 2020-11-25 21:18:01 +02:00
Pradyun Gedam b2785d8ab9
Drop incorrect line from comment
This was a copy-paste error that I didn't catch earlier.

Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam 5753884715
Don't deprecate reinstalling from .zip files
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam 9add1c1f61
Add deprecation warning when reinstalling sdists
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam cd15a8514e
Factor out is_archive_file
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:07 +00:00
Pradyun Gedam d6e3643fd9
Print a message and don't reinstall wheels
Also, adds a test for source distributions being reinstalled.

Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:04 +00:00
Pradyun Gedam ce46a5e36d
Re-install local candidates unconditionally
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:12:08 +00:00
Pradyun Gedam 84382715f0
Merge pull request #9096 from uranusjr/new-resolver-constrainting-extraed
Constrainting an extra-ed dependency
2020-11-23 10:57:39 +00:00
Pradyun Gedam aa847eaa8a
Merge pull request #9123 from sbidoul/pip-wheel-editable-fix-sbi 2020-11-22 21:32:44 +00:00
Stéphane Bidoul a24d198c15
Do not download editables while preparing requirements
Downloading is done at the end of the download command
just like any other requirement. This is necessary to avoid
archiving editable requirements to a zip file when running
pip wheel.
2020-11-22 21:14:09 +01:00
Jon Dufresne 8662248774 Always close stderr after subprocess completion in call_subprocess()
When running Python with warnings enabled, fixes warnings of the form:

    .../site-packages/pip/_internal/vcs/versioncontrol.py:773: ResourceWarning: unclosed file <_io.BufferedReader name=12>
      return call_subprocess(cmd, cwd,
2020-11-21 07:35:11 -08:00
Tzu-ping Chung 9efafb186f Implement __str__ for debuggability 2020-11-21 22:14:24 +08:00
Tzu-ping Chung d589795834 Allow constraining an explicit requirement 2020-11-21 22:14:24 +08:00
Pradyun Gedam 396afb118e
Merge pull request #9148 from pradyunsg/vendoring/nov-2020 2020-11-20 13:21:43 +00:00
Pradyun Gedam 3697f45ee6
Fix the certifi version in vendor.txt
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-20 12:16:24 +00:00
Pradyun Gedam 74b1db4f64
Upgrade toml to 0.10.2 2020-11-19 18:49:54 +00:00
Pradyun Gedam 0f43e77b7f
Include package name in backtracking messaging
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-19 18:38:30 +00:00
Pradyun Gedam 910b304a97
Upgrade resolvelib to 0.5.2 2020-11-19 18:38:04 +00:00
Pradyun Gedam e76b1ddeaa
Upgrade urllib3 to 1.26.2 2020-11-19 18:38:04 +00:00
Pradyun Gedam b08c4d5f3f
Upgrade certifi to 2020.11.8 2020-11-19 18:38:04 +00:00
Pradyun Gedam 1604ac4737
Upgrade requests to 2.25.0 2020-11-19 18:38:04 +00:00
Pradyun Gedam 1c6a119529
Upgrade pep517 to 0.9.1 2020-11-19 18:38:04 +00:00
Pradyun Gedam ca6095bfb3
Upgrade colorama to 0.4.4 2020-11-19 18:38:04 +00:00
Pradyun Gedam 15871707f6
Merge pull request #9124 from pradyunsg/nicer-error-message-wording
Update message displayed on conflicts post-resolution
2020-11-19 10:15:06 +00:00