cpython/Lib/ensurepip
Miss Islington (bot) 78b8716af6
[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 73cc1fd4f4)

Co-authored-by: Imgyu Kim <kimimgo@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 21:10:44 +00:00
..
_bundled [3.13] gh-144538: Upgrade bundled pip to 26.0.1 (gh-144556) (#144561) 2026-02-07 14:22:54 +02:00
__init__.py [3.13] gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357) (#146535) 2026-03-27 21:10:44 +00:00
__main__.py bpo-31351: Set return code in ensurepip when pip fails (GH-3626) 2017-09-21 20:07:45 +10:00
_uninstall.py bpo-31351: Set return code in ensurepip when pip fails (GH-3626) 2017-09-21 20:07:45 +10:00