Open JonnoFTW opened 3 years ago
This is because, according to the setup.cfg
, pika-stubs requires Python 3.8 or higher. I'm not sure if the package actually uses any functionality that's only available in 3.8, but pip won't let you install a package that says it's not compatible with your Python version.
I am using pika for Python 3.6 and while coding in PyCharm, it keeps giving me popup to install pika-stubs to "make code insight better", but I can't, since it's for 3.8+. There are multiple devs in my project and we all use PyCharm, so this would be questioned as soon as I push the pika into our requirements. I would really want to add pika-stubs to requirements too, so if that's possible, please lower the required Python version.
@blem14 this is exactly the problem I was having and why I opened this issue.
Since this issue is frozen for a couple of months, I took the liberty of doing something: https://github.com/caian-org/pika-stubs
MyPy is very strict on the package name: for a package named X, it will only accept a stub called "X-stubs". Since pika-stubs
is already published, I could only install through a wheel file. It worked for me.
@JonnoFTW @blem14 @velovix take a look and see if this helps.
I'm not sure if the package actually uses any functionality that's only available in 3.8,
Mypy supports new Python features in stubs even when running on older Python versions. And at runtime, by definition, type stubs are not used or even imported at all. So there should be no reason not to relax this restriction.
@caiertl Have you considered opening a pull request?
I have:
Running
Fails with the following error: