You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Current PY_VERSION 3.10.0a7+ does not conform to PEP 440 #88166
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-05-01.17:59:25.275>created_at=<Date2021-05-01.17:06:30.701>labels= []
title='Current PY_VERSION 3.10.0a7+ does not conform to PEP 440'updated_at=<Date2021-05-01.17:59:25.275>user='https://github.com/jouve'
PEP-440 applies to Python packages, not to CPython itself. The "+" convention has been used in CPython for a long time, and changing it without a strong justification seems risky.
The "+" convention has been used in CPython for a long time, and changing it without a strong justification seems risky.
It might not be a strong justification but at least an argument:
According to PEP 508python_full_version is equal to platform.python_version(). Although I could not find a direct reference, the sample values for python_full_version in PEP 508 seem to indicate that it should be PEP 440 compliant.
However, there is an escape hatch for non-compliant versions:
The <version_cmp> operators use the PEP 440 version comparison rules when those are defined (that is when both sides have a valid version specifier). If there is no defined PEP 440 behaviour and the operator exists in Python, then the operator falls back to the Python behaviour.
So far, so good.
However, if I'm right that implies a marker like python_full_version >= "3.9.0" is fulfilled for Python 3.10.0, but not for Python 3.10.0+. (IIUC, a version comparison should be used for the first one and a string comparison for the second one.)
Activity
jouve commentedon May 1, 2021
It was changed from 3.10.0a7 to 3.10.0a7+ in
04eecf7
According to https://www.python.org/dev/peps/pep-0440/#public-version-identifiers, it should be something like 3.10.0a7.post1
or with https://www.python.org/dev/peps/pep-0440/#local-version-identifiers, it should be something like 3.10.0a7+post
see also implementation in packaging: https://github.com/pypa/packaging/blob/main/packaging/version.py#L225
JelleZijlstra commentedon May 1, 2021
PEP-440 applies to Python packages, not to CPython itself. The "+" convention has been used in CPython for a long time, and changing it without a strong justification seems risky.
jouve commentedon May 1, 2021
sure, I'll raise the issue with poetry then.
radoering commentedon Nov 4, 2022
It might not be a strong justification but at least an argument:
According to PEP 508
python_full_versionis equal toplatform.python_version(). Although I could not find a direct reference, the sample values forpython_full_versionin PEP 508 seem to indicate that it should be PEP 440 compliant.However, there is an escape hatch for non-compliant versions:
So far, so good.
However, if I'm right that implies a marker like
python_full_version >= "3.9.0"is fulfilled for Python 3.10.0, but not for Python 3.10.0+. (IIUC, a version comparison should be used for the first one and a string comparison for the second one.)