Bug 2424563

Summary: dbus-python doesn't work with Python 3.15: SystemError: type _dbus_bindings.Connection has the Py_TPFLAGS_MANAGED_WEAKREF flag but not Py_TPFLAGS_HAVE_GC flag
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: dbus-pythonAssignee: Vojtech Trefny <vtrefny>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alt-gtk-de-sig, amigadave, gnome-sig, ksurma, mclasen, mhroncok, ngompa13, rstrode, vtrefny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434    

Description Karolina Surma 2025-12-23 10:52:49 UTC
dbus-python doesn't work with Python 3.15:

>>> import dbus
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import dbus
  File "/usr/lib64/python3.15/site-packages/dbus/__init__.py", line 71, in <module>
    import dbus.types as types
  File "/usr/lib64/python3.15/site-packages/dbus/types.py", line 10, in <module>
    from _dbus_bindings import (
    ...<2 lines>...
        UnixFd)
SystemError: type _dbus_bindings.Connection has the Py_TPFLAGS_MANAGED_WEAKREF flag but not Py_TPFLAGS_HAVE_GC flag

I have raised the issue upstream: https://gitlab.freedesktop.org/dbus/dbus-python/-/issues/59

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.