Skip to content

Fix free-threaded version parsing - #67

Merged
jag250 merged 5 commits into
mainfrom
fix/freethreaded-version-parsing
Oct 26, 2026
Merged

jag250 merged 5 commits into
mainfrom
fix/freethreaded-version-parsing

Conversation

@jag250

@jag250 jag250 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

A python version with a two-digit patch version like 3.14.10t would get its suffix matched as .1 and 0t instead of .10 and t as intended. This simplifies the regex but does make it more accepting, so I'm looking for opinions on whether this is the correct approach,

@jag250
jag250 requested review from thatch and zsimic October 26, 2026 21:19
Comment thread tests/test_pyenv.py Outdated

@pytest.mark.parametrize("prefix", ["", "py", "python", "cpython:"])
@pytest.mark.parametrize("version", ["3.14.9", "3.14.10", "3.14.100", "3.14.10rc1", "3.14.10.post1", "3.14.10+local"])
@pytest.mark.parametrize(("freethreading", "is_min_spec"), [(False, False), (False, True), (True, False), (True, True)])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_min_spec is incorrect here... A python spec should be considered "min spec" only if one states something like 3.10+ - a 3.14.10+local is NOT a min spec, it is an invalid spec

All those versions are otherwise valid-ish, but weird (a python spec would never be 3.14.10.post1 for example, it's not a python package... but one could argue "technically correct"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, I'll make it stricter again

@zsimic zsimic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!!

@jag250
jag250 merged commit 7d216ef into main Oct 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants