Skip to content

Commit 585eaf8

Browse files
authored
Merge branch 'main' into main
2 parents 6986746 + 6522547 commit 585eaf8

File tree

474 files changed

+15620
-6521
lines changed

Some content is hidden

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

474 files changed

+15620
-6521
lines changed

.git-blame-ignore-revs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
917b41d6d73535c090fc312668dff353cdaef906 # Blacken docs/html/conf.py
2+
ed383dd8afa8fe0250dcf9b8962927ada0e21c89 # Blacken docs/pip_sphinxext.py
3+
228405e62451abe8a66233573035007df4be575f # Blacken noxfile.py
4+
f477a9f490e978177b71c9dbaa5465c51ea21129 # Blacken setup.py
5+
e59ba23468390217479465019f8d78e724a23550 # Blacken src/pip/__main__.py
6+
d7013db084e9a52242354ee5754dc5d19ccf062e # Blacken src/pip/_internal/build_env.py
7+
30e9ffacae75378fc3e3df48f754dabad037edb9 # Blacken src/pip/_internal/cache.py
8+
8341d56b46776a805286218ac5fb0e7850fd9341 # Blacken src/pip/_internal/cli/autocompletion.py
9+
3d3461ed65208656358b3595e25d8c31c5c89470 # Blacken src/pip/_internal/cli/base_command.py
10+
d489b0f1b104bc936b0fb17e6c33633664ebdc0e # Blacken src/pip/_internal/cli/cmdoptions.py
11+
591fe4841aefe9befa0530f2a54f820c4ecbb392 # Blacken src/pip/_internal/cli/command_context.py
12+
9265b28ef7248ae1847a80384dbeeb8119c3e2f5 # Blacken src/pip/_internal/cli/main.py
13+
847a369364878c38d210c90beed2737bb6fb3a85 # Blacken src/pip/_internal/cli/main_parser.py
14+
ec97119067041ae58b963935ff5f0e5d9fead80c # Blacken src/pip/_internal/cli/parser.py
15+
6e3b8de22fa39fa3073599ecf9db61367f4b3b32 # Blacken src/pip/_internal/cli/progress_bars.py
16+
55405227de983c5bd5bf0858ea12dbe537d3e490 # Blacken src/pip/_internal/cli/req_command.py
17+
d5ca5c850cae9a0c64882a8f49d3a318699a7e2e # Blacken src/pip/_internal/cli/spinners.py
18+
9747cb48f8430a7a91b36fe697dd18dbddb319f0 # Blacken src/pip/_internal/commands/__init__.py
19+
1c09fd6f124df08ca36bed68085ad68e89bb1957 # Blacken src/pip/_internal/commands/cache.py
20+
315e93d7eb87cd476afcc4eaf0f01a7b56a5037f # Blacken src/pip/_internal/commands/check.py
21+
8ae3b96ed7d24fd24024ccce4840da0dcf635f26 # Blacken src/pip/_internal/commands/completion.py
22+
42ca4792202f26a293ee48380718743a80bbee37 # Blacken src/pip/_internal/commands/configuration.py
23+
790ad78fcd43d41a5bef9dca34a3c128d05eb02c # Blacken src/pip/_internal/commands/debug.py
24+
a6fcc8f045afe257ce321f4012fc8fcb4be01eb3 # Blacken src/pip/_internal/commands/download.py
25+
920e735dfc60109351fbe2f4c483c2f6ede9e52d # Blacken src/pip/_internal/commands/freeze.py
26+
053004e0fcf0851238b1064fbce13aea87b24e9c # Blacken src/pip/_internal/commands/hash.py
27+
a6b6ae487e52c2242045b64cb8962e0a992cfd76 # Blacken src/pip/_internal/commands/help.py
28+
2495cf95a6c7eb61ccf1f9f0e8b8d736af914e53 # Blacken __main__.py
29+
c7ee560e00b85f7486b452c14ff49e4737996eda # Blacken tools/
30+
8e2e1964a4f0a060f7299a96a911c9e116b2283d # Blacken src/pip/_internal/commands/
31+
1bc0eef05679e87f45540ab0a294667cb3c6a88e # Blacken src/pip/_internal/network/
32+
069b01932a7d64a81c708c6254cc93e1f89e6783 # Blacken src/pip/_internal/req
33+
1897784d59e0d5fcda2dd75fea54ddd8be3d502a # Blacken src/pip/_internal/index
34+
94999255d5ede440c37137d210666fdf64302e75 # Reformat the codebase, with black
35+
585037a80a1177f1fa92e159a7079855782e543e # Cleanup implicit string concatenation
36+
8a6f6ac19b80a6dc35900a47016c851d9fcd2ee2 # Blacken src/pip/_internal/resolution directory

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ body:
6161
description: >-
6262
Provide the output of the steps above, including the commands
6363
themselves and pip's output/traceback etc.
64+
(The output will auto-rendered as code, no need for backticks.)
6465
6566
If you want to present output from multiple commands, please prefix
6667
the line containing the command with `$ `. Please also ensure that
6768
the "How to reproduce" section contains matching instructions for
6869
reproducing this.
70+
render: shell
6971

