Skip to content

Commit 25bc54b

Browse files
authored
Merge branch 'main' into fix-extras
2 parents a771dde + 915976c commit 25bc54b

File tree

6 files changed

+24
-13
lines changed

6 files changed

+24
-13
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-22.04
2929

3030
steps:
31-
- uses: actions/checkout@v5
31+
- uses: actions/checkout@v6
3232
- uses: actions/setup-python@v6
3333
with:
3434
python-version: "3.x"
@@ -70,7 +70,7 @@ jobs:
7070
os: [ubuntu-22.04, windows-latest]
7171

7272
steps:
73-
- uses: actions/checkout@v5
73+
- uses: actions/checkout@v6
7474
- uses: actions/setup-python@v6
7575
with:
7676
python-version: "3.x"
@@ -94,7 +94,7 @@ jobs:
9494
github.event_name != 'pull_request'
9595
9696
steps:
97-
- uses: actions/checkout@v5
97+
- uses: actions/checkout@v6
9898
- uses: actions/setup-python@v6
9999
with:
100100
python-version: "3.x"
@@ -125,7 +125,7 @@ jobs:
125125
- "3.14"
126126

127127
steps:
128-
- uses: actions/checkout@v5
128+
- uses: actions/checkout@v6
129129
- uses: actions/setup-python@v6
130130
with:
131131
python-version: ${{ matrix.python }}
@@ -195,7 +195,7 @@ jobs:
195195
mkdir "D:\\Temp"
196196
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
197197
198-
- uses: actions/checkout@v5
198+
- uses: actions/checkout@v6
199199
- uses: actions/setup-python@v6
200200
with:
201201
python-version: ${{ matrix.python }}
@@ -236,7 +236,7 @@ jobs:
236236
github.event_name != 'pull_request'
237237
238238
steps:
239-
- uses: actions/checkout@v5
239+
- uses: actions/checkout@v6
240240
- uses: actions/setup-python@v6
241241
with:
242242
python-version: "3.10"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
14+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1515
with:
1616
persist-credentials: false
1717
- name: Build a binary wheel and a source tarball

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
environment: RTD Deploys
2323
steps:
24-
- uses: actions/checkout@v5
24+
- uses: actions/checkout@v6
2525
- uses: actions/setup-python@v6
2626
with:
2727
python-version: "3.11"

docs/html/topics/https-certificates.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ allow users to specify a different certificate store/bundle for pip to use. It
1717
is also possible to use `REQUESTS_CA_BUNDLE` or `CURL_CA_BUNDLE` environment
1818
variables.
1919

20+
If you need a specific certificate bundle, you can download the
21+
[Mozilla CA bundle provided by the curl project](https://curl.se/docs/caextract.html).
22+
2023
## Using system certificate stores
2124

2225
```{versionadded} 24.2

news/13660.feature.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
When using the ``importlib.metadata`` backend, pip skips redundant work
2+
converting version objects to strings and back to version objects.

src/pip/_internal/index/package_finder.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from pip._vendor.packaging import specifiers
1919
from pip._vendor.packaging.tags import Tag
2020
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
21-
from pip._vendor.packaging.version import InvalidVersion, _BaseVersion
21+
from pip._vendor.packaging.version import InvalidVersion, Version, _BaseVersion
2222
from pip._vendor.packaging.version import parse as parse_version
2323

2424
from pip._internal.exceptions import (
@@ -28,6 +28,7 @@
2828
UnsupportedWheel,
2929
)
3030
from pip._internal.index.collector import LinkCollector, parse_links
31+
from pip._internal.metadata import select_backend
3132
from pip._internal.models.candidate import InstallationCandidate
3233
from pip._internal.models.format_control import FormatControl
3334
from pip._internal.models.link import Link
@@ -458,14 +459,19 @@ def get_applicable_candidates(
458459
allow_prereleases = self._allow_all_prereleases or None
459460
specifier = self._specifier
460461

461-
# We turn the version object into a str here because otherwise
462-
# when we're debundled but setuptools isn't, Python will see
463-
# packaging.version.Version and
462+
# When using the pkg_resources backend we turn the version object into
463+
# a str here because otherwise when we're debundled but setuptools isn't,
464+
# Python will see packaging.version.Version and
464465
# pkg_resources._vendor.packaging.version.Version as different
465466
# types. This way we'll use a str as a common data interchange
466467
# format. If we stop using the pkg_resources provided specifier
467468
# and start using our own, we can drop the cast to str().
468-
candidates_and_versions = [(c, str(c.version)) for c in candidates]
469+
if select_backend().NAME == "pkg_resources":
470+
candidates_and_versions: list[
471+
tuple[InstallationCandidate, str | Version]
472+
] = [(c, str(c.version)) for c in candidates]
473+
else:
474+
candidates_and_versions = [(c, c.version) for c in candidates]
469475
versions = set(
470476
specifier.filter(
471477
(v for _, v in candidates_and_versions),

0 commit comments

Comments
 (0)