Skip to content

Commit 2748dce

Browse files
authored
Fix Pyston tags (#16972)
This was discovered by #16074, where the wrong tag now fails the Pyston integration test. I'm not sure what the exact schema of the cache tag is, but since the project is dead, I don't expect any new non-matching versions to follow.
1 parent 2abe56a commit 2748dce

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/uv-python/python/get_interpreter_info.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ def format_full_version(info):
4646
r"\1.\2",
4747
sys.implementation.cache_tag,
4848
)
49+
elif implementation_name == "pyston":
50+
# Pyston reports the CPython version as sys.implementation.version,
51+
# so we need to discover the Pyston version from the cache_tag
52+
import re
53+
54+
implementation_version = re.sub(
55+
r"pyston-(\d)(\d+)",
56+
r"\1.\2",
57+
sys.implementation.cache_tag,
58+
)
4959
else:
5060
implementation_version = format_full_version(sys.implementation.version)
5161
else:

0 commit comments

Comments
 (0)