]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 27 Mar 2026 21:10:44 +0000 (22:10 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Mar 2026 21:10:44 +0000 (21:10 +0000)
commit78b8716af67abd9c71879c196126e41e6142083e
tree750ba18501c711b685253600bb45965351540902
parentb0fab92039179bcfdc46ceca11b5e62a2872abcb
[3.13] gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357) (#146535)

gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357)

Path('') resolves to CWD, so an empty WHEEL_PKG_DIR string caused
ensurepip to search the current working directory for wheel files.
Add a truthiness check to treat empty strings the same as None.
(cherry picked from commit 73cc1fd4f45b4daf2b2f9a6be69148775c7c2bff)

Co-authored-by: Imgyu Kim <kimimgo@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/ensurepip/__init__.py
Lib/test/test_ensurepip.py
Misc/NEWS.d/next/Library/2026-03-24-03-49-50.gh-issue-146310.WhlDir.rst [new file with mode: 0644]