closes: #103872
xref: https://github.com/pypa/pip/pull/12000
<!-- gh-issue-number: gh-103872 -->
* Issue: gh-103872 <!-- /gh-issue-number -->
---------
Co-authored-by: blurb-it[bot]
<43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 438b811761)
<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.
# Pull Request title
It should be in the following format:
```
gh-NNNNN: Summary of the changes made
```
Where: gh-NNNNN refers to the GitHub issue number.
Most PRs will require an issue number. Trivial changes, like fixing a
typo, do not need an issue.
# Backport Pull Request title
If this is a backport PR (PR made against branches other than `main`),
please ensure that the PR title is in the following format:
```
[X.Y] <title from the original PR> (GH-NNNN)
```
Where: [X.Y] is the branch name, e.g. [3.6].
GH-NNNN refers to the PR number from `main`.
-->