Skip to content

Current PY_VERSION 3.10.0a7+ does not conform to PEP 440 #88166

Closed

Description

@jouve
mannequin
BPO 44000
Nosy @ned-deily, @ambv, @JelleZijlstra, @jouve, @pablogsal

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 = None
closed_at = <Date 2021-05-01.17:59:25.275>
created_at = <Date 2021-05-01.17:06:30.701>
labels = []
title = 'Current PY_VERSION 3.10.0a7+ does not conform to PEP 440'
updated_at = <Date 2021-05-01.17:59:25.275>
user = 'https://github.com/jouve'

bugs.python.org fields:

activity = <Date 2021-05-01.17:59:25.275>
actor = 'Cyril Jouve'
assignee = 'none'
closed = True
closed_date = <Date 2021-05-01.17:59:25.275>
closer = 'Cyril Jouve'
components = []
creation = <Date 2021-05-01.17:06:30.701>
creator = 'Cyril Jouve'
dependencies = []
files = []
hgrepos = []
issue_num = 44000
keywords = []
message_count = 3.0
messages = ['392607', '392609', '392613']
nosy_count = 5.0
nosy_names = ['ned.deily', 'lukasz.langa', 'JelleZijlstra', 'Cyril Jouve', 'pablogsal']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue44000'
versions = []

Activity

  1. jouve commented on May 1, 2021

    jouvemannequin
    MannequinAuthor

    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

  2. JelleZijlstra commented on May 1, 2021

    @JelleZijlstra
    Member

    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.

  3. jouve commented on May 1, 2021

    jouvemannequin
    MannequinAuthor

    sure, I'll raise the issue with poetry then.

  4. transferred this issue fromon Apr 10, 2022
  5. radoering commented on Nov 4, 2022

    @radoering

    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 508 python_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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions