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

PyPi repository for 4.21.0 doesn't specify required Python version #10053

Closed
codrin-lanterne opened this issue May 26, 2022 · 9 comments
Closed
Assignees
Labels

Comments

@codrin-lanterne
Copy link

codrin-lanterne commented May 26, 2022

Because the 4.21.0 release of protobuf on PyPi (https://pypi.org/project/protobuf/4.21.0) doesn't specify the required Python version, this leads to the installation of the library via pip install protobuf to fail when using Python versions smaller than 3.7 (leading to protobuf requires Python '>=3.7' but the running Python is 3.6.9 for example). This also leads to other libraries such as ortools to fail installation.

How to replicate (the commands were ran from an Ubuntu 18.04.5 LTS machine):

  1. python3.6 -m venv venv
  2. . venv/bin/activate
  3. pip install protobuf
@majorgreys
Copy link

The metadata on the 4.21 wheels are missing Requires-Python:

# cat protobuf-4.21.0.dist-info/METADATA
Metadata-Version: 2.1
Name: protobuf
Version: 4.21.0

UNKNOWN

This is not expected given that it appears in the setup.py:

python_requires='>=3.7',

By contrast, this is the contents of wheel for 3.19.4:

# cat protobuf-3.19.4.dist-info/METADATA
Metadata-Version: 2.1
Name: protobuf
Version: 3.19.4
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Maintainer: [email protected]
Maintainer-email: [email protected]
License: 3-Clause BSD License
Download-URL: https://github.com/protocolbuffers/protobuf/releases
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.5
License-File: LICENSE

Protocol Buffers are Google's data interchange format

@zhangskz zhangskz self-assigned this May 26, 2022
@zhangskz
Copy link
Member

Fixed in protocolbuffers/upb@ef78b6a

@hemanth-vamper
Copy link

Is this fixed? I still see the dependency issue (python >= 3.7)

@zhangskz
Copy link
Member

Not quite -- the fix is submitted to the upb repo and PR #10058 will update 21.x release branch to point to the updated upb repo commit.

This will probably end up in a 21.1 patch release.

@hemanth-vamper
Copy link

Thanks @zhangskz
Do you know the time line for 21.1 patch release?

@perezd
Copy link
Contributor

perezd commented May 26, 2022

Planning for tomorrow EOD.

@nthostrup
Copy link

Issue persists. Presumably due to a requirement in protobuff for a specific python version.
Workaround is to specifically list protobuf<4.21.0 in requirements.txt file.

@zhangskz
Copy link
Member

Can you elaborate on what you mean by issue persists? Is this against 4.21.1 or are you still looking at 4.20.0 (which was un-yanked but not updated with fix).

@nthostrup
Copy link

Issue is fixed :) Thx (y)

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

6 participants