Skip to content

[poetry-core] intersection of markers not recognized as empty #4694

@radoering

Description

@radoering
  • 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).
  • OS version and name: any
  • Poetry version: current master
  • Link of a Gist with the contents of your pyproject.toml file: not applicable

Issue

The intersection of multi markers and marker unions is not recognized as empty for some cases. E.g., the following intersections which are empty are not recognized as empty:

  • 'python_version == "3.7"' and 'python_version < "3.7" or python_version >= "3.8"'
  • python_version >= "2" and python_version < "3" and python_version < "2" or python_version >= "3"

This can lead to the execution of unnecessary or even wrong paths in the program flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreRelated to the poetry-core librarykind/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