-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
python-poetry/poetry-core
#853Labels
area/coreRelated to the poetry-core libraryRelated to the poetry-core librarykind/bugSomething isn't working as expectedSomething isn't working as expected
Description
Description
A Python module with Requires-Python: ==3.*,>=3.8.0 is in my lock-space.
Running poetry lock gives me the following message and quits instead of producing a lockfile:
Invalid marker for 'python_full_version': <4.dev0
Minimum repro:
from poetry.core.constraints.version.parser import parse_constraint
constraint = parse_constraint("==3.*,>=3.8.0")
from poetry.core.version.markers import SingleMarker
SingleMarker("python_full_version", constraint.min)
SingleMarker("python_full_version", constraint.max)poetry.core.constraints.version.exceptions.ParseConstraintError: Could not parse version constraint: 4.dev0.0
...
poetry.core.version.markers.InvalidMarkerError: Invalid marker for 'python_full_version': 4.dev0
Workarounds
Commenting out the following in poetry.core.constraints.version.parser._make_x_constraint_range:
if not is_marker_constraint:
_min = _min.first_devrelease()
if not _max.is_devrelease():
_max = _max.first_devrelease()Not much of a workaround really.
Poetry Installation Method
pipx
Operating System
--
Poetry Version
Poetry (version 2.1.1)
Poetry Configuration
--Python Sysconfig
sysconfig.log
Paste the output of 'python -m sysconfig', over this line.
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
Paste the output of 'poetry -vvv <command>', over this line.
Metadata
Metadata
Assignees
Labels
area/coreRelated to the poetry-core libraryRelated to the poetry-core librarykind/bugSomething isn't working as expectedSomething isn't working as expected