-
Notifications
You must be signed in to change notification settings - Fork 2.4k
'EmptyConstraint' object has no attribute 'min' with pytest and Python 2.7 #3862
Copy link
Copy link
Closed
python-poetry/poetry-core
#155Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: macOS 11.1 Big Sur
- Poetry version: 1.1.5
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/nikmolnar/cc95e80d0cf6c9256b53294b759b3881
Issue
I've discovered a bug that arises when pytest is combined with Python ^2.7 in pyproject.toml. The Gist linked above provides a minimal example of this issue. Running poetry lock with the above file results in the following exception:
AttributeError
'EmptyConstraint' object has no attribute 'min'
The error does not appear if either pytest is removed or the Python version is changed to ^3.6. I originally reported this as part of #2372, but then realized that that issue related to error handing in response to an error in pyproject.toml. As this error occurs in a correctly-formatted pyproject.toml, I believe it is a distinct issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected