OfflineIMAP / offlineimap3

Read/sync your IMAP mailboxes (python3)
Other
455 stars 64 forks source link

Incompatible with Python 3.12 #189

Closed ptrcnull closed 3 months ago

ptrcnull commented 8 months ago

General informations

configparser.SafeConfigParser was deprecated since Python 3.2 ( 2011 ), imp.load_module since 3.3 ( 2012 ), both were removed in 3.12

Logs, error

  File "/home/patrycja/aports/community/offlineimap/src/offlineimap3-8.0.0/offlineimap/init.py", line 35, in <module>
    from offlineimap import threadutil, accounts, folder, mbnames
  File "/home/patrycja/aports/community/offlineimap/src/offlineimap3-8.0.0/offlineimap/accounts.py", line 24, in <module>
    from offlineimap import mbnames, CustomConfig, OfflineImapError
  File "/home/patrycja/aports/community/offlineimap/src/offlineimap3-8.0.0/offlineimap/CustomConfig.py", line 20, in <module>
    from configparser import SafeConfigParser, Error
ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/usr/lib/python3.12/configparser.py)
WhyNotHugo commented 8 months ago

Relevant mention in the Python 3.12 release notes: https://docs.python.org/3.12/whatsnew/3.12.html#configparser

WhyNotHugo commented 8 months ago

Most changes are in master already, except for https://github.com/OfflineIMAP/offlineimap3/pull/190

fdik commented 7 months ago

I cannot find any working combination of Python and offlineimap. Even the one in MacPorts is now broken. Is there documentation for supported combinations?

WhyNotHugo commented 7 months ago

@fdik The version in master works with Python 3.10. On Alpine we included this patch for Python 3.11 and this other one for Python 3.12.

I suggest that you reach out to the MacPorts maintainers; they may need to include the above patches for recent versions of Python.

thekix commented 3 months ago

Hi,

both patches (@WhyNotHugo) were included. I am running version 3.12 without problems.

Can I close this issue?

Regards, kix

fdik commented 3 months ago

On Thu, Aug 15, 2024 at 11:50:57AM -0700, Rodolfo García Peñas (kix) wrote:

both patches @.***) were included. I am running version 3.12 without problems. Can I close this issue?

AFAICS yes.

VB. -- Volker Birk Oberer Graben 4, 8400 Winterthur, Schweiz @.*** http://fdik.org