Skip to content

Commit 75981ec

Browse files
authored
Merge branch 'main' into type-annotations-internal
2 parents 6d665fd + 0b95378 commit 75981ec

File tree

117 files changed

+1662
-1137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1662
-1137
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
tests:
3131
# Anything that's touching testable stuff
3232
- ".github/workflows/ci.yml"
33-
- "tools/requirements/tests.txt"
3433
- "src/**"
3534
- "tests/**"
3635
if: github.event_name == 'pull_request'

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ repos:
2222
- id: black
2323
exclude: |
2424
(?x)
25-
^src/pip/_internal/commands|
2625
^src/pip/_internal/index|
2726
^src/pip/_internal/models|
2827
^src/pip/_internal/operations|
29-
^src/pip/_internal/req|
3028
^src/pip/_internal/vcs|
3129
^src/pip/_internal/\w+\.py$|
3230
# Tests

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ sphinx:
77
python:
88
version: 3.8
99
install:
10-
- requirements: tools/requirements/docs.txt
10+
- requirements: docs/requirements.txt

AUTHORS.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,16 @@ Brandt Bucher
9898
Brett Randall
9999
Brian Cristante
100100
Brian Rosner
101+
briantracy
101102
BrownTruck
102103
Bruno Oliveira
103104
Bruno Renié
105+
Bruno S
104106
Bstrdsmkr
105107
Buck Golemon
106108
burrows
107109
Bussonnier Matthias
110+
bwoodsend
108111
c22
109112
Caleb Martinez
110113
Calvin Smith
@@ -177,13 +180,16 @@ David Tucker
177180
David Wales
178181
Davidovich
179182
Deepak Sharma
183+
Deepyaman Datta
180184
Denise Yu
181185
derwolfe
182186
Desetude
183187
Devesh Kumar Singh
184188
Diego Caraballo
189+
Diego Ramirez
185190
DiegoCaraballo
186191
Dimitri Merejkowsky
192+
Dirk Stolle
187193
Dmitry Gladkov
188194
Domen Kožar
189195
Dominic Davis-Foster
@@ -245,17 +251,18 @@ Greg Ward
245251
Guilherme Espada
246252
gutsytechster
247253
Guy Rozendorn
254+
Guy Tuval
248255
gzpan123
249256
Hanjun Kim
250257
Hari Charan
251258
Harsh Vardhan
259+
harupy
260+
Harutaka Kawamura
252261
Henry Schreiner
253262
Herbert Pfennig
254263
Hsiaoming Yang
255-
Hugo
256264
Hugo Lopes Tavares
257265
Hugo van Kemenade
258-
hugovk
259266
Hynek Schlawack
260267
Ian Bicking
261268
Ian Cordasco
@@ -265,12 +272,14 @@ Ian Wienand
265272
Igor Kuzmitshov
266273
Igor Sobreira
267274
Ilan Schnell
275+
Illia Volochii
268276
Ilya Baryshev
269277
Inada Naoki
270278
Ionel Cristian Mărieș
271279
Ionel Maries Cristian
272280
Ivan Pozdeev
273281
Jacob Kim
282+
Jacob Walls
274283
jakirkham
275284
Jakub Stasiak
276285
Jakub Vysoky
@@ -295,6 +304,7 @@ Jiashuo Li
295304
Jim Fisher
296305
Jim Garrison
297306
Jivan Amara
307+
Joe Michelini
298308
John Paton
299309
John T. Wodder II
300310
John-Scott Atlakson
@@ -388,6 +398,7 @@ mayeut
388398
mbaluna
389399
mdebi
390400
memoselyk
401+
meowmeowcat
391402
Michael
392403
Michael Aquilina
393404
Michael E. Karpeles
@@ -425,6 +436,7 @@ Noah Gorny
425436
Nowell Strite
426437
NtaleGrey
427438
nvdv
439+
OBITORASU
428440
Ofekmeister
429441
ofrinevo
430442
Oliver Jeeves
@@ -530,6 +542,7 @@ Simon Cross
530542
Simon Pichugin
531543
sinoroc
532544
sinscary
545+
snook92
533546
socketubs
534547
Sorin Sbarnea
535548
Srinivas Nyayapati
@@ -552,6 +565,7 @@ Surbhi Sharma
552565
Sviatoslav Sydorenko
553566
Swat009
554567
Takayuki SHIMIZUKAWA
568+
Taneli Hukkinen
555569
tbeswick
556570
Thijs Triemstra
557571
Thomas Fenzl

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ recursive-include src/pip/_vendor *LICENSE*
1010
recursive-include src/pip/_vendor *COPYING*
1111

1212
include docs/docutils.conf
13+
include docs/requirements.txt
1314

1415
exclude .coveragerc
1516
exclude .mailmap

NEWS.rst

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,127 @@
1+
21.2.2 (2021-07-31)
2+
===================
3+
4+
5+
6+
Bug Fixes
7+
---------
8+
9+
- New resolver: When a package is specified with extras in constraints, and with
10+
extras in non-constraint requirements, the resolver now correctly identifies the
11+
constraint's existence and avoids backtracking. (`#10233 <https://github.com/pypa/pip/issues/10233>`_)
12+
13+
14+
21.2.1 (2021-07-25)
15+
===================
16+
17+
18+
19+
Process
20+
-------
21+
22+
- The source distribution re-installation feature removal has been delayed to 21.3.
23+
24+
25+
21.2 (2021-07-24)
26+
=================
27+
28+
29+
30+
Process
31+
-------
32+
33+
- ``pip freeze``, ``pip list``, and ``pip show`` no longer normalize underscore
34+
(``_``) in distribution names to dash (``-``). This is a side effect of the
35+
migration to ``importlib.metadata``, since the underscore-dash normalization
36+
behavior is non-standard and specific to setuptools. This should not affect
37+
other parts of pip (for example, when feeding the ``pip freeze`` result back
38+
into ``pip install``) since pip internally performs standard PEP 503
39+
normalization independently to setuptools.
40+
41+
Deprecations and Removals
42+
-------------------------
43+
44+
- Git version parsing is now done with regular expression to prepare for the
45+
pending upstream removal of non-PEP-440 version parsing logic. (`#10117 <https://github.com/pypa/pip/issues/10117>`_)
46+
- Re-enable the "Value for ... does not match" location warnings to field a new
47+
round of feedback for the ``distutils``-``sysconfig`` transition. (`#10151 <https://github.com/pypa/pip/issues/10151>`_)
48+
- Remove deprecated ``--find-links`` option in ``pip freeze`` (`#9069 <https://github.com/pypa/pip/issues/9069>`_)
49+
50+
Features
51+
--------
52+
53+
- New resolver: Loosen URL comparison logic when checking for direct URL reference
54+
equivalency. The logic includes the following notable characteristics:
55+
56+
* The authentication part of the URL is explicitly ignored.
57+
* Most of the fragment part, including ``egg=``, is explicitly ignored. Only
58+
``subdirectory=`` and hash values (e.g. ``sha256=``) are kept.
59+
* The query part of the URL is parsed to allow ordering differences. (`#10002 <https://github.com/pypa/pip/issues/10002>`_)
60+
- Support TOML v1.0.0 syntax in ``pyproject.toml``. (`#10034 <https://github.com/pypa/pip/issues/10034>`_)
61+
- Added a warning message for errors caused due to Long Paths being disabled on Windows. (`#10045 <https://github.com/pypa/pip/issues/10045>`_)
62+
- Change the encoding of log file from default text encoding to UTF-8. (`#10071 <https://github.com/pypa/pip/issues/10071>`_)
63+
- Log the resolved commit SHA when installing a package from a Git repository. (`#10149 <https://github.com/pypa/pip/issues/10149>`_)
64+
- Add a warning when passing an invalid requirement to ``pip uninstall``. (`#4958 <https://github.com/pypa/pip/issues/4958>`_)
65+
- Add new subcommand ``pip index`` used to interact with indexes, and implement
66+
``pip index version`` to list available versions of a package. (`#7975 <https://github.com/pypa/pip/issues/7975>`_)
67+
- When pip is asked to uninstall a project without the dist-info/RECORD file
68+
it will no longer traceback with FileNotFoundError,
69+
but it will provide a better error message instead, such as::
70+
71+
ERROR: Cannot uninstall foobar 0.1, RECORD file not found. You might be able to recover from this via: 'pip install --force-reinstall --no-deps foobar==0.1'.
72+
73+
When dist-info/INSTALLER is present and contains some useful information, the info is included in the error message instead::
74+
75+
ERROR: Cannot uninstall foobar 0.1, RECORD file not found. Hint: The package was installed by rpm.
76+
77+
(`#8954 <https://github.com/pypa/pip/issues/8954>`_)
78+
- Add an additional level of verbosity. ``--verbose`` (and the shorthand ``-v``) now
79+
contains significantly less output, and users that need complete full debug-level output
80+
should pass it twice (``--verbose --verbose`` or ``-vv``). (`#9450 <https://github.com/pypa/pip/issues/9450>`_)
81+
- New resolver: The order of dependencies resolution has been tweaked to traverse
82+
the dependency graph in a more breadth-first approach. (`#9455 <https://github.com/pypa/pip/issues/9455>`_)
83+
- Make "yes" the default choice in ``pip uninstall``'s prompt. (`#9686 <https://github.com/pypa/pip/issues/9686>`_)
84+
- Add a special error message when users forget the ``-r`` flag when installing. (`#9915 <https://github.com/pypa/pip/issues/9915>`_)
85+
- New resolver: A distribution's ``Requires-Python`` metadata is now checked
86+
before its Python dependencies. This makes the resolver fail quicker when
87+
there's an interpreter version conflict. (`#9925 <https://github.com/pypa/pip/issues/9925>`_)
88+
- Suppress "not on PATH" warning when ``--prefix`` is given. (`#9931 <https://github.com/pypa/pip/issues/9931>`_)
89+
- Include ``rustc`` version in pip's ``User-Agent``, when the system has ``rustc``. (`#9987 <https://github.com/pypa/pip/issues/9987>`_)
90+
91+
Bug Fixes
92+
---------
93+
94+
- Update vendored six to 1.16.0 and urllib3 to 1.26.5 (`#10043 <https://github.com/pypa/pip/issues/10043>`_)
95+
- Correctly allow PEP 517 projects to be detected without warnings in ``pip freeze``. (`#10080 <https://github.com/pypa/pip/issues/10080>`_)
96+
- Strip leading slash from a ``file://`` URL built from an path with the Windows
97+
drive notation. This fixes bugs where the ``file://`` URL cannot be correctly
98+
used as requirement, constraint, or index URLs on Windows. (`#10115 <https://github.com/pypa/pip/issues/10115>`_)
99+
- New resolver: URL comparison logic now treats ``file://localhost/`` and
100+
``file:///`` as equivalent to conform to RFC 8089. (`#10162 <https://github.com/pypa/pip/issues/10162>`_)
101+
- Prefer credentials from the URL over the previously-obtained credentials from URLs of the same domain, so it is possible to use different credentials on the same index server for different ``--extra-index-url`` options. (`#3931 <https://github.com/pypa/pip/issues/3931>`_)
102+
- Fix extraction of files with utf-8 encoded paths from tars. (`#7667 <https://github.com/pypa/pip/issues/7667>`_)
103+
- Skip distutils configuration parsing on encoding errors. (`#8931 <https://github.com/pypa/pip/issues/8931>`_)
104+
- New resolver: Detect an unnamed requirement is user-specified (by building its
105+
metadata for the project name) so it can be correctly ordered in the resolver. (`#9204 <https://github.com/pypa/pip/issues/9204>`_)
106+
- Fix :ref:`pip freeze` to output packages :ref:`installed from git <vcs support>`
107+
in the correct ``git+protocol://git.example.com/MyProject#egg=MyProject`` format
108+
rather than the old and no longer supported ``git+git@`` format. (`#9822 <https://github.com/pypa/pip/issues/9822>`_)
109+
- Fix warnings about install scheme selection for Python framework builds
110+
distributed by Apple's Command Line Tools. (`#9844 <https://github.com/pypa/pip/issues/9844>`_)
111+
- Relax interpreter detection to quelch a location mismatch warning where PyPy
112+
is deliberately breaking backwards compatibility. (`#9845 <https://github.com/pypa/pip/issues/9845>`_)
113+
114+
Vendored Libraries
115+
------------------
116+
117+
- Upgrade certifi to 2021.05.30.
118+
- Upgrade idna to 3.2.
119+
- Upgrade packaging to 21.0
120+
- Upgrade requests to 2.26.0.
121+
- Upgrade resolvelib to 0.7.1.
122+
- Upgrade urllib3 to 1.26.6.
123+
124+
1125
.. note
2126
3127
You should *NOT* be adding new change log entries to this file, this

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
4444

4545
.. _package installer: https://packaging.python.org/guides/tool-recommendations/
4646
.. _Python Package Index: https://pypi.org
47-
.. _Installation: https://pip.pypa.io/en/stable/installing.html
47+
.. _Installation: https://pip.pypa.io/en/stable/installation/
4848
.. _Usage: https://pip.pypa.io/en/stable/
4949
.. _Release notes: https://pip.pypa.io/en/stable/news.html
5050
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/

docs/html/cli/pip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ verbosity log will be kept. This option is empty by default. This log appends
4747
to previous logging.
4848

4949
Like all pip options, ``--log`` can also be set as an environment variable, or
50-
placed into the pip config file. See the :ref:`Configuration` section.
50+
placed into the pip config file. See the :doc:`topics/configuration` section.
5151

5252
.. _`exists-action`:
5353

docs/html/development/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Configuration
55
=============
66

7-
This content is now covered in the :ref:`Configuration` section of the :doc:`User Guide </user_guide>`.
7+
This content is now covered in the :doc:`topics/configuration` section of the :doc:`User Guide </user_guide>`.

docs/html/user_guide.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Specifiers`
5353
5454
py -m pip install SomePackage # latest version
5555
py -m pip install SomePackage==1.0.4 # specific version
56-
py -m pip install 'SomePackage>=1.0.4' # minimum version
56+
py -m pip install 'SomePackage>=1.0.4' # minimum version
5757
5858
For more information and examples, see the :ref:`pip install` reference.
5959

@@ -271,6 +271,26 @@ To install directly from a wheel archive:
271271
272272
py -m pip install SomePackage-1.0-py2.py3-none-any.whl
273273
274+
To include optional dependencies provided in the ``provides_extras``
275+
metadata in the wheel, you must add quotes around the install target
276+
name:
277+
278+
.. tab:: Unix/macOS
279+
280+
.. code-block:: shell
281+
282+
python -m pip install './somepackage-1.0-py2.py3-none-any.whl[my-extras]'
283+
284+
.. tab:: Windows
285+
286+
.. code-block:: shell
287+
288+
py -m pip install './somepackage-1.0-py2.py3-none-any.whl[my-extras]'
289+
290+
.. note::
291+
292+
In the future, the ``path[extras]`` syntax may become deprecated. It is
293+
recommended to use PEP 508 syntax wherever possible.
274294

275295
For the cases where wheels are not available, pip offers :ref:`pip wheel` as a
276296
convenience, to build wheels for all your requirements and dependencies.

0 commit comments

Comments
 (0)