]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] 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:13:17 +0000 (22:13 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Mar 2026 21:13:17 +0000 (21:13 +0000)
commitb4a0c8defeaec40942dbc8a4a56fe926468fac45
treeb168147cf54678ed64b634ab81ee19efb3bde399
parent70affe0dc74e6679aa20889373d409208abb8b3d
[3.14] gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357) (#146534)

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]