Bug 2220964

Summary: The autoprogram extension is non-function with Python 3.12
Product: [Fedora] Fedora Reporter: Tom Hughes <tom>
Component: python-sphinxcontrib-autoprogramAssignee: Marcel Haerry <mh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, mh, romain.geissler
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: 2023-07-07 13:27:34 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: 2135404, 2220089    

Description Tom Hughes 2023-07-06 17:41:56 UTC
Description of problem:

The autoprogram extension is non-function with Python 3.12 as it tries to use the imp module which is no longer provided.

Version-Release number of selected component (if applicable):

python3-sphinxcontrib-autoprogram-0.1.7-8.fc39.noarch

Steps to Reproduce:
1. Try to use sphinx with autoprogram.
2.
3.

Actual results:

Exception occurred:
  File "/usr/lib/python3.12/site-packages/sphinxcontrib/autoprogram.py", line 148, in import_object
    import imp
ModuleNotFoundError: No module named 'imp'
The full traceback has been saved in /tmp/sphinx-err-qnsv37t_.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Expected results:

It doesn't crash ;-)

Additional info:

I have reported this upstream as https://github.com/sphinx-contrib/autoprogram/issues/64

Comment 1 Miro HronĨok 2023-07-07 06:56:21 UTC
As a stopgap measure, you can Require python3-zombie-imp.

Comment 2 Marcel Haerry 2023-07-07 13:27:34 UTC
python-sphinxcontrib-autoprogram-0.1.8-1.fc39.src.rpm now requires  python3-zombie-imp https://koji.fedoraproject.org/koji/buildinfo?buildID=2228532

Comment 3 Romain Geissler 2024-12-05 19:00:33 UTC
Note: the zombie-imp dependency can now be safely removed with the latest upstream sources: https://src.fedoraproject.org/rpms/python-sphinxcontrib-autoprogram/pull-request/3