Skip to content

'EmptyConstraint' object has no attribute 'min' with pytest and Python 2.7 #3862

@nikmolnar

Description

@nikmolnar
  • 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 (-vvv option).

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions