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

Support Python 3.13 (upb) #20304

Open
liujianwish opened this issue Feb 11, 2025 · 4 comments
Open

Support Python 3.13 (upb) #20304

liujianwish opened this issue Feb 11, 2025 · 4 comments

Comments

@liujianwish
Copy link

Hi,

There is an performance issue in protobuf when I switching python version from 3.10 to 3.13. Performance droped 20x comparing with 3.10. After some investigating, I find the root cause is due to the backend implmentation of the protobuf. In 3.13, the backend implementation is python, compatible version I guess.

Is there any release plan for supporting python 3.13 (upb ver) or any temp solution to build a upb for python 3.13?

Frank

@liujianwish liujianwish added the untriaged auto added to all issues by default when created. label Feb 11, 2025
@shaod2 shaod2 added python upb and removed untriaged auto added to all issues by default when created. labels Feb 11, 2025
@shaod2
Copy link
Member

shaod2 commented Feb 11, 2025

Hi, thanks for reporting the performance issue.

Do you have examples / evidence of the performance drop, considering Protobuf backend, in details?

@liujianwish
Copy link
Author

Hi, thanks for reporting the performance issue.

Do you have examples / evidence of the performance drop, considering Protobuf backend, in details?

Hi @shaod2 , thanks for your rapid reply.

I have made a demo test as below:

Lib dependency: protobuf==5.29.3

Environment: Linux 5.15.0-78-generic #85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Python version: 3.13.12 vs 3.13.1t

Command: python test.py

Test results:

Image

Image

I have attached all the test code as below:

demo.tar.gz

Frank

@davidfritzsche
Copy link

@liujianwish Do you use the regular 3.13.1 or the experimental free-threaded 3.13.1t (see https://docs.python.org/3/whatsnew/3.13.html#free-threaded-cpython)?
It seems to me that the upb-based protobuf package does not support free threaded Python at the moment, at least there are no wheels for free-threaded Python on pypi.org, i.e., on a free-threaded Python you would get the Python-only wheel.

@liujianwish
Copy link
Author

@liujianwish Do you use the regular 3.13.1 or the experimental free-threaded 3.13.1t (see https://docs.python.org/3/whatsnew/3.13.html#free-threaded-cpython)? It seems to me that the upb-based protobuf package does not support free threaded Python at the moment, at least there are no wheels for free-threaded Python on pypi.org, i.e., on a free-threaded Python you would get the Python-only wheel.

Thanks for your clearification. I am researching on free threaded version python (3.13t).

As upb has moved into protobuf, is there any release plan to support python 3.13t?

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

No branches or pull requests

3 participants