Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip install fails #1

Open
JonnoFTW opened this issue Nov 16, 2020 · 5 comments · Fixed by baodrate/types-pika#2 · May be fixed by #5
Open

Pip install fails #1

JonnoFTW opened this issue Nov 16, 2020 · 5 comments · Fixed by baodrate/types-pika#2 · May be fixed by #5

Comments

@JonnoFTW
Copy link

I have:

  • python 3.7.7
  • pip 20.2.4

Running

pip install pika-stubs

Fails with the following error:

$ pip install pika-stubs
ERROR: Could not find a version that satisfies the requirement pika-stubs (from versions: none)
ERROR: No matching distribution found for pika-stubs

@velovix
Copy link

velovix commented Nov 16, 2020

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.

@blem14
Copy link

blem14 commented Mar 24, 2021

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.

@JonnoFTW
Copy link
Author

@blem14 this is exactly the problem I was having and why I opened this issue.

@upsetbit
Copy link

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.

@andersk
Copy link

andersk commented Aug 2, 2021

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?

andersk added a commit to andersk/pika-stubs that referenced this issue Aug 10, 2021
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 is no reason to restrict the
Python version.

Fixes hahow#1.

Signed-off-by: Anders Kaseorg <[email protected]>
andersk added a commit to andersk/pika-stubs that referenced this issue Aug 10, 2021
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 is no reason to restrict the
Python version.

Fixes hahow#1.

Signed-off-by: Anders Kaseorg <[email protected]>
@andersk andersk linked a pull request Aug 10, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants