python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.53k stars 2.27k forks source link

Poetry 1.2.0a2 fails to add `datatest` package #4546

Closed ajhynes7 closed 3 years ago

ajhynes7 commented 3 years ago

Issue

Hello, I'm unsure if this issue belongs here or in the Python package in question, so I'm starting here first.

I'm trying out Poetry 1.2.0a2, and getting a failure when I attempt to install datatest. This is in a minimal project created by poetry init with no other dependencies.

$ poetry --version
Poetry (version 1.2.0a2)

$ poetry add datatest
Using version ^0.11.1 for datatest

Updating dependencies
Resolving dependencies... (0.0s)

  InvalidVersion

  Invalid PEP 440 version: '2.6.'

  The following error occurred when trying to handle this error:

  ...

  ValueError

  Could not parse version constraint: >=2.6.*

I found this in the setup.py of the datatest repo:

python_requires='>=2.6.*, !=3.0.*, !=3.1.*',

So I think that >=2.6.* is incorrect syntax, and it should be >=2.6. But this package is able to be installed when using poetry 1.1.10. So I'm not sure if this has to be fixed in datatest or in poetry.

finswimmer commented 3 years ago

Hello @ajhynes7,

as you guessed >=2.6.* is wrong. But because pip doesn't reject it by accident and fixing it there will take a long time (see: https://discuss.python.org/t/pep-440-wildcard-usage-in-comparison-clause/10045) we decided to work around it. This workaround is already in master (https://github.com/python-poetry/poetry-core/pull/186) but not released yet.

fin swimmer

Relates to https://github.com/python-poetry/poetry/issues/4176

ajhynes7 commented 3 years ago

Ok, thank you!

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.