python protobuf (upb) and subinterpreter support

79 views
Skip to first unread message

Lars Klein

unread,
Sep 11, 2025, 8:30:41 AM (5 days ago) Sep 11
to Protocol Buffers
Hi,

we use python-protobuf in our python code that makes use of subinterpreters. We realized that the default implementation switches from upb to native python. The module import for upb fails with:

ImportError: module google._upb._message does not support loading in subinterpreters

According to https://github.com/protocolbuffers/protobuf/issues/10143 there should be no global state in upb anymore. Is there another reason the module does not support subinterpreters or has it just not been enabled yet?

thanks and best regards,
Lars
Reply all
Reply to author
Forward
0 new messages