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:
https://github.com/python-poetry/poetry-core/blob/2.1.1/src/poetry/core/constraints/version/parser.py#L248-L251
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.
Description
A Python module with
Requires-Python: ==3.*,>=3.8.0is in my lock-space.Running
poetry lockgives me the following message and quits instead of producing a lockfile:Invalid marker for 'python_full_version': <4.dev0Minimum repro:
Workarounds
Commenting out the following in
poetry.core.constraints.version.parser._make_x_constraint_range:https://github.com/python-poetry/poetry-core/blob/2.1.1/src/poetry/core/constraints/version/parser.py#L248-L251
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
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log