Skip to content

Commit 04b817c

Browse files
authored
Fix Python version inspection for pre-release (#706)
1 parent 5e26b3b commit 04b817c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
dev
22

33
- Fix to `pipx ensurepath` to fix behavior in user locales other than UTF-8, to fix #644. The internal change is to use userpath v1.6.0 or greater. (#700)
4+
- Fix virtual environment inspection for Python releases that uses an int for its release serial number. (#706)
45

56
0.16.3
67

src/pipx/venv_inspect.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ def fetch_info_in_venv(venv_python_path: Path) -> Tuple[List[str], Dict[str, str
172172
impl_ver = sys.implementation.version
173173
implementation_version = "{0.major}.{0.minor}.{0.micro}".format(impl_ver)
174174
if impl_ver.releaselevel != "final":
175-
implementation_version += impl_ver.releaselevel[0] + impl_ver.serial
175+
implementation_version = "{}{}{}".format(
176+
implementation_version,
177+
impl_ver.releaselevel[0],
178+
impl_ver.serial,
179+
)
176180
177181
sys_path = sys.path
178182
try:

0 commit comments

Comments
 (0)