Skip to content

Commit 1711538

Browse files
authored
Merge branch 'main' into Optimize---find-links=<path-to-dir>
2 parents dc0b313 + 5efa3e8 commit 1711538

File tree

152 files changed

+821
-700
lines changed

Some content is hidden

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

152 files changed

+821
-700
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: 'src/pip/_vendor/'
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v4.5.0
66
hooks:
77
- id: check-builtin-literals
88
- id: check-added-large-files
@@ -16,31 +16,32 @@ repos:
1616
- id: trailing-whitespace
1717
exclude: .patch
1818

19-
- repo: https://github.com/psf/black
20-
rev: 23.7.0
19+
- repo: https://github.com/psf/black-pre-commit-mirror
20+
rev: 23.12.1
2121
hooks:
2222
- id: black
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.0.292
25+
rev: v0.1.9
2626
hooks:
2727
- id: ruff
28+
args: [--fix, --exit-non-zero-on-fix]
2829

2930
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v0.961
31+
rev: v1.8.0
3132
hooks:
3233
- id: mypy
3334
exclude: tests/data
3435
args: ["--pretty", "--show-error-codes"]
3536
additional_dependencies: [
36-
'keyring==23.0.1',
37-
'nox==2021.6.12',
37+
'keyring==24.2.0',
38+
'nox==2023.4.22',
3839
'pytest',
39-
'types-docutils==0.18.3',
40-
'types-setuptools==57.4.14',
41-
'types-freezegun==1.1.9',
42-
'types-six==1.16.15',
43-
'types-pyyaml==6.0.12.2',
40+
'types-docutils==0.20.0.3',
41+
'types-setuptools==68.2.0.0',
42+
'types-freezegun==1.1.10',
43+
'types-six==1.16.21.9',
44+
'types-pyyaml==6.0.12.12',
4445
]
4546

4647
- repo: https://github.com/pre-commit/pygrep-hooks

AUTHORS.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Albert-Guan
2020
albertg
2121
Alberto Sottile
2222
Aleks Bunin
23+
Ales Erjavec
2324
Alethea Flowers
2425
Alex Gaynor
2526
Alex Grönholm
@@ -30,6 +31,7 @@ Alex Stachowiak
3031
Alexander Shtyrov
3132
Alexandre Conrad
3233
Alexey Popravka
34+
Aleš Erjavec
3335
Alli
3436
Ami Fischman
3537
Ananya Maiti
@@ -196,9 +198,11 @@ David Runge
196198
David Tucker
197199
David Wales
198200
Davidovich
201+
ddelange
199202
Deepak Sharma
200203
Deepyaman Datta
201204
Denise Yu
205+
dependabot[bot]
202206
derwolfe
203207
Desetude
204208
Devesh Kumar Singh
@@ -223,6 +227,8 @@ Dwayne Bailey
223227
Ed Morley
224228
Edgar Ramírez
225229
Ee Durbin
230+
Efflam Lemaillet
231+
efflamlemaillet
226232
Eitan Adler
227233
ekristina
228234
elainechan
@@ -312,6 +318,7 @@ Ilya Baryshev
312318
Inada Naoki
313319
Ionel Cristian Mărieș
314320
Ionel Maries Cristian
321+
Itamar Turner-Trauring
315322
Ivan Pozdeev
316323
Jacob Kim
317324
Jacob Walls
@@ -338,6 +345,7 @@ Jay Graves
338345
Jean-Christophe Fillion-Robin
339346
Jeff Barber
340347
Jeff Dairiki
348+
Jeff Widman
341349
Jelmer Vernooij
342350
jenix21
343351
Jeremy Stanley
@@ -367,6 +375,7 @@ Joseph Long
367375
Josh Bronson
368376
Josh Hansen
369377
Josh Schneier
378+
Joshua
370379
Juan Luis Cano Rodríguez
371380
Juanjo Bazán
372381
Judah Rand
@@ -397,6 +406,7 @@ KOLANICH
397406
kpinc
398407
Krishna Oza
399408
Kumar McMillan
409+
Kurt McKee
400410
Kyle Persohn
401411
lakshmanaram
402412
Laszlo Kiss-Kollar
@@ -413,6 +423,7 @@ lorddavidiii
413423
Loren Carvalho
414424
Lucas Cimon
415425
Ludovic Gasc
426+
Lukas Geiger
416427
Lukas Juhrich
417428
Luke Macken
418429
Luo Jiebin
@@ -529,6 +540,7 @@ Patrick Jenkins
529540
Patrick Lawson
530541
patricktokeeffe
531542
Patrik Kopkan
543+
Paul Ganssle
532544
Paul Kehrer
533545
Paul Moore
534546
Paul Nasrat
@@ -609,6 +621,7 @@ ryneeverett
609621
Sachi King
610622
Salvatore Rinchiera
611623
sandeepkiran-js
624+
Sander Van Balen
612625
Savio Jomton
613626
schlamar
614627
Scott Kitterman
@@ -621,6 +634,7 @@ SeongSoo Cho
621634
Sergey Vasilyev
622635
Seth Michael Larson
623636
Seth Woodworth
637+
Shahar Epstein
624638
Shantanu
625639
shireenrao
626640
Shivansh-007
@@ -648,6 +662,7 @@ Steve Kowalik
648662
Steven Myint
649663
Steven Silvester
650664
stonebig
665+
studioj
651666
Stéphane Bidoul
652667
Stéphane Bidoul (ACSONE)
653668
Stéphane Klein

