Skip to content

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

Closed

Description

Image for: Description

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

Metadata

Image for: Metadata

Metadata

Image for: 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

    Image for: Issue actions