landscapeio / requirements-detector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requiring packaging = "^21.0" is not compatible with black >=23.1.0

ryancausey opened this issue · comments

Found an issue when trying to update prospector to be compatible with black 23.1.0:

landscapeio/prospector#588 (closed duplicate of the following)
landscapeio/prospector#579

It looks like requirements-detector depends on packaging=^21.0, but black 23.1.0 requires packaging >=22.0. I would open a PR but it appears that poetry is not happy about this project continuing to support 3.6 when moving to packaging >=22.0.

$ poetry add "packaging=^22.0"

Updating dependencies
Resolving dependencies... (0.0s)

The current project's Python requirement (>=3.6.2,<4.0) is not compatible with some of the required packages Python requirement:
  - packaging requires Python >=3.7, so it will not be satisfied for Python >=3.6.2,<3.7

Because no versions of packaging match >22.0,<23.0
 and packaging (22.0) requires Python >=3.7, packaging is forbidden.
So, because requirements-detector depends on packaging (^22.0), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For packaging, a possible solution would be to set the `python` property to ">=3.7,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

The obvious solution is to drop python 3.6 support, but I'm not sure if there's a desire to retain python 3.6 support at this time.

I have just released version 1.1.0 which includes the PR #42 and just removed the upper bound on packaging as a dependency, so it is fine with >=21.3 now

Sorry it took forever to get around to this, live was busy for the last two months but it's up on PyPI now and thank you for the PR and investigation :-)