Replies: 2 comments 1 reply
-
What makes the situation even worse is that I used the Basically by installing I know that this was a side-effect of the decision of pyenv to prevent having generic "X.Y" versions, without minor version being listed. |
Beta Was this translation helpful? Give feedback.
-
We do not (purposefully) touch anything about Python's reported version name. The "3.11.1+" comes from CPython's built-in logic, specifically, for 3.11 as of now, from https://github.com/python/cpython/blob/8cf8a6820e3fa885ac6159b8002f5e8d7834ca83/Include/patchlevel.h#L26 . For this reason, I think it's not designed to be parsed as you've tried to. To my knowledge, "+" after a release number is a more-or-less standard way to designate a post-release development branch. |
Beta Was this translation helpful? Give feedback.
-
When installing devel builds using such
pyenv install 3.11-dev
, you endup with a python installation that has a version string that cannot be evaluated as a Version.This breaks PEP-508 by bringing this invalid string into
python_full_version
field, which can be used even inside package metadata.As a side effect of this, packages might fail to correctly evaluate environment markers or even break tools like pdm.
AFAIK, this is unlikely to be fixable by packages involved, primary
packaging
, as the specification (final since 2015) is very clear regarding the fact thatpython_full_version
is loaded directly from the output ofplatform.python_version()
.Shortly, the only way to avoid having a broken python installation from source, is to ensure that
platform.python_version()
returns a valid version string, one that can be loaded byVersion()
.Beta Was this translation helpful? Give feedback.
All reactions