Bug 2070428

Summary: deluge fails to build with Python 3.11: SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: delugeAssignee: Michael Cronenworth <mike>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, mike, peter, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-26 12:57:45 UTC 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: 2016048    

Description Tomáš Hrnčiar 2022-03-31 07:49:09 UTC
deluge fails to build with Python 3.11.0a6.

Traceback (most recent call last):
  File "/builddir/build/BUILD/deluge-2.0.5/deluge/_libtorrent.py", line 24, in <module>
    import deluge.libtorrent as lt
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'deluge.libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/deluge-2.0.5/setup.py", line 566, in <module>
    setup(
    ^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
    ^^^^^^^^^^^^^
  File "/builddir/build/BUILD/deluge-2.0.5/setup.py", line 399, in run
    from deluge._libtorrent import LT_VERSION
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/deluge-2.0.5/deluge/_libtorrent.py", line 27, in <module>
    import libtorrent as lt
    ^^^^^^^^^^^^^^^^^^^^^^^
SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function

The PyType_Ready() function now raises an error if a type is defined with the Py_TPFLAGS_HAVE_GC flag set but has no traverse function (PyTypeObject.tp_traverse). (Contributed by Victor Stinner in bpo-44263.)

https://bugs.python.org/issue44263

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03843812-deluge/

For all our attempts to build deluge with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/deluge/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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.

Comment 1 Miro Hrončok 2022-04-26 11:30:19 UTC
Will try with https://src.fedoraproject.org/rpms/boost/pull-request/13

Comment 2 Miro Hrončok 2022-04-26 12:57:45 UTC

*** This bug has been marked as a duplicate of bug 2069676 ***