Skip to content

Commit ed399df

Browse files
authored
Merge branch 'main' into honour_user_site
2 parents 4aed2c2 + 2a2960d commit ed399df

123 files changed

Lines changed: 1614 additions & 2435 deletions

File tree

Some content is hidden

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

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ repos:
1717
exclude: .patch
1818

1919
- repo: https://github.com/psf/black-pre-commit-mirror
20-
rev: 25.1.0
20+
rev: 25.9.0
2121
hooks:
2222
- id: black
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.12.11
25+
rev: v0.13.3
2626
hooks:
2727
- id: ruff-check
2828
args: [--fix]
2929

3030
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.17.1
31+
rev: v1.18.2
3232
hooks:
3333
- id: mypy
3434
exclude: tests/data

docs/html/cli/pip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ when decision is needed.
7777
.. _`2-build-system-interface`:
7878
.. rubric:: Build System Interface
7979

80-
This is now covered in :doc:`../reference/build-system/index`.
80+
This is now covered in :doc:`../reference/build-system`.
8181

8282
.. _`General Options`:
8383

docs/html/cli/pip_freeze.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ Description
2323

2424
.. pip-command-description:: freeze
2525

26+
.. note::
27+
By default, ``pip freeze`` omits bootstrap packaging tools so the output
28+
focuses on your project’s dependencies. On Python **3.11 and earlier**
29+
this excludes ``pip``, ``setuptools``, ``wheel`` and ``distribute``; on
30+
Python **3.12 and later** only ``pip`` is excluded. Use ``--all`` to
31+
include those packages when you need a complete environment snapshot.
32+
``pip freeze`` reports what is installed; it does **not** compute a
33+
lockfile or a solver result.
34+
2635

2736
Options
2837
=======

docs/html/cli/pip_install.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ This is now covered in :doc:`../topics/local-project-installs`.
255255
.. _`0-build-system-interface`:
256256
.. rubric:: Build System Interface
257257

258-
This is now covered in :doc:`../reference/build-system/index`.
258+
This is now covered in :doc:`../reference/build-system`.
259259

260260
.. _`pip install Options`:
261261

@@ -479,12 +479,11 @@ Examples
479479

480480
.. warning::
481481

482-
Using this option to search for packages which are not in the main
483-
repository (such as private packages) is unsafe, per a security
484-
vulnerability called
485-
`dependency confusion <https://azure.microsoft.com/en-us/resources/3-ways-to-mitigate-risk-using-private-package-feeds/>`_:
486-
an attacker can claim the package on the public repository in a way that
487-
will ensure it gets chosen over the private package.
482+
Using the ``--extra-index-url`` option to search for packages which are
483+
not in the main repository (for example, private packages) is unsafe.
484+
This is a class of security issue known as `dependency confusion <https://azure.microsoft.com/en-us/resources/3-ways-to-mitigate-risk-using-private-package-feeds/>`_: an
485+
attacker can publish a package with the same name to a public index,
486+
which may then be chosen instead of your private package.
488487

489488
.. tab:: Unix/macOS
490489

docs/html/cli/pip_lock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Options
3535
Examples
3636
========
3737

38-
#. Emit a ``pylock.toml`` for the the project in the current directory
38+
#. Emit a ``pylock.toml`` for the project in the current directory
3939

4040
.. tab:: Unix/macOS
4141

docs/html/cli/pip_wheel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Description
2828
.. _`1-build-system-interface`:
2929
.. rubric:: Build System Interface
3030

31-
This is now covered in :doc:`../reference/build-system/index`.
31+
This is now covered in :doc:`../reference/build-system`.
3232

3333
Differences to ``build``
3434
------------------------

docs/html/reference/build-system/pyproject-toml.md renamed to docs/html/reference/build-system.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
# `pyproject.toml`
1+
(build-interface)=
22

33
```{versionadded} 10.0
44
55
```
66

7+
```{versionchanged} 23.1
8+
The legacy interface where pip could invoke `setup.py install`
9+
in some circumstances was removed,
10+
in favor of the fallback behavior described below.
11+
```
12+
13+
```{versionchanged} 25.3
14+
The legacy interface where pip could invoke `setup.py build_wheel` or
15+
`setup.py develop` in some circumstances was removed,
16+
in favor of the fallback behavior described below..
17+
```
18+
19+
# Build System Interface
20+
21+
When dealing with installable source distributions of a package, pip does not
22+
directly handle the build process for the package. This responsibility is
23+
delegated to "build backends" -- also known as "build systems". This means
24+
that pip needs an interface, to interact with these build backends.
25+
726
Modern Python packages can contain a `pyproject.toml` file, first introduced in
827
{pep}`518` and later expanded in {pep}`517`, {pep}`621` and {pep}`660`.
928
This file contains build system requirements and information, which are used by
@@ -96,16 +115,6 @@ For performing editable installs, pip will use {pep}`660`
96115
`build_wheel_for_editable` hook that has to be provided by the build backend.
97116
The wheels generated using this mechanism are not cached.
98117

99-
```{admonition} Compatibility fallback
100-
If this hook is missing on the build backend _and_ there's a `setup.py` file
101-
in the project, pip will fallback to the legacy setup.py-based editable
102-
installation.
103-
104-
This is considered a stopgap solution until setuptools adds support for
105-
{pep}`660`, at which point this functionality will be removed; following pip's
106-
regular {ref}`deprecation policy <Deprecation Policy>`.
107-
```
108-
109118
### Backend Configuration
110119

111120
Build backends have the ability to accept configuration settings, which can
@@ -125,8 +134,7 @@ files.
125134
## Build output
126135

127136
It is the responsibility of the build backend to ensure that the output is
128-
in the correct encoding, as described in {pep}`517`. This likely involves
129-
dealing with [the same challenges as pip has for legacy builds](build-output).
137+
in the correct encoding, as described in {pep}`517`.
130138

131139
## Fallback Behaviour
132140

@@ -138,7 +146,8 @@ https://setuptools.pypa.io/en/stable/userguide/quickstart.html#basic-use).
138146
```
139147

140148
If a project does not have a `pyproject.toml` file containing a `build-system`
141-
section, it will be assumed to have the following backend settings:
149+
section, and contains a `setup.py` it will be assumed to have the following
150+
backend settings:
142151

143152
```toml
144153
[build-system]

docs/html/reference/build-system/index.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)