On Thu, Jan 08, 2026 at 07:45:36AM +0100, László Böszörményi (GCS) wrote:
> Hi Colin,
> 
> On Wed, Jan 7, 2026 at 1:33 PM Colin Watson <[email protected]> wrote:
> > I see that there seems to be a backported fix for this bug in
> > experimental (>= 3.25.4-2).  Since this bug has a lot of fallout in many
> > packages, are there any current obstacles to getting the fix into
> > unstable?
>  Thanks for reaching out. Please note the details. The bug is not
> closed and no plan for a package transition. Reason is, while someone
> states the mentioned patch is a fix, it is not.
> Upstream has no Python 3.14 support, other distributions either
> disregard this (probably they don't run package testing [this happens
> to be the issue, so disabling that in the packages might help]) or
> simply don't build the Python binding with this version of that - see
> the Fedora case [1] for example.
>...

This is not what that Fedora change does - the Fedora change disables 
the (faster) C extension, falling back to the (slower) pure-python code.

The patch below does the same for protobuf/unstable, I tested that it 
fixes the following in unstable:
- python3.14 -c 'from google.protobuf.internal import builder as _builder'
- building omemo-dr/trixie (omemo-dr/unstable ignores test failures)

> Thanks,
> Laszlo/GCS
> [1] https://src.fedoraproject.org/rpms/protobuf/pull-request/31#request_diff

cu
Adrian


--- protobuf-3.21.12/debian/rules       2024-10-13 13:12:52.000000000 +0300
+++ protobuf-3.21.12/debian/rules       2025-09-29 15:11:47.000000000 +0300
@@ -15,6 +15,10 @@
 export DEB_LDFLAGS_MAINT_APPEND  = -latomic
 endif
 
+# faster than the pure-python alternative
+# not yet ported to Python 3.14
+#PYTHON_CPP=--cpp_implementation
+
 SONAME=32
 API_VERSION=$(SONAME)-0
 
@@ -59,7 +63,7 @@
        # Python3 build
        cp -rv python python3
        set -e; cd python3 && for pv in $(shell py3versions -vr); do \
-               $(PYTHON_CROSS_VARS) python$$pv setup.py build 
--cpp_implementation; \
+               $(PYTHON_CROSS_VARS) python$$pv setup.py build ${PYTHON_CPP}; \
        done
 endif
 
@@ -104,7 +108,7 @@
 #      set -e; \
        export LD_LIBRARY_PATH=$(CURDIR)/src/.libs; \
        cd python3 && for PYTHON in $(shell py3versions -r); do \
-               $$PYTHON setup.py test --cpp_implementation; \
+               $$PYTHON setup.py test ${PYTHON_CPP}; \
        done
 endif
 
@@ -131,7 +135,7 @@
        # Python3 install
        set -e; \
        cd python3 && for pv in $(shell py3versions -vr); do \
-               $(PYTHON_CROSS_VARS) python$$pv setup.py install 
--cpp_implementation \
+               $(PYTHON_CROSS_VARS) python$$pv setup.py install ${PYTHON_CPP} \
                        --install-layout=deb --no-compile \
                        --root=$(CURDIR)/debian/python3-protobuf; \
        done

Reply via email to