-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Compilation fails with python 3.11 #10305
Comments
3.11 is still in pre-release so I think this isn't an issue for 21.3 (note, for python this is technically 4.21.3). We'll likely want to make sure we support 3.11 eventually when this is closer to release. |
@zhangskz Can we re-open, now that 3.11 has been released? |
I suspect this is fixed already by #10403. But yes, please comment if this is still an issue and we can reopen it. |
Does not appear to be fixed, see: |
|
Apologies, I see that this fix simply hasn't been part of a release yet. When can we expect it? (It's holding up migration of at least 95 other packages to python 3.11 on conda-forge.) |
Can you clarify what exactly is being built here that causes this issue? As of Protobuf 4.21.0, the code in https://github.com/protocolbuffers/protobuf/tree/main/python/google/protobuf/pyext is no longer part of our official Python release. It is not compiled or distributed in our pip packages at all. The extension has been completely rewritten (while still implementing the same API) and the new code is here: https://github.com/protocolbuffers/upb/tree/main/python So in some sense the fixes submitted in #10403 will never be released, because we are no longer releasing this code. Which brings us to the question of how you end up building this legacy code. What were you building that actually triggered this error? |
We are building with the code from this Git repo. |
I will see how it goes if we switch to building from PyPI instead. |
I am not sure that we have a source package in pip that will build the new code as you would expect. Our general assumption has been that if we build the binaries and release them on pip, other projects will not need to build them again. What is your use case for building the extension module yourself? |
conda-forge is a completely different package manager. It cannot use PyPI binaries, we build our own. So we definitely do need to be building from source. If necessary source for building the extensions has been stripped out of the code distributed on PyPI, we won't be able to use that. |
It appears that our source package currently contains the old code (ie. the code from https://github.com/protocolbuffers/protobuf/tree/main/python/google/protobuf/pyext). This may even continue to be buildable via We should update our source package to contain the new code at https://github.com/protocolbuffers/upb/tree/main/python, and an appropriate |
We do, indeed use |
What version of protobuf and what language are you using?
Version: 3.21.3
Language: Python
What operating system (Linux, Windows, ...) and version?
Gentoo Linux
What runtime / compiler are you using (e.g., python version or gcc version)
What did you do?
Compile python project
What did you expect to see
Compilation works with python 3.11.
What did you see instead?
Compilation fails with python 3.11.
The text was updated successfully, but these errors were encountered: