Skip to content

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

@finefoot

Description

@finefoot

There might be a problem with

"python_version": platform.python_version()[:3],
in the future.

The line is using the definition of the Environment Marker Variable python_version according to PEP 508. But 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 guess, the PEP would have to be changed first?

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