pulb / mailnag

An extensible mail notification daemon
GNU General Public License v2.0
250 stars 32 forks source link

ModuleNotFoundError: No module named 'imp' #244

Open kparal opened 11 months ago

kparal commented 11 months ago

Python 3.12 no longer contains module imp. Mailnag crashes immediately on start:

$ mailnag
Traceback (most recent call last):
  File "/usr/bin/mailnag", line 43, in <module>
    from Mailnag.daemon.mailnagdaemon import MailnagDaemon
  File "/usr/lib/python3.12/site-packages/Mailnag/daemon/mailnagdaemon.py", line 26, in <module>
    from Mailnag.daemon.mailchecker import MailChecker
  File "/usr/lib/python3.12/site-packages/Mailnag/daemon/mailchecker.py", line 26, in <module>
    from Mailnag.common.plugins import HookTypes
  File "/usr/lib/python3.12/site-packages/Mailnag/common/plugins.py", line 20, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
knurd commented 10 months ago

FWIW, this is caused my the removal of imp in in Python 3.12, which is the default by Fedora 39+ (which is likely what @kparal uses). This for now will soon be worked-around in Fedora by requiring python3-zombie-imp. But for the record: that only got me one step further, as I a ssl function used by mailnag was also removed. See https://github.com/pulb/mailnag/issues/245 for details.

jezek commented 3 months ago

Pardon my intrusion. On manjaro linux I get this error too.

JanBluePix commented 2 months ago

after update on Manjaro Linux I get the same error with Python 3.12.3