Skip to content

Commit

Permalink
Merge branch 'main' into handle-missing-completion-env
Browse files Browse the repository at this point in the history
  • Loading branch information
orf authored Apr 1, 2024
2 parents 323a64b + 4f3a184 commit 082a6c6
Show file tree
Hide file tree
Showing 221 changed files with 3,643 additions and 2,523 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
schedule:
- cron: 0 0 * * MON # Run every Monday at 00:00 UTC

env:
# The "FORCE_COLOR" variable, when set to 1,
# tells Nox to colorize itself.
FORCE_COLOR: "1"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
Expand All @@ -22,7 +27,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 +63,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 +87,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"

Expand All @@ -104,7 +109,6 @@ jobs:
matrix:
os: [Ubuntu, MacOS]
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand All @@ -113,14 +117,16 @@ jobs:

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

- name: Install Ubuntu dependencies
if: matrix.os == 'Ubuntu'
run: sudo apt-get install bzr
run: |
sudo apt-get update
sudo apt-get install bzr
- name: Install MacOS dependencies
if: matrix.os == 'MacOS'
Expand Down Expand Up @@ -155,17 +161,18 @@ jobs:
matrix:
os: [Windows]
python:
- "3.7"
# Commented out, since Windows tests are expensively slow.
# - "3.8"
- "3.8"
# Commented out, since Windows tests are expensively slow,
# only test the oldest and newest Python supported by pip
# - "3.9"
# - "3.10"
- "3.11"
# - "3.11"
- "3.12"
group: [1, 2]

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,14 +223,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Ubuntu dependencies
run: sudo apt-get install bzr
run: |
sudo apt-get update
sudo apt-get install bzr
- run: pip install nox 'virtualenv<20' 'setuptools != 60.6.0'
- run: pip install nox

# Main check
- name: Run integration tests
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
14 changes: 11 additions & 3 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,7 +227,10 @@ Dustin Ingram
Dwayne Bailey
Ed Morley
Edgar Ramírez
Edgar Ramírez Mondragón
Ee Durbin
Efflam Lemaillet
efflamlemaillet
Eitan Adler
ekristina
elainechan
Expand Down Expand Up @@ -256,6 +260,7 @@ Filip Kokosiński
Filipe Laíns
Finn Womack
finnagin
Flavio Amurrio
Florian Briand
Florian Rathgeber
Francesco
Expand Down Expand Up @@ -318,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 @@ -340,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 @@ -438,7 +445,7 @@ Mark Williams
Markus Hametner
Martey Dodoo
Martin Fischer
Martin Häcker
Martin Häcker
Martin Pavlasek
Masaki
Masklinn
Expand Down Expand Up @@ -488,7 +495,7 @@ Miro Hrončok
Monica Baluna
montefra
Monty Taylor
Muha Ajjan
Muha Ajjan
Nadav Wexler
Nahuel Ambrosini
Nate Coraor
Expand Down Expand Up @@ -579,6 +586,7 @@ Przemek Wrzos
Pulkit Goyal
q0w
Qiangning Hong
Qiming Xu
Quentin Lee
Quentin Pradet
R. David Murray
Expand Down Expand Up @@ -717,6 +725,7 @@ Vincent Philippon
Vinicyus Macedo
Vipul Kumar
Vitaly Babiy
Vladimir Fokow
Vladimir Rutsky
W. Trevor King
Wil Tan
Expand Down Expand Up @@ -748,4 +757,3 @@ Zvezdan Petkovic
Łukasz Langa
Роман Донченко
Семён Марьясин
‮rekcäH nitraM‮
55 changes: 53 additions & 2 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,56 @@
.. 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)
===================

Bug Fixes
---------

- Fix a bug in extras handling for link requirements (`#12372 <https://github.com/pypa/pip/issues/12372>`_)
- Fix mercurial revision "parse error": use ``--rev={ref}`` instead of ``-r={ref}`` (`#12373 <https://github.com/pypa/pip/issues/12373>`_)


23.3.1 (2023-10-21)
===================

Expand Down Expand Up @@ -96,8 +146,9 @@ Process
Deprecations and Removals
-------------------------

- Deprecate legacy version and version specifiers that don't conform to `PEP 440
<https://peps.python.org/pep-0440/>`_ (`#12063 <https://github.com/pypa/pip/issues/12063>`_)
- Deprecate legacy version and version specifiers that don't conform to the
:ref:`specification <pypug:version-specifiers>`.
(`#12063 <https://github.com/pypa/pip/issues/12063>`_)
- ``freeze`` no longer excludes the ``setuptools``, ``distribute``, and ``wheel``
from the output when running on Python 3.12 or later, where they are not
included in a virtual environment by default. Use ``--exclude`` if you wish to
Expand Down
34 changes: 19 additions & 15 deletions docs/html/cli/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ When looking at the items to be installed, pip checks what type of item
each is, in the following order:

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

Each item identified is added to the set of requirements to be satisfied by
the install.
Expand Down Expand Up @@ -97,7 +97,8 @@ Installation Order
.. note::

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

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

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

If a Requirement specifier includes a pre-release or development version
(e.g. ``>=0.0.dev0``) then pip will allow pre-release and development versions
Expand Down Expand Up @@ -210,12 +212,13 @@ and `there <https://www.python.org/dev/peps/pep-0503/>`_.
pip offers a number of package index options for modifying how packages are
found.

pip looks for packages in a number of places: on PyPI (if not disabled via
``--no-index``), in the local filesystem, and in any additional repositories
specified via ``--find-links`` or ``--index-url``. There is no ordering in
the locations that are searched. Rather they are all checked, and the "best"
match for the requirements (in terms of version number - see :pep:`440` for
details) is selected.
pip looks for packages in a number of places: on PyPI (or the index given as
``--index-url``, if not disabled via ``--no-index``), in the local filesystem,
and in any additional repositories specified via ``--find-links`` or
``--extra-index-url``. There is no priority in the locations that are searched.
Rather they are all checked, and the "best" match for the requirements (in
terms of version number - see the
:ref:`specification <pypug:version-specifiers>` for details) is selected.

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

Expand Down Expand Up @@ -380,7 +383,8 @@ Examples
py -m pip install -e "git+https://git.repo/some_pkg.git@feature#egg=SomePackage" # from 'feature' branch
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
#. Install a package with `extras`_.
#. Install a package with extras, i.e., optional dependencies
(:ref:`specification <pypug:dependency-specifiers>`).

.. tab:: Unix/macOS

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

.. tab:: Unix/macOS

Expand Down Expand Up @@ -539,5 +544,4 @@ Examples
py -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
.. _extras: https://www.python.org/dev/peps/pep-0508/#extras
.. _PyPI: https://pypi.org/
Loading

0 comments on commit 082a6c6

Please sign in to comment.