Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/main' into 3.13/d…
Browse files Browse the repository at this point in the history
…ebug/fix
  • Loading branch information
jsirois committed Feb 5, 2024
2 parents 0257c94 + 51de88c commit 876afde
Show file tree
Hide file tree
Showing 57 changed files with 1,025 additions and 554 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install nox
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Set up git credentials
Expand All @@ -82,7 +82,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-rtd-redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
environment: RTD Deploys
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install httpx pyyaml rich
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Hugo van Kemenade <[email protected]> hugovk <[email protected]
Igor Kuzmitshov <[email protected]> <[email protected]>
Ilya Baryshev <[email protected]>
Jakub Stasiak <[email protected]>
Jean Abou Samra <[email protected]>
John-Scott Atlakson <[email protected]>
Jorge Niedbalski <[email protected]>
<[email protected]> <[email protected]>
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: 'src/pip/_vendor/'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-builtin-literals
- id: check-added-large-files
Expand All @@ -16,19 +16,19 @@ repos:
- id: trailing-whitespace
exclude: .patch

- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
rev: v0.2.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.8.0
hooks:
- id: mypy
exclude: tests/data
Expand Down
7 changes: 7 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Cristina Muñoz
Curtis Doty
cytolentino
Daan De Meyer
Dale
Damian
Damian Quiroga
Damian Shaw
Expand Down Expand Up @@ -226,6 +227,7 @@ Dustin Ingram
Dwayne Bailey
Ed Morley
Edgar Ramírez
Edgar Ramírez Mondragón
Ee Durbin
Efflam Lemaillet
efflamlemaillet
Expand Down Expand Up @@ -258,6 +260,7 @@ Filip Kokosiński
Filipe Laíns
Finn Womack
finnagin
Flavio Amurrio
Florian Briand
Florian Rathgeber
Francesco
Expand Down Expand Up @@ -320,6 +323,7 @@ Ionel Cristian Mărieș
Ionel Maries Cristian
Itamar Turner-Trauring
Ivan Pozdeev
J. Nick Koston
Jacob Kim
Jacob Walls
Jaime Sanz
Expand All @@ -342,6 +346,7 @@ Jason R. Coombs
JasonMo
JasonMo1
Jay Graves
Jean Abou Samra
Jean-Christophe Fillion-Robin
Jeff Barber
Jeff Dairiki
Expand Down Expand Up @@ -581,6 +586,7 @@ Przemek Wrzos
Pulkit Goyal
q0w
Qiangning Hong
Qiming Xu
Quentin Lee
Quentin Pradet
R. David Murray
Expand Down Expand Up @@ -719,6 +725,7 @@ Vincent Philippon
Vinicyus Macedo
Vipul Kumar
Vitaly Babiy
Vladimir Fokow
Vladimir Rutsky
W. Trevor King
Wil Tan
Expand Down
40 changes: 40 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,46 @@
.. towncrier release notes start
24.0 (2024-02-03)
=================

Features
--------

- Retry on HTTP status code 502 (`#11843 <https://github.com/pypa/pip/issues/11843>`_)
- Automatically use the setuptools PEP 517 build backend when ``--config-settings`` is
used for projects without ``pyproject.toml``. (`#11915 <https://github.com/pypa/pip/issues/11915>`_)
- Make pip freeze and pip uninstall of legacy editable installs of packages whose name
contains ``_`` compatible with ``setuptools>=69.0.3``. (`#12477 <https://github.com/pypa/pip/issues/12477>`_)
- Support per requirement ``--config-settings`` for editable installs. (`#12480 <https://github.com/pypa/pip/issues/12480>`_)

Bug Fixes
---------

- Optimized usage of ``--find-links=<path-to-dir>``, by only scanning the relevant directory once, only considering file names that are valid wheel or sdist names, and only considering files in the directory that are related to the install. (`#12327 <https://github.com/pypa/pip/issues/12327>`_)
- Removed ``wheel`` from the ``[build-system].requires`` list fallback
that is used when ``pyproject.toml`` is absent. (`#12449 <https://github.com/pypa/pip/issues/12449>`_)

Vendored Libraries
------------------

- Upgrade distlib to 0.3.8

Improved Documentation
----------------------

- Fix explanation of how PIP_CONFIG_FILE works (`#11815 <https://github.com/pypa/pip/issues/11815>`_)
- Fix outdated pip install argument description in documentation. (`#12417 <https://github.com/pypa/pip/issues/12417>`_)
- Replace some links to PEPs with links to the canonical specifications on the :doc:`pypug:index` (`#12434 <https://github.com/pypa/pip/issues/12434>`_)
- Updated the ``pyproject.toml`` document to stop suggesting
to depend on ``wheel`` as a build dependency directly. (`#12449 <https://github.com/pypa/pip/issues/12449>`_)
- Update supported interpreters in development docs (`#12475 <https://github.com/pypa/pip/issues/12475>`_)

Process
-------

- Most project metadata is now defined statically via pip's ``pyproject.toml`` file.

23.3.2 (2023-12-17)
===================

Expand Down
30 changes: 29 additions & 1 deletion docs/html/development/ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pip support a variety of Python interpreters:
- CPython 3.8
- CPython 3.9
- CPython 3.10
- CPython 3.11
- CPython 3.12
- Latest PyPy3

on different operating systems:
Expand Down Expand Up @@ -96,6 +98,10 @@ Actual testing
| | +-------+---------------+-----------------+
| | | CP3.10| | |
| | +-------+---------------+-----------------+
| | | CP3.11| | |
| | +-------+---------------+-----------------+
| | | CP3.12| | |
| | +-------+---------------+-----------------+
| | | PyPy3 | | |
| Windows +----------+-------+---------------+-----------------+
| | x64 | CP3.7 | GitHub | GitHub |
Expand All @@ -104,7 +110,11 @@ Actual testing
| | +-------+---------------+-----------------+
| | | CP3.9 | | |
| | +-------+---------------+-----------------+
| | | CP3.10| GitHub | GitHub |
| | | CP3.10| | |
| | +-------+---------------+-----------------+
| | | CP3.11| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | CP3.12| | |
| | +-------+---------------+-----------------+
| | | PyPy3 | | |
+-----------+----------+-------+---------------+-----------------+
Expand All @@ -114,6 +124,12 @@ Actual testing
| | +-------+---------------+-----------------+
| | | CP3.9 | | |
| | +-------+---------------+-----------------+
| | | CP3.10| | |
| | +-------+---------------+-----------------+
| | | CP3.11| | |
| | +-------+---------------+-----------------+
| | | CP3.12| | |
| | +-------+---------------+-----------------+
| | | PyPy3 | | |
| Linux +----------+-------+---------------+-----------------+
| | x64 | CP3.7 | GitHub | GitHub |
Expand All @@ -124,6 +140,10 @@ Actual testing
| | +-------+---------------+-----------------+
| | | CP3.10| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | CP3.11| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | CP3.12| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | PyPy3 | | |
+-----------+----------+-------+---------------+-----------------+
| | arm64 | CP3.7 | | |
Expand All @@ -134,6 +154,10 @@ Actual testing
| | +-------+---------------+-----------------+
| | | CP3.10| | |
| | +-------+---------------+-----------------+
| | | CP3.11| | |
| | +-------+---------------+-----------------+
| | | CP3.12| | |
| | +-------+---------------+-----------------+
| | | PyPy3 | | |
| macOS +----------+-------+---------------+-----------------+
| | x64 | CP3.7 | GitHub | GitHub |
Expand All @@ -144,5 +168,9 @@ Actual testing
| | +-------+---------------+-----------------+
| | | CP3.10| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | CP3.11| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | CP3.12| GitHub | GitHub |
| | +-------+---------------+-----------------+
| | | PyPy3 | | |
+-----------+----------+-------+---------------+-----------------+
6 changes: 3 additions & 3 deletions docs/html/reference/build-system/pyproject-toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ that build requirements are handled independently of the user's runtime
environment.

For example, a project that needs an older version of setuptools to build can
still be installed, even if the user has an newer version installed (and
still be installed, even if the user has a newer version installed (and
without silently replacing that version).

### Build-time dependencies
Expand Down Expand Up @@ -135,13 +135,13 @@ section, it will be assumed to have the following backend settings:

```toml
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
requires = ["setuptools>=40.8.0"]
build-backend = "setuptools.build_meta:__legacy__"
```

If a project has a `build-system` section but no `build-backend`, then:

- It is expected to include `setuptools` and `wheel` as build requirements. An
- It is expected to include `setuptools` as a build requirement. An
error is reported if the available version of `setuptools` is not recent
enough.

Expand Down
1 change: 0 additions & 1 deletion news/11815.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion news/11909.process.rst

This file was deleted.

1 change: 0 additions & 1 deletion news/12389.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion news/12390.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion news/12393.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion news/12417.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion news/12434.doc.rst

This file was deleted.

1 change: 1 addition & 0 deletions news/12510.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update ruff to 0.2.0 and update ruff config to reflect
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# fmt: off
sys.path.append(".")
from tools import release # isort:skip # noqa
from tools import release # isort:skip
sys.path.pop()
# fmt: on

Expand Down
20 changes: 11 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,23 @@ distlib = "https://bitbucket.org/pypa/distlib/raw/master/LICENSE.txt"
webencodings = "https://github.com/SimonSapin/python-webencodings/raw/master/LICENSE"

[tool.ruff]
src = ["src"]
target-version = "py37"
line-length = 88
extend-exclude = [
"_vendor",
"./build",
".scratch",
"data",
]

[tool.ruff.lint]
ignore = [
"B019",
"B020",
"B904", # Ruff enables opinionated warnings by default
"B905", # Ruff enables opinionated warnings by default
]
target-version = "py37"
line-length = 88
select = [
"ASYNC",
"B",
Expand All @@ -170,22 +173,21 @@ select = [
"UP032",
]

[tool.ruff.isort]
# We need to explicitly make pip "first party" as it's imported by code in
# the docs and tests directories.
known-first-party = ["pip"]
[tool.ruff.lint.isort]
# Explicitly make tests "first party" as it's not in the "src" directory
known-first-party = ["tests"]
known-third-party = ["pip._vendor"]

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 33 # default is 10

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["G"]
"src/pip/_internal/*" = ["PERF203"]
"tests/*" = ["B011"]
"tests/unit/test_finder.py" = ["C414"]

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
max-args = 15 # default is 5
max-branches = 28 # default is 12
max-returns = 13 # default is 6
Expand Down
2 changes: 1 addition & 1 deletion src/pip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List, Optional

__version__ = "24.0.dev0"
__version__ = "24.1.dev0"


def main(args: Optional[List[str]] = None) -> int:
Expand Down
Loading

0 comments on commit 876afde

Please sign in to comment.