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

Python 3.11 and PyFrameObject #99

Open
blais opened this issue Dec 22, 2022 · 6 comments
Open

Python 3.11 and PyFrameObject #99

blais opened this issue Dec 22, 2022 · 6 comments

Comments

@blais
Copy link

blais commented Dec 22, 2022

Has pybind11_protobuf been tested with Python 3.11 and forward?
I believe PyFrameObject has been removed from the public API and curious to know someone has tested it working with this version or later.

@rwgk
Copy link
Contributor

rwgk commented Dec 24, 2022

Has pybind11_protobuf been tested with Python 3.11 and forward?

Not to my knowledge, but pybind11 GitHub Actions testing includes routine testing with Python 3.11. I've also tested with Python 3.12 (last I tried the Python tests (i.e. extending) worked, embedding had one failure).

PyFrameObject

Where does that come in for pybind11_protobuf? Searching for "frame" (case-insensitive) under pybind11_protobuf doesn't have any matches.

@blais
Copy link
Author

blais commented Dec 24, 2022

I just delved deeper and noticed you've gated usage of (deprecated) pyext to a flag.
Thanks for doing that (keeping it alive but conditional is the right choice IMHO, offers transition).

I'm getting the following errors with 3.12.0a2.
errors_3.12.log

And while I'm at it, I tried compiling with a recent pb version (21.12), I'm getting this:
errors_3.12_pb21.12.log

@rwgk
Copy link
Contributor

rwgk commented Dec 28, 2022

Looks like the protobuf library isn't Python 3.12 compatible.

protobuf/internal/python_message.py", line 623, in __init__
    property.__init__(self, getter, setter, doc=doc)
AttributeError: '_FieldProperty' object attribute '__doc__' is read-only

It's really very early to even try.

@blais
Copy link
Author

blais commented Dec 30, 2022

Never mind; I've managed to fix my install of 3.11.1 and was able to successfully update to protobuf 21.12 and run your unit tests unch'ed. This is good enough. The bug looks like something they'll have to fix in Python 3.12 itself.

@blais blais closed this as completed Dec 30, 2022
@blais blais reopened this Dec 30, 2022
@blais
Copy link
Author

blais commented Dec 30, 2022

Actually no.... the problem occurs when I enable fast cpp protos with:

bazel test --define=use_fast_cpp_protos=true  //...

The problem is that it attempts to build com_google_protobuf/python/google/protobuf/pyext.
For my use case I really need to share the protos between C++ and Python (I'll have a lot of cross-language passing around of protos).

For reference, see protocolbuffers/protobuf#11031

@rwgk
Copy link
Contributor

rwgk commented Dec 31, 2022

@laramiel JIC you have suggestions.

From my end: If you send a PR with the changes you need, I'll apply it internally (manually), which will then automatically get exported back here. — Currently we're not set up for automatically processing PRs.

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

No branches or pull requests

2 participants