Skip to content

Future Python versions might be problematic with the definition of Environment Marker Variable python_version #560

Description

@finefoot

There might be a problem with

- ``platform.python_version()[:3]``

in the future.

What if the Python version will consist of more than 3 characters?

I originally posted this as a question on Stack Overflow https://stackoverflow.com/questions/48119291/whats-with-the-definition-of-environment-marker-variable-python-version-in-pe Just as Martijn Pieters wrote there, something like ".".join(platform.python_version_tuple()[:2]) would fix the problem.

I also posted about this at pypa/packaging#119

Activity

  1. ncoghlan commented on Jan 28, 2018

    @ncoghlan
    Contributor

    Posted to distutils-sig here: https://mail.python.org/pipermail/distutils-sig/2018-January/031920.html

    (I don't expect anyone to object to that plan, but I'll give folks some time to comment before making the change)

  2. brettcannon commented on Feb 1, 2018

    @brettcannon
    Member

    @emmi474 I would say the mailing list would be the best place to start the conversation and then once the solution was agreed upon, then update the PEP.

  3. ncoghlan commented on Feb 2, 2018

    @ncoghlan
    Contributor

    My distutils-sig post didn't generate any objections, so I think the next step would be a PR against PEP 508 to make the change I describe in my post: make the change, and then add a PEP 440 style errata section stating the change that was made and and briefly explaining why (i.e. future-proofing against the possibility of a 3.10 release).

  4. added a commit that references this issue on Jul 18, 2019
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