7072
- type: checkboxes
7173
attributes:

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/ci.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
schedule:
1212
- cron: 0 0 * * MON # Run every Monday at 00:00 UTC
1313

14+
env:
15+
# The "FORCE_COLOR" variable, when set to 1,
16+
# tells Nox to colorize itself.
17+
FORCE_COLOR: "1"
18+
1419
concurrency:
1520
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1621
cancel-in-progress: true
@@ -21,8 +26,8 @@ jobs:
2126
runs-on: ubuntu-latest
2227

2328
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions/setup-python@v4
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-python@v5
2631
with:
2732
python-version: "3.x"
2833
- run: pip install nox
@@ -57,8 +62,8 @@ jobs:
5762
runs-on: ubuntu-latest
5863

5964
steps:
60-
- uses: actions/checkout@v3
61-
- uses: actions/setup-python@v4
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-python@v5
6267
with:
6368
python-version: "3.x"
6469
- name: Set up git credentials
@@ -81,8 +86,8 @@ jobs:
8186
github.event_name != 'pull_request'
8287
8388
steps:
84-
- uses: actions/checkout@v3
85-
- uses: actions/setup-python@v4
89+
- uses: actions/checkout@v4
90+
- uses: actions/setup-python@v5
8691
with:
8792
python-version: "3.x"
8893

@@ -91,7 +96,7 @@ jobs:
9196
- run: git diff --exit-code
9297

9398
tests-unix:
94-
name: tests / ${{ matrix.python }} / ${{ matrix.os }}
99+
name: tests / ${{ matrix.python.key || matrix.python }} / ${{ matrix.os }}
95100
runs-on: ${{ matrix.os }}-latest
96101

97102
needs: [packaging, determine-changes]
@@ -104,21 +109,24 @@ jobs:
104109
matrix:
105110
os: [Ubuntu, MacOS]
106111
python:
107-
- "3.7"
108112
- "3.8"
109113
- "3.9"
110114
- "3.10"
111115
- "3.11"
116+
- "3.12"
112117

113118
steps:
114-
- uses: actions/checkout@v3
115-
- uses: actions/setup-python@v4
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-python@v5
116121
with:
117122
python-version: ${{ matrix.python }}
123+
allow-prereleases: true
118124

119125
- name: Install Ubuntu dependencies
120126
if: matrix.os == 'Ubuntu'
121-
run: sudo apt-get install bzr
127+
run: |
128+
sudo apt-get update
129+
sudo apt-get install bzr
122130
123131
- name: Install MacOS dependencies
124132
if: matrix.os == 'MacOS'
@@ -129,12 +137,12 @@ jobs:
129137
# Main check
130138
- name: Run unit tests
131139
run: >-
132-
nox -s test-${{ matrix.python }} --
140+
nox -s test-${{ matrix.python.key || matrix.python }} --
133141
-m unit
134142
--verbose --numprocesses auto --showlocals
135143
- name: Run integration tests
136144
run: >-
137-
nox -s test-${{ matrix.python }} --
145+
nox -s test-${{ matrix.python.key || matrix.python }} --
138146
-m integration
139147
--verbose --numprocesses auto --showlocals
140148
--durations=5
@@ -153,38 +161,28 @@ jobs:
153161
matrix:
154162
os: [Windows]
155163
python:
156-
- "3.7"
157-
# Commented out, since Windows tests are expensively slow.
158-
# - "3.8"
164+
- "3.8"
165+
# Commented out, since Windows tests are expensively slow,
166+
# only test the oldest and newest Python supported by pip
159167
# - "3.9"
160168
# - "3.10"
161-
- "3.11"
169+
# - "3.11"
170+
- "3.12"
162171
group: [1, 2]
163172

164173
steps:
165-
- uses: actions/checkout@v3
166-
- uses: actions/setup-python@v4
174+
- uses: actions/checkout@v4
175+
- uses: actions/setup-python@v5
167176
with:
168177
python-version: ${{ matrix.python }}
169178

170-
# We use a RAMDisk on Windows, since filesystem IO is a big slowdown
171-
# for our tests.
172-
- name: Create a RAMDisk
173-
run: ./tools/ci/New-RAMDisk.ps1 -Drive R -Size 1GB
174-
175-
- name: Setup RAMDisk permissions
176-
run: |
177-
mkdir R:\Temp
178-
$acl = Get-Acl "R:\Temp"
179-
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
180-
"Everyone", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow"
181-
)
182-
$acl.AddAccessRule($rule)
183-
Set-Acl "R:\Temp" $acl
184-
179+
# We use C:\Temp (which is already available on the worker)
180+
# as a temporary directory for all of the tests because the
181+
# default value (under the user dir) is more deeply nested
182+
# and causes tests to fail with "path too long" errors.
185183
- run: pip install nox
186184
env:
187-
TEMP: "R:\\Temp"
185+
TEMP: "C:\\Temp"
188186

189187
# Main check
190188
- name: Run unit tests
@@ -194,7 +192,7 @@ jobs:
194192
-m unit
195193
--verbose --numprocesses auto --showlocals
196194
env:
197-
TEMP: "R:\\Temp"
195+
TEMP: "C:\\Temp"
198196

199197
- name: Run integration tests (group 1)
200198
if: matrix.group == 1
@@ -203,7 +201,7 @@ jobs:
203201
-m integration -k "not test_install"
204202
--verbose --numprocesses auto --showlocals
205203
env:
206-
TEMP: "R:\\Temp"
204+
TEMP: "C:\\Temp"
207205

208206
- name: Run integration tests (group 2)
209207
if: matrix.group == 2
@@ -212,7 +210,7 @@ jobs:
212210
-m integration -k "test_install"
213211
--verbose --numprocesses auto --showlocals
214212
env:
215-
TEMP: "R:\\Temp"
213+
TEMP: "C:\\Temp"
216214

217215
tests-zipapp:
218216
name: tests / zipapp
@@ -224,15 +222,17 @@ jobs:
224222
github.event_name != 'pull_request'
225223
226224
steps:
227-
- uses: actions/checkout@v3
228-
- uses: actions/setup-python@v4
225+
- uses: actions/checkout@v4
226+
- uses: actions/setup-python@v5
229227
with:
230228
python-version: "3.10"
231229

232230
- name: Install Ubuntu dependencies
233-
run: sudo apt-get install bzr
231+
run: |
232+
sudo apt-get update
233+
sudo apt-get install bzr
234234
235-
- run: pip install nox 'virtualenv<20' 'setuptools != 60.6.0'
235+
- run: pip install nox
236236

237237
# Main check
238238
- name: Run integration tests

.github/workflows/lock-threads.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.repository_owner == 'pypa'
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: dessant/lock-threads@v3
20+
- uses: dessant/lock-threads@v4
2121
with:
2222
issue-inactive-days: '30'
2323
pr-inactive-days: '15'

.github/workflows/news-file.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-20.04
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
# `towncrier check` runs `git diff --name-only origin/main...`, which
1616
# needs a non-shallow clone.

.github/workflows/no-response.yml

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

.github/workflows/update-rtd-redirects.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
environment: RTD Deploys
2020
steps:
21-
- uses: actions/checkout@v3
22-
- uses: actions/setup-python@v4
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-python@v5
2323
with:
2424
python-version: "3.11"
2525
- run: pip install httpx pyyaml rich

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Hugo van Kemenade <[email protected]> hugovk <[email protected]
2727
2828
Ilya Baryshev <[email protected]>
2929
Jakub Stasiak <[email protected]>
30+
Jean Abou Samra <[email protected]>
3031
John-Scott Atlakson <[email protected]>
3132
Jorge Niedbalski <[email protected]>
3233

.pre-commit-config.yaml

Lines changed: 22 additions & 26 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.6.0
66
hooks:
77
- id: check-builtin-literals
88
- id: check-added-large-files
@@ -16,43 +16,32 @@ repos:
1616
- id: trailing-whitespace
1717
exclude: .patch
1818

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

24-
- repo: https://github.com/PyCQA/flake8
25-
rev: 6.0.0
24+
- repo: https://github.com/astral-sh/ruff-pre-commit
25+
rev: v0.4.1
2626
hooks:
27-
- id: flake8
28-
additional_dependencies: [
29-
'flake8-bugbear',
30-
'flake8-logging-format',
31-
'flake8-implicit-str-concat',
32-
]
33-
exclude: tests/data
34-
35-
- repo: https://github.com/PyCQA/isort
36-
rev: 5.12.0
37-
hooks:
38-
- id: isort
39-
files: \.py$
27+
- id: ruff
28+
args: [--fix, --exit-non-zero-on-fix]
4029

4130
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: v0.961
31+
rev: v1.9.0
4332
hooks:
4433
- id: mypy
4534
exclude: tests/data
4635
args: ["--pretty", "--show-error-codes"]
4736
additional_dependencies: [
48-
'keyring==23.0.1',
49-
'nox==2021.6.12',
37+
'keyring==24.2.0',
38+
'nox==2023.4.22',
5039
'pytest',
51-
'types-docutils==0.18.3',
52-
'types-setuptools==57.4.14',
53-
'types-freezegun==1.1.9',
54-
'types-six==1.16.15',
55-
'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',
5645
]
5746

5847
- repo: https://github.com/pre-commit/pygrep-hooks
@@ -65,6 +54,13 @@ repos:
6554
types: [file]
6655
exclude: NEWS.rst # The errors flagged in NEWS.rst are old.
6756

57+
- repo: https://github.com/codespell-project/codespell
58+
rev: v2.2.6
59+
hooks:
60+
- id: codespell
61+
exclude: AUTHORS.txt|tests/data
62+
args: ["--ignore-words", tools/codespell-ignore.txt]
63+
6864
- repo: local
6965
hooks:
7066
- id: news-fragment-filenames

0 commit comments

Comments
 (0)