NEWS.rst

Lines changed: 85 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,90 @@
99
1010
.. towncrier release notes start
1111
12+
23.3.2 (2023-12-17)
13+
===================
14+
15+
Bug Fixes
16+
---------
17+
18+
- Fix a bug in extras handling for link requirements (`#12372 <https://github.com/pypa/pip/issues/12372>`_)
19+
- Fix mercurial revision "parse error": use ``--rev={ref}`` instead of ``-r={ref}`` (`#12373 <https://github.com/pypa/pip/issues/12373>`_)
20+
21+
22+
23.3.1 (2023-10-21)
23+
===================
24+
25+
Bug Fixes
26+
---------
27+
28+
- Handle a timezone indicator of Z when parsing dates in the self check. (`#12338 <https://github.com/pypa/pip/issues/12338>`_)
29+
- Fix bug where installing the same package at the same time with multiple pip processes could fail. (`#12361 <https://github.com/pypa/pip/issues/12361>`_)
30+
31+
32+
23.3 (2023-10-15)
33+
=================
34+
35+
Process
36+
-------
37+
38+
- Added reference to `vulnerability reporting guidelines <https://www.python.org/dev/security/>`_ to pip's security policy.
39+
40+
Deprecations and Removals
41+
-------------------------
42+
43+
- Drop a fallback to using SecureTransport on macOS. It was useful when pip detected OpenSSL older than 1.0.1, but the current pip does not support any Python version supporting such old OpenSSL versions. (`#12175 <https://github.com/pypa/pip/issues/12175>`_)
44+
45+
Features
46+
--------
47+
48+
- Improve extras resolution for multiple constraints on same base package. (`#11924 <https://github.com/pypa/pip/issues/11924>`_)
49+
- Improve use of datastructures to make candidate selection 1.6x faster. (`#12204 <https://github.com/pypa/pip/issues/12204>`_)
50+
- Allow ``pip install --dry-run`` to use platform and ABI overriding options. (`#12215 <https://github.com/pypa/pip/issues/12215>`_)
51+
- Add ``is_yanked`` boolean entry to the installation report (``--report``) to indicate whether the requirement was yanked from the index, but was still selected by pip conform to :pep:`592`. (`#12224 <https://github.com/pypa/pip/issues/12224>`_)
52+
53+
Bug Fixes
54+
---------
55+
56+
- Ignore errors in temporary directory cleanup (show a warning instead). (`#11394 <https://github.com/pypa/pip/issues/11394>`_)
57+
- Normalize extras according to :pep:`685` from package metadata in the resolver
58+
for comparison. This ensures extras are correctly compared and merged as long
59+
as the package providing the extra(s) is built with values normalized according
60+
to the standard. Note, however, that this *does not* solve cases where the
61+
package itself contains unnormalized extra values in the metadata. (`#11649 <https://github.com/pypa/pip/issues/11649>`_)
62+
- Prevent downloading sdists twice when :pep:`658` metadata is present. (`#11847 <https://github.com/pypa/pip/issues/11847>`_)
63+
- Include all requested extras in the install report (``--report``). (`#11924 <https://github.com/pypa/pip/issues/11924>`_)
64+
- Removed uses of ``datetime.datetime.utcnow`` from non-vendored code. (`#12005 <https://github.com/pypa/pip/issues/12005>`_)
65+
- Consistently report whether a dependency comes from an extra. (`#12095 <https://github.com/pypa/pip/issues/12095>`_)
66+
- Fix completion script for zsh (`#12166 <https://github.com/pypa/pip/issues/12166>`_)
67+
- Fix improper handling of the new onexc argument of ``shutil.rmtree()`` in Python 3.12. (`#12187 <https://github.com/pypa/pip/issues/12187>`_)
68+
- Filter out yanked links from the available versions error message: "(from versions: 1.0, 2.0, 3.0)" will not contain yanked versions conform PEP 592. The yanked versions (if any) will be mentioned in a separate error message. (`#12225 <https://github.com/pypa/pip/issues/12225>`_)
69+
- Fix crash when the git version number contains something else than digits and dots. (`#12280 <https://github.com/pypa/pip/issues/12280>`_)
70+
- Use ``-r=...`` instead of ``-r ...`` to specify references with Mercurial. (`#12306 <https://github.com/pypa/pip/issues/12306>`_)
71+
- Redact password from URLs in some additional places. (`#12350 <https://github.com/pypa/pip/issues/12350>`_)
72+
- pip uses less memory when caching large packages. As a result, there is a new on-disk cache format stored in a new directory ($PIP_CACHE_DIR/http-v2). (`#2984 <https://github.com/pypa/pip/issues/2984>`_)
73+
74+
Vendored Libraries
75+
------------------
76+
77+
- Upgrade certifi to 2023.7.22
78+
- Add truststore 0.8.0
79+
- Upgrade urllib3 to 1.26.17
80+
81+
Improved Documentation
82+
----------------------
83+
84+
- Document that ``pip search`` support has been removed from PyPI (`#12059 <https://github.com/pypa/pip/issues/12059>`_)
85+
- Clarify --prefer-binary in CLI and docs (`#12122 <https://github.com/pypa/pip/issues/12122>`_)
86+
- Document that using OS-provided Python can cause pip's test suite to report false failures. (`#12334 <https://github.com/pypa/pip/issues/12334>`_)
87+
88+
1289
23.2.1 (2023-07-22)
1390
===================
1491

1592
Bug Fixes
1693
---------
1794

18-
- Disable PEP 658 metadata fetching with the legacy resolver. (`#12156 <https://github.com/pypa/pip/issues/12156>`_)
95+
- Disable :pep:`658` metadata fetching with the legacy resolver. (`#12156 <https://github.com/pypa/pip/issues/12156>`_)
1996

2097

2198
23.2 (2023-07-15)
@@ -29,8 +106,9 @@ Process
29106
Deprecations and Removals
30107
-------------------------
31108

32-
- Deprecate legacy version and version specifiers that don't conform to `PEP 440
33-
<https://peps.python.org/pep-0440/>`_ (`#12063 <https://github.com/pypa/pip/issues/12063>`_)
109+
- Deprecate legacy version and version specifiers that don't conform to the
110+
:ref:`specification <pypug:version-specifiers>`.
111+
(`#12063 <https://github.com/pypa/pip/issues/12063>`_)
34112
- ``freeze`` no longer excludes the ``setuptools``, ``distribute``, and ``wheel``
35113
from the output when running on Python 3.12 or later, where they are not
36114
included in a virtual environment by default. Use ``--exclude`` if you wish to
@@ -45,11 +123,11 @@ Bug Fixes
45123
---------
46124

47125
- Fix ``pip completion --zsh``. (`#11417 <https://github.com/pypa/pip/issues/11417>`_)
48-
- Prevent downloading files twice when PEP 658 metadata is present (`#11847 <https://github.com/pypa/pip/issues/11847>`_)
126+
- Prevent downloading files twice when :pep:`658` metadata is present (`#11847 <https://github.com/pypa/pip/issues/11847>`_)
49127
- Add permission check before configuration (`#11920 <https://github.com/pypa/pip/issues/11920>`_)
50128
- Fix deprecation warnings in Python 3.12 for usage of shutil.rmtree (`#11957 <https://github.com/pypa/pip/issues/11957>`_)
51129
- Ignore invalid or unreadable ``origin.json`` files in the cache of locally built wheels. (`#11985 <https://github.com/pypa/pip/issues/11985>`_)
52-
- Fix installation of packages with PEP658 metadata using non-canonicalized names (`#12038 <https://github.com/pypa/pip/issues/12038>`_)
130+
- Fix installation of packages with :pep:`658` metadata using non-canonicalized names (`#12038 <https://github.com/pypa/pip/issues/12038>`_)
53131
- Correctly parse ``dist-info-metadata`` values from JSON-format index data. (`#12042 <https://github.com/pypa/pip/issues/12042>`_)
54132
- Fail with an error if the ``--python`` option is specified after the subcommand name. (`#12067 <https://github.com/pypa/pip/issues/12067>`_)
55133
- Fix slowness when using ``importlib.metadata`` (the default way for pip to read metadata in Python 3.11+) and there is a large overlap between already installed and to-be-installed packages. (`#12079 <https://github.com/pypa/pip/issues/12079>`_)
@@ -220,7 +298,7 @@ Features
220298

