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

Protobuf 3.20.1 wheel built for but does not support Python 3.6 #10070

Closed
cliffwoolley opened this issue May 27, 2022 · 9 comments
Closed

Protobuf 3.20.1 wheel built for but does not support Python 3.6 #10070

cliffwoolley opened this issue May 27, 2022 · 9 comments
Assignees
Labels

Comments

@cliffwoolley
Copy link

cliffwoolley commented May 27, 2022

What version of protobuf and what language are you using?
Version: 3.20.1
Language: Python 3.6

What operating system (Linux, Windows, ...) and version?
Linux

What did you do?
pip install -v protobuf==3.20.1

What did you expect to see
https://pypi.org/project/protobuf/3.20.1/#files shows that Python 3.6 wheels exist, e.g. https://files.pythonhosted.org/packages/ad/ec/aff2fe72ab434f20b139277df186516a3ab12545b1382839666c7425ecb5/protobuf-3.20.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl , so it should be installable.

What did you see instead?
While wheels with -cp36- in the name exist and are published, their metadata shows requires-python: >=3.7, meaning that pip will confusingly refuse to install (or even list) them:

  Link requires a different Python (3.6.9 not in: '>=3.7'): https://files.pythonhosted.org/packages/ad/ec/aff2fe72ab434f20b139277df186516a3ab12545b1382839666c7425ecb5/protobuf-3.20.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl#sha256=097c5d8a9808302fb0da7e20edf0b8d4703274d140fd25c5edabddcde43e081f (from https://pypi.org/simple/protobuf/) (requires-python:>=3.7)
  Link requires a different Python (3.6.9 not in: '>=3.7'): https://files.pythonhosted.org/packages/ef/c8/2e7f7feaf804b7206e6cc8fa3f0f49834a78f7cb127813d2c45e42d5f7bf/protobuf-3.20.1-py2.py3-none-any.whl#sha256=adfc6cf69c7f8c50fd24c793964eef18f0ac321315439d94945820612849c388 (from https://pypi.org/simple/protobuf/) (requires-python:>=3.7)
  Link requires a different Python (3.6.9 not in: '>=3.7'): https://files.pythonhosted.org/packages/19/96/1283259c25bc48a6df98fa096f66fc568b40137b93806ef5ff66a2d166b1/protobuf-3.20.1.tar.gz#sha256=adc31566d027f45efe3f44eeb5b1f329da43891634d61c75a5944e9be6dd42c9 (from https://pypi.org/simple/protobuf/) (requires-python:>=3.7)
ERROR: Could not find a version that satisfies the requirement protobuf==3.20.1 (from versions: 2.0.0b0, 2.0.3, 2.3.0, 2.4.1, 2.5.0, 2.6.0, 2.6.1, 3.0.0a2, 3.0.0a3, 3.0.0b1, 3.0.0b1.post1, 3.0.0b1.post2, 3.0.0b2, 3.0.0b2.post1, 3.0.0b2.post2, 3.0.0b3, 3.0.0b4, 3.0.0, 3.1.0, 3.1.0.post1, 3.2.0rc1, 3.2.0rc1.post1, 3.2.0rc2, 3.2.0, 3.3.0, 3.4.0, 3.5.0.post1, 3.5.1, 3.5.2, 3.5.2.post1, 3.6.0, 3.6.1, 3.7.0rc2, 3.7.0rc3, 3.7.0, 3.7.1, 3.8.0rc1, 3.8.0, 3.9.0rc1, 3.9.0, 3.9.1, 3.9.2, 3.10.0rc1, 3.10.0, 3.11.0rc1, 3.11.0rc2, 3.11.0, 3.11.1, 3.11.2, 3.11.3, 3.12.0rc1, 3.12.0rc2, 3.12.0, 3.12.1, 3.12.2, 3.12.4, 3.13.0rc3, 3.13.0, 3.14.0rc1, 3.14.0rc2, 3.14.0rc3, 3.14.0, 3.15.0rc1, 3.15.0rc2, 3.15.0, 3.15.1, 3.15.2, 3.15.3, 3.15.4, 3.15.5, 3.15.6, 3.15.7, 3.15.8, 3.16.0rc1, 3.16.0rc2, 3.16.0, 3.17.0rc1, 3.17.0rc2, 3.17.0, 3.17.1, 3.17.2, 3.17.3, 3.18.0rc1, 3.18.0rc2, 3.18.0, 3.18.1, 3.19.0rc1, 3.19.0rc2, 3.19.0, 3.19.1, 3.19.2, 3.19.3, 3.19.4, 4.0.0rc1, 4.0.0rc2, 4.21.0rc1, 4.21.0rc2, 4.21.0)
ERROR: No matching distribution found for protobuf==3.20.1

I understand Python 3.6 was dropped intentionally in #9480 , but it looks like the step to no longer build and release unsupported/unusable wheels for that version might have been missed.

@haberman
Copy link
Member

This should be fixed in the 4.21.1 release.

paride added a commit to paride/pycloudlib that referenced this issue Jun 3, 2022
This partially reverts 2eba259, whose purpose was to ensure
compatibility with Python 3.6 by setting max versions for protobuf and
google-api-python-client. However according to their documentation both
libraries still support Python 3.6. The incompatibility that we hit was
likely due to a bug in protobuf [1], now fixed in version 4.21.1.

[1] protocolbuffers/protobuf#10070
@ramanathan831
Copy link

4.21.1 is available only for python>=3.7, how does then it fix the python3.6 issue @haberman

@cliffwoolley
Copy link
Author

@ramanathan831 -- it fixes the issue by not incorrectly announcing that it supports py36 it when it doesn't.

@emay12
Copy link

emay12 commented Jun 27, 2022

im still experiencing this issue

@doug65536
Copy link

Wow, so what version does still support 3.6? mysql-connector needs it.

@jordaniversen
Copy link

Anyone find an answer for this?

@cliffwoolley
Copy link
Author

@jordaniversen The answer is that if you want py3.6 support from protobuf, you need to pin to the last version that actually supported it (i.e., protobuf<3.20).

@tjmehta
Copy link

tjmehta commented Dec 29, 2022

pip install -v "protobuf<3.20" for python 3.6

@JessicaLopezEspejel
Copy link

pip install -v "protobuf<3.20" for python 3.6

Thank you @tjmehta , it also works for Python 3.11.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants