realpython / pytest-mypy

Mypy static type checker plugin for Pytest
https://pypi.org/project/pytest-mypy/
MIT License
248 stars 32 forks source link

Cannot install using poetry due to python version constraint #88

Closed insertjokehere closed 4 years ago

insertjokehere commented 4 years ago

Hi,

I'm trying to add pytest-mypy to an existing project that manages its dependencies using Poetry. The project is using Python 3.8, so I would expect pytest-mypy to be compatible (based on the classifiers in setup.py), but install fails with:

[SolverProblemError]
The current project's Python requirement (>=3.8) is not compatible with some of the required packages Python requirement:
  - pytest-mypy requires Python ~=3.4

Because pytest-mypy (0.6.2) requires Python ~=3.4
 and no versions of pytest-mypy match >0.6.2,<0.7.0, pytest-mypy is forbidden.

I think this is caused by the python_requires specification in setup.py - Poetry interprets ~=3.4 to mean that the package is compatible with python >=3.4.0, <3.5.0. Should this be >=3.4 instead?