Compatibility with Python 3.12, ModuleNotFoundError: No module named 'imp'

Bug #2026813 reported by Tomáš Hrnčiar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
Fix Released
Undecided
Jelmer Vernooij

Bug Description

Hello,

the imp module was removed from Python 3.12 and it breaks breezy. It would be good to port Breezy to use importlib instead. As a stopgap measure, in Fedora, we are adding a dependency on zombie-imp package.

https://pypi.org/project/zombie-imp/

<mock-chroot> sh-5.2# brz
Traceback (most recent call last):
  File "/usr/bin/brz", line 75, in <module>
    main()
  File "/usr/lib64/python3.12/site-packages/breezy/__main__.py", line 55, in main
    import breezy.commands
  File "/usr/lib64/python3.12/site-packages/breezy/commands.py", line 51, in <module>
    from .plugin import disable_plugins, load_plugins, plugin_name
  File "/usr/lib64/python3.12/site-packages/breezy/plugin.py", line 41, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Which version of breezy is this? I don't see any imports of imp in 3.3.3.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Looks like it's not yet at 3.3.3 (based on https://bugzilla.redhat.com/show_bug.cgi?id=2133259)

Changed in brz:
status: New → Fix Released
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Tomáš Hrnčiar (thrnciar) wrote :

Oh I see, sorry for the noise.

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.