Jon Dufresne
d144fd960c
Cleanup several Python 2 version_info checks/workarounds
2021-08-20 09:39:31 -06:00
Jon Dufresne
3064f71161
Upgrade vendored distro to use new typing and API
...
The most recent version of distro, 1.6.0, include type information. This
allows pip to remove some workarounds. See upstream commit:
20cb68d6b0
The new version also deprecated the top level function
distro.linux_distribution(). Switch to the new preferred API. See
upstream commit:
f947776f5a
2021-08-15 21:54:40 +02:00
Pradyun Gedam
1df8934a97
Merge pull request #10292 from jdufresne/six-req-install
2021-08-15 13:29:29 +01:00
Stéphane Bidoul
01308b81f2
Merge pull request #9086 from nipunn1313/partial_clone
...
Use git's partial clone feature to speed up pip
2021-08-15 11:28:52 +02:00
Tzu-ping Chung
d8fba8d95a
Merge pull request #9785 from hexagonrecursion/main
2021-08-15 11:25:53 +08:00
Nipunn Koorapati
2d35b8072c
Use git's partial clone feature to speed up pip
...
Clone with --filter=blob:none - as it fetches all
metadata, but only dynamically fetches the blobs as
needed by checkout. Since typically, pip only needs the blobs for
a single revision, this can be a big improvement, especially
when fetching from repositories with a lot of history,
particularly on slower network connections.
Added unit test for the rev-less path. Confirmed that both
of the if/else paths are tested by the unit tests.
2021-08-13 11:44:01 -07:00
Pradyun Gedam
4446d1a719
Merge pull request #10293 from jdufresne/nox
...
Upgrade nox to remove mypy ignores
2021-08-13 10:59:41 +01:00
Pradyun Gedam
8bfb6b527d
Merge pull request #10346 from jdufresne/simplify-prepare
...
Simplify RequirementPreparer._downloaded data structure
2021-08-12 19:37:09 +01:00
Pradyun Gedam
29121dffcd
Merge pull request #10284 from jdufresne/black-vcs
...
Blacken src/pip/_internal/vcs directory
2021-08-12 19:36:36 +01:00
Tzu-ping Chung
0c413d5c62
Remove stale news files
2021-08-12 22:50:58 +08:00
Jon Dufresne
219def7e10
Blacken src/pip/_internal/vcs directory
2021-08-12 07:45:42 -07:00
Jon Dufresne
030b8b4ef6
Upgrade nox to remove mypy ignores
2021-08-12 07:41:30 -07:00
Jon Dufresne
6a6561c2cb
Move many type comments to annotations
...
Use the tool com2ann to automatically convert most type comments to type
annotations. Some type comments continue to exist where any work beyond
the automatic conversion was required (for example, additional
formatting or circular references).
For additional information on the com2ann tool, see:
https://github.com/ilevkivskyi/com2ann
2021-08-10 07:12:32 -07:00
Tzu-ping Chung
c9a07b4a62
Merge pull request #10345 from jdufresne/anystr
...
Replace AnyStr with str in src/pip/_internal/utils/misc.py
2021-08-10 15:38:33 +08:00
Jon Dufresne
61333f5732
Simplify RequirementPreparer._downloaded data structure
...
The original type was `Dict[str, Tuple[str, str]]`. The 2nd element of
the tuple goes unused so map to a single str instead.
2021-08-09 20:05:32 -07:00
Jon Dufresne
973ac6a700
Replace AnyStr with str in src/pip/_internal/utils/misc.py
...
Using AnyStr previously existed as a Python 2 compatibility shim, but it
is no longer necessary.
2021-08-09 16:51:32 -07:00
Jon Dufresne
3991bbca68
Precise type of on_returncode argument to call_subprocess()
...
It can only be one of 3 literal values: "raise", "warn", "ignore".
2021-08-09 16:11:37 -07:00
Jon Dufresne
cf7183d875
Remove six import from src/pip/_internal/req/req_install.py
...
Use Python 3 `raise exc from ...` semantics to replace the use of
six.reraise.
2021-08-08 09:49:00 -07:00
Tzu-ping Chung
d3a78ebbfe
Merge pull request #10261 from jdufresne/found-candidates-six
...
Remove six import in resolution/resolvelib/found_candidates.py
2021-08-07 19:43:21 +08:00
Tzu-ping Chung
9b1bdf583b
Move NameTuple method out of class
...
Suppport for defining methods on a typing.NameTuple was added in 3.6.1,
so this fixes compatibility to 3.6.0.
2021-08-07 10:26:06 +08:00
Pradyun Gedam
69fcae5644
Merge pull request #10264 from aphedges/remove-extra-period
...
Remove extra period in deprecation message
2021-08-06 10:22:44 +01:00
Jon Dufresne
a3628b70de
Remove six import in resolution/resolvelib/found_candidates.py
2021-08-04 17:25:41 -07:00
Alex Hedges
88703bbcee
Remove extra period in deprecation message
2021-08-02 23:58:53 -04:00
Jon Dufresne
21fd93df0e
Remove Python 2 __nonzero__ method definitions
2021-08-02 09:36:50 -07:00
Sylvain
87aee20df2
Fix get_preferred_scheme detection for CPython 3.10 alpha
...
Co-authored-by: Sylvain Desodt <sylvain.desodt@faurecia.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-08-01 17:33:29 +08:00
Tzu-ping Chung
6da081915b
Merge pull request #10129 from maresb/patch-1
2021-07-30 23:39:19 +08:00
Tzu-ping Chung
95fa4e5a2a
Respect the base's constraint for extra-ed package
2021-07-30 20:13:25 +08:00
Ben Mares
1418b5fc04
Improve the phrasing of in-tree-build deprecation
...
Context is explained in the following comment:
<https://github.com/pypa/pip/issues/7555#issuecomment-873612344 >
2021-07-28 23:36:43 -07:00
Ben Mares
dbf994e160
Add canned explanation about feature preview flag
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> and
Pradyun Gedam <pradyunsg@gmail.com>
2021-07-28 00:26:36 -07:00
Tzu-ping Chung
bd41229cdc
Bump for release
2021-07-25 12:21:39 +08:00
Tzu-ping Chung
3d25c5327d
Bump for release
2021-07-25 12:20:53 +08:00
Tzu-ping Chung
33b7f0cd9e
Remove deprecated sdist reinstall feature for 21.2
2021-07-25 10:42:10 +08:00
Guy Tuval
239a307372
Error handling upon uninstall
invalid parameter ( #10171 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-24 21:24:30 +08:00
Illia Volochii
0fb0e3b547
Upgrade vendored requests to 2.26.0 ( #10174 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-23 17:03:53 +08:00
Tzu-ping Chung
c5abdda6fe
Merge pull request #10186 from uranusjr/new-resolver-file-link-localhost
2021-07-23 17:01:28 +08:00
Diego Ramirez
e689113577
Complete the annotations: pip/_internal/utils
( #10159 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-23 17:00:30 +08:00
Tzu-ping Chung
be89ea5d5b
Correctly handle file://localhost/ and file:///
...
According to RFC 8089, an empty host value (i.e. "file:///") should be
taken to be "localhost" (i.e. "file://localhost/"), so we need to
perform some additional normalization to compare such URLs correctly.
2021-07-23 16:13:55 +08:00
Illia Volochii
282005a318
Upgrade requests dependencies ( #10180 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-23 11:29:24 +08:00
Tzu-ping Chung
6af7739596
Merge pull request #10157 from uranusjr/metadata-refactor-2107
...
Replace more pkg_resources usages
2021-07-23 11:04:45 +08:00
Tzu-ping Chung
26778e9436
Merge pull request #10079 from new-resolver-url-equivalent-no-hash
...
Smarter (and looser) link equivalency logic
2021-07-22 15:45:13 +08:00
Harutaka Kawamura
567282724d
Log commit SHA when installing package via Git URI ( #10149 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-22 15:29:16 +08:00
Tzu-ping Chung
f6b184ccaf
Strip slash before Windows drive letter in path ( #10116 )
...
Functions like urllib.parse.urlsplit() parses a file:// URL created from
a non-UNC Windows absolute path with a leading slash in the path
component:
>>> from pathlib import Path
>>> from urllib.parse import urlsplit
>>> path = Path("C:/Users/VssAdministrator")
>>> parsed = urlsplit(path.as_posix())
>>> parsed.path
'/C:/Users/VssAdministrator'
This value unfortunately does not play well with path functions like
open(), so we performs some additional cleanup to strip that leading
slash.
This commit also contains some minor cleanup to unify how Windows is
detected, and how a file:// URL is fetched.
2021-07-22 15:28:43 +08:00
Tzu-ping Chung
2da77e97a2
Smarter (and looser) link equivalency logic
2021-07-22 15:27:10 +08:00
Tzu-ping Chung
6f1c5dc949
Remove pkg_resources usages from 'pip freeze'
2021-07-22 15:25:18 +08:00
Tzu-ping Chung
ead43d674d
Add method to access the raw project name
2021-07-22 15:20:49 +08:00
László Kiss Kollár
76cd70ac42
Upgrade packaging to 21.0 ( #10144 )
2021-07-17 12:19:56 +08:00
Xavier Fernandez
1f1e1d6211
Remove deprecated --find-links option from pip freeze
2021-07-13 22:15:07 +02:00
Diego Ramirez
3b3fde2447
Fix the pip/_internal/distributions
annotations ( #10074 )
2021-07-13 06:29:21 +08:00
Diego Ramirez
ce86dc86d6
Complete type annotations in pip/_internal/index
( #10111 )
2021-07-13 03:28:36 +08:00
Tzu-ping Chung
cccf38067a
Merge pull request #10148 from uranusjr/location-warning-again
...
Re-enable location warning
2021-07-13 03:19:53 +08:00