Bug 2220964 - The autoprogram extension is non-function with Python 3.12
Summary: The autoprogram extension is non-function with Python 3.12
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinxcontrib-autoprogram
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marcel Haerry
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12 2220089
TreeView+ depends on / blocked
 
Reported: 2023-07-06 17:41 UTC by Tom Hughes
Modified: 2024-12-05 19:00 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-07 13:27:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sphinx-contrib autoprogram issues 64 0 None open Python 3.12 has dropped the `imp` module 2023-07-06 17:41:55 UTC

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


Note You need to log in before you can comment on or make changes to this bug.