221299
- Change the hashes in the installation report to be a mapping. Emit the
222300
``archive_info.hashes`` dictionary in ``direct_url.json``. (`#11312 <https://github.com/pypa/pip/issues/11312>`_)
223-
- Implement logic to read the ``EXTERNALLY-MANAGED`` file as specified in PEP 668.
301+
- Implement logic to read the ``EXTERNALLY-MANAGED`` file as specified in :pep:`668`.
224302
This allows a downstream Python distributor to prevent users from using pip to
225303
modify the externally managed environment. (`#11381 <https://github.com/pypa/pip/issues/11381>`_)
226304
- Enable the use of ``keyring`` found on ``PATH``. This allows ``keyring``
@@ -236,7 +314,7 @@ Bug Fixes
236314
- Use the "venv" scheme if available to obtain prefixed lib paths. (`#11598 <https://github.com/pypa/pip/issues/11598>`_)
237315
- Deprecated a historical ambiguity in how ``egg`` fragments in URL-style
238316
requirements are formatted and handled. ``egg`` fragments that do not look
239-
like PEP 508 names now produce a deprecation warning. (`#11617 <https://github.com/pypa/pip/issues/11617>`_)
317+
like :pep:`508` names now produce a deprecation warning. (`#11617 <https://github.com/pypa/pip/issues/11617>`_)
240318
- Fix scripts path in isolated build environment on Debian. (`#11623 <https://github.com/pypa/pip/issues/11623>`_)
241319
- Make ``pip show`` show the editable location if package is editable (`#11638 <https://github.com/pypa/pip/issues/11638>`_)
242320
- Stop checking that ``wheel`` is present when ``build-system.requires``

docs/html/cli/pip_install.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ When looking at the items to be installed, pip checks what type of item
4545
each is, in the following order:
4646

4747
1. Project or archive URL.
48-
2. Local directory (which must contain a ``setup.py``, or pip will report
49-
an error).
48+
2. Local directory (which must contain a ``pyproject.toml`` or ``setup.py``,
49+
otherwise pip will report an error).
5050
3. Local file (a sdist or wheel format archive, following the naming
5151
conventions for those formats).
52-
4. A requirement, as specified in :pep:`440`.
52+
4. A :ref:`version specifier <pypug:version-specifiers>`.
5353

5454
Each item identified is added to the set of requirements to be satisfied by
5555
the install.
@@ -97,7 +97,8 @@ Installation Order
9797
.. note::
9898

9999
This section is only about installation order of runtime dependencies, and
100-
does not apply to build dependencies (those are specified using PEP 518).
100+
does not apply to build dependencies (those are specified using the
101+
:ref:`[build-system] table <pypug:pyproject-build-system-table>`).
101102

102103
As of v6.1.0, pip installs dependencies before their dependents, i.e. in
103104
"topological order." This is the only commitment pip currently makes related
@@ -181,8 +182,9 @@ Pre-release Versions
181182
--------------------
182183

183184
Starting with v1.4, pip will only install stable versions as specified by
184-
`pre-releases`_ by default. If a version cannot be parsed as a compliant :pep:`440`
185-
version then it is assumed to be a pre-release.
185+
`pre-releases`_ by default. If a version cannot be parsed as a
186+
:ref:`compliant <pypug:version-specifiers>` version then it is assumed to be
187+
a pre-release.
186188

187189
If a Requirement specifier includes a pre-release or development version
188190
(e.g. ``>=0.0.dev0``) then pip will allow pre-release and development versions
@@ -214,8 +216,8 @@ pip looks for packages in a number of places: on PyPI (if not disabled via
214216
``--no-index``), in the local filesystem, and in any additional repositories
215217
specified via ``--find-links`` or ``--index-url``. There is no ordering in
216218
the locations that are searched. Rather they are all checked, and the "best"
217-
match for the requirements (in terms of version number - see :pep:`440` for
218-
details) is selected.
219+
match for the requirements (in terms of version number - see the
220+
:ref:`specification <pypug:version-specifiers>` for details) is selected.
219221

220222
See the :ref:`pip install Examples<pip install Examples>`.
221223

@@ -380,7 +382,8 @@ Examples
380382
py -m pip install -e "git+https://git.repo/some_pkg.git@feature#egg=SomePackage" # from 'feature' branch
381383
py -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
382384
383-
#. Install a package with `extras`_.
385+
#. Install a package with extras, i.e., optional dependencies
386+
(:ref:`specification <pypug:dependency-specifiers>`).
384387

385388
.. tab:: Unix/macOS
386389

@@ -418,7 +421,8 @@ Examples
418421
py -m pip install "./downloads/SomePackage-1.0.4.tar.gz"
419422
py -m pip install "http://my.package.repo/SomePackage-1.0.4.zip"
420423
421-
#. Install a particular source archive file following :pep:`440` direct references.
424+
#. Install a particular source archive file following direct references
425+
(:ref:`specification <pypug:dependency-specifiers>`).
422426

423427
.. tab:: Unix/macOS
424428

@@ -539,5 +543,4 @@ Examples
539543
540544
py -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
541545
542-
.. _extras: https://www.python.org/dev/peps/pep-0508/#extras
543546
.. _PyPI: https://pypi.org/

docs/html/cli/pip_wheel.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Differences to ``build``
3434
------------------------
3535

3636
`build <https://pypi.org/project/build/>`_ is a simple tool which can among other things build
37-
wheels for projects using PEP 517. It is comparable to the execution of ``pip wheel --no-deps .``.
37+
wheels for projects using the standard ``pyproject.toml``-based build interface. It
38+
is comparable to the execution of ``pip wheel --no-deps .``.
3839
It can also build source distributions which is not possible with ``pip``.
3940
``pip wheel`` covers the wheel scope of ``build`` but offers many additional features.
4041

docs/html/development/architecture/package-finding.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ example, whether a pre-release is eligible for selection or whether a file
182182
whose hash doesn't match is eligible depends on properties of the collection
183183
as a whole.
184184

185-
The ``CandidateEvaluator`` class uses information like the list of `PEP 425`_
186-
tags compatible with the target Python interpreter, hashes provided by the
185+
The ``CandidateEvaluator`` class uses information like the list of
186+
:ref:`platform tags <pypug:platform-compatibility-tags>`
187+
compatible with the target Python interpreter, hashes provided by the
187188
user, and other user preferences, etc.
188189

189190
Specifically, the class has a ``get_applicable_candidates()`` method.
@@ -236,5 +237,4 @@ The class is the return type of both the ``CandidateEvaluator`` class's
236237
``find_best_candidate()`` method.
237238

238239

239-
.. _`PEP 425`: https://www.python.org/dev/peps/pep-0425/
240240
.. _`PEP 503`: https://www.python.org/dev/peps/pep-0503/

0 commit comments

Comments
 (0)