question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is handling of `python_version` correct?

See original GitHub issue

Currently poetry mostly treats python_version x.y as equivalent to python_full_version x.y.0, but is it necessarily so?

#!/usr/bin/env python3

from poetry.core.version.markers import parse_marker

m1 = parse_marker('python_version > "3.6"')
m2 = parse_marker('python_full_version == "3.6.2"')
allowed = m1.constraint.allows(m2.constraint)
print(allowed)

This prints True. But surely PEP508 says that the python_version at 3.6.2 is exactly 3.6, which does not satisfy m1.

related https://github.com/python-poetry/poetry/issues/2480.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dimblebycommented, May 30, 2022

You’ve probably seen that I’ve reverted the naive merging. No, I don’t have plans to implement a smarter version.

0reactions
dimblebycommented, Jun 5, 2022

Gonna call this done, it has triggered some good fixes, if there are more bugs then they can be tracked as they are found

Read more comments on GitHub >

github_iconTop Results From Across the Web

The right and wrong way to set Python 3 as default on a Mac
The right and wrong way to set Python 3 as default on a Mac. There are several ways to get started with Python...
Read more >
Managing Multiple Python Versions With pyenv
pyenv is a wonderful tool for managing multiple Python versions. ... activating the correct Python versions and the correct virtual environments.
Read more >
How to ensure I use the correct python version when I have ...
Having multiple versions on the same machine is perfectly "okay", as long as you understand how to select/use the correct python version, ...
Read more >
How to manage multiple Python versions and virtual ...
If you wish to use multiple versions of Python on a single machine, then pyenv is a commonly used tool to install and...
Read more >
5 Best Practices for Versioning Your Python Packages
Versioning in Python is tricky due to its range of complex versioning schemes. Follow these best practices to speed up the development ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found