Skip to content

Commit 823f88e

Browse files
authored
Merge branch 'main' into fix/powershell-arg-completion
2 parents 783a467 + 81b3c05 commit 823f88e

File tree

12 files changed

+49
-17
lines changed

12 files changed

+49
-17
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- uses: actions/checkout@v5
32-
- uses: actions/setup-python@v5
32+
- uses: actions/setup-python@v6
3333
with:
3434
python-version: "3.x"
3535
- run: pip install nox
@@ -71,7 +71,7 @@ jobs:
7171

7272
steps:
7373
- uses: actions/checkout@v5
74-
- uses: actions/setup-python@v5
74+
- uses: actions/setup-python@v6
7575
with:
7676
python-version: "3.x"
7777
- name: Set up git credentials
@@ -95,7 +95,7 @@ jobs:
9595
9696
steps:
9797
- uses: actions/checkout@v5
98-
- uses: actions/setup-python@v5
98+
- uses: actions/setup-python@v6
9999
with:
100100
python-version: "3.x"
101101

@@ -126,7 +126,7 @@ jobs:
126126

127127
steps:
128128
- uses: actions/checkout@v5
129-
- uses: actions/setup-python@v5
129+
- uses: actions/setup-python@v6
130130
with:
131131
python-version: ${{ matrix.python }}
132132
allow-prereleases: true
@@ -196,7 +196,7 @@ jobs:
196196
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
197197
198198
- uses: actions/checkout@v5
199-
- uses: actions/setup-python@v5
199+
- uses: actions/setup-python@v6
200200
with:
201201
python-version: ${{ matrix.python }}
202202
allow-prereleases: true
@@ -231,7 +231,7 @@ jobs:
231231
232232
steps:
233233
- uses: actions/checkout@v5
234-
- uses: actions/setup-python@v5
234+
- uses: actions/setup-python@v6
235235
with:
236236
python-version: "3.10"
237237

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
name: python-package-distributions
4242
path: dist/
4343
- name: Publish distribution 📦 to PyPI
44-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1
44+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
environment: RTD Deploys
2323
steps:
2424
- uses: actions/checkout@v5
25-
- uses: actions/setup-python@v5
25+
- uses: actions/setup-python@v6
2626
with:
2727
python-version: "3.11"
2828
- run: pipx run tools/update-rtd-redirects.py

.pre-commit-config.yaml

Lines changed: 2 additions & 2 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: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-builtin-literals
88
- id: check-added-large-files
@@ -22,7 +22,7 @@ repos:
2222
- id: black
2323

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

news/13443.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Handle malformed ``Version`` metadata entries and
2+
show a sensible error message instead of crashing.

news/13523.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Permit spaces between a filepath and extras in an install requirement.

news/13548.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix regression in configuration parsing that was turning a single value
2+
into a list and thus leading to a validation error.

src/pip/_internal/cli/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ def _get_ordered_configuration_items(
203203
if section in override_order:
204204
section_items[section].append((key, val))
205205

206-
# Yield each group in their override order
207-
for section in override_order:
208-
yield from section_items[section]
206+
# Yield each group in their override order
207+
for section in override_order:
208+
yield from section_items[section]
209209

210210
def _update_defaults(self, defaults: dict[str, Any]) -> dict[str, Any]:
211211
"""Updates the given defaults with values from the config files and

src/pip/_internal/metadata/importlib/_dists.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file
2929

3030
from ._compat import (
31+
BadMetadata,
3132
BasePath,
3233
get_dist_canonical_name,
3334
parse_name_and_version_from_info_directory,
@@ -165,9 +166,14 @@ def canonical_name(self) -> NormalizedName:
165166

166167
@property
167168
def version(self) -> Version:
168-
if version := parse_name_and_version_from_info_directory(self._dist)[1]:
169+
try:
170+
version = (
171+
parse_name_and_version_from_info_directory(self._dist)[1]
172+
or self._dist.version
173+
)
169174
return parse_version(version)
170-
return parse_version(self._dist.version)
175+
except TypeError:
176+
raise BadMetadata(self._dist, reason="invalid metadata entry `version`")
171177

172178
@property
173179
def raw_version(self) -> str:

src/pip/_internal/req/constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _strip_extras(path: str) -> tuple[str, str | None]:
4747
m = re.match(r"^(.+)(\[[^\]]+\])$", path)
4848
extras = None
4949
if m:
50-
path_no_extras = m.group(1)
50+
path_no_extras = m.group(1).rstrip()
5151
extras = m.group(2)
5252
else:
5353
path_no_extras = path

0 commit comments

Comments
 (0)