-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
python-poetry/poetry-core
#324Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- I am on the latest Poetry version.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
Clarifies in-depth the common root-cause for several reported issues
#3444
#4959
#4958
- OS version and name: Linux
- Poetry version: 1.2.0a2
- Python 3.8
Issue
poetry fails to parse python constraints when markers appear.
This should be supported as per the official documentation.
This also has a side effect on the performance and the lock file, as this way packages bypass early compatibility checks on versions; also wrong versions may get installed.
Reproduce
The following test confirms that poetry does not populate python constraints due to markers
[tool.poetry.dependencies]
python = "3.8"
pandas = [
{version="1.3.2",python="3.9",markers="sys_platform=='linux'"},
{version="1.3.1",python="3.8"}
]
then setting a breakpoint inside complete_package method gives
# [(d.name+str(d._constraint),d._python_constraint) for d in requires]
[('pandas1.3.2', <VersionRange (*)>), ('pandas1.3.1', <Version 3.8>)]
Furthermore, due to the broken constraint poetry would pick up the wrong (1.3.2) version to install.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected