Running with Python 3.12 failed because imp was removed.

Bug #2054133 reported by Dominik Viererbe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libapache2-mod-python (Debian)
Fix Released
Unknown
libapache2-mod-python (Ubuntu)
Fix Released
Undecided
Dominik Viererbe
Noble
Fix Released
Undecided
Dominik Viererbe

Bug Description

Running libapache2-mod-python package with the Python 3.12 rebuild failed. See e.g. https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/amd64/liba/libapache2-mod-python/20240215_094114_350ec@/log.gz

This is caused by the missing library imp in Python 3.12.

The Python library imp is marked as deprecated since Python 3.4 and was removed in Python 3.12. The documentation recommends replacing it with importlib. See https://docs.python.org/3.11/library/imp.html

Related branches

Changed in libapache2-mod-python (Ubuntu):
status: New → In Progress
assignee: nobody → Dominik Viererbe (dviererbe)
summary: - Rebuild with Python 3.12 failed because imp was removed.
+ Running with Python 3.12 failed because imp was removed.
description: updated
Revision history for this message
Dominik Viererbe (dviererbe) wrote :

I am currently building a patch in a PPA: https://launchpad.net/~dviererbe/+archive/ubuntu/lp2054133

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Specifically on migrating away from imp: https://docs.python.org/3/whatsnew/3.12.html#imp

tags: added: update-excuse
Changed in libapache2-mod-python (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libapache2-mod-python - 3.5.0.1-1ubuntu1

---------------
libapache2-mod-python (3.5.0.1-1ubuntu1) noble; urgency=medium

  [ Dominik Viererbe ]
  * Replaced deprecated library imp with importlib (LP: #2054133)
  * d/t/smoke: added debug output

 -- Matthias Klose <email address hidden> Tue, 20 Feb 2024 20:51:50 +0100

Changed in libapache2-mod-python (Ubuntu Noble):
status: In Progress → Fix Released
Changed in libapache2-mod-python (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.