Skip to content

Commit 0668050

Browse files
committed
Merge branch 'main' into release/23.3.2
2 parents 0e2bd74 + 417ca92 commit 0668050

Some content is hidden

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

80 files changed

+275
-389
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,26 @@ repos:
2222
- id: black
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.0.292
25+
rev: v0.1.4
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.6.1
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

docs/html/cli/pip_install.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ 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).
5252
4. A requirement, as specified in :pep:`440`.

docs/html/topics/configuration.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,24 @@ and how they are related to pip's various command line options.
1919

2020
## Configuration Files
2121

22-
Configuration files can change the default values for command line option.
23-
They are written using a standard INI style configuration files.
22+
Configuration files can change the default values for command line options.
23+
The files are written using standard INI format.
2424

2525
pip has 3 "levels" of configuration files:
2626

2727
- `global`: system-wide configuration file, shared across users.
2828
- `user`: per-user configuration file.
2929
- `site`: per-environment configuration file; i.e. per-virtualenv.
3030

31+
Additionally, environment variables can be specified which will override any of the above.
32+
3133
### Location
3234

3335
pip's configuration files are located in fairly standard locations. This
3436
location is different on different operating systems, and has some additional
35-
complexity for backwards compatibility reasons.
37+
complexity for backwards compatibility reasons. Note that if user config files
38+
exist in both the legacy and current locations, values in the current file
39+
will override values in the legacy file.
3640

3741
```{tab} Unix
3842
@@ -88,9 +92,10 @@ Site
8892
### `PIP_CONFIG_FILE`
8993

9094
Additionally, the environment variable `PIP_CONFIG_FILE` can be used to specify
91-
a configuration file that's loaded first, and whose values are overridden by
92-
the values set in the aforementioned files. Setting this to {any}`os.devnull`
93-
disables the loading of _all_ configuration files.
95+
a configuration file that's loaded last, and whose values override the values
96+
set in the aforementioned files. Setting this to {any}`os.devnull`
97+
disables the loading of _all_ configuration files. Note that if a file exists
98+
at the location that this is set to, the user config file will not be loaded.
9499

95100
(config-precedence)=
96101

@@ -99,10 +104,10 @@ disables the loading of _all_ configuration files.
99104
When multiple configuration files are found, pip combines them in the following
100105
order:
101106

102-
- `PIP_CONFIG_FILE`, if given.
103107
- Global
104108
- User
105109
- Site
110+
- `PIP_CONFIG_FILE`, if given.
106111

107112
Each file read overrides any values read from previous files, so if the
108113
global timeout is specified in both the global file and the per-user file

docs/pip_sphinxext.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,22 +194,17 @@ def process_options(self) -> None:
194194
opt = option()
195195
opt_name = opt._long_opts[0]
196196
if opt._short_opts:
197-
short_opt_name = "{}, ".format(opt._short_opts[0])
197+
short_opt_name = f"{opt._short_opts[0]}, "
198198
else:
199199
short_opt_name = ""
200200

201201
if option in cmdoptions.general_group["options"]:
202202
prefix = ""
203203
else:
204-
prefix = "{}_".format(self.determine_opt_prefix(opt_name))
204+
prefix = f"{self.determine_opt_prefix(opt_name)}_"
205205

206206
self.view_list.append(
207-
"* :ref:`{short}{long}<{prefix}{opt_name}>`".format(
208-
short=short_opt_name,
209-
long=opt_name,
210-
prefix=prefix,
211-
opt_name=opt_name,
212-
),
207+
f"* :ref:`{short_opt_name}{opt_name}<{prefix}{opt_name}>`",
213208
"\n",
214209
)
215210

news/11815.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix explanation of how PIP_CONFIG_FILE works

news/12372.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug in extras handling for link requirements

news/12389.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update mypy to 1.6.1 and fix/ignore types

news/12390.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update ruff versions and config for dev

news/12393.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enforce and update code to use f-strings via Ruff rule UP032

news/12417.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix outdated pip install argument description in documentation.

0 commit comments

Comments
 (0)