offlineimap3 icon indicating copy to clipboard operation
offlineimap3 copied to clipboard

Incompatible with Python 3.12

Open ptrcnull opened this issue 1 year ago • 4 comments

General informations

  • system/distribution (with version): Alpine edge
  • offlineimap version (offlineimap -V): offlineimap v8.0.0, imaplib2 v3.06
  • Python version: 3.12.2
  • server name or domain: unrelated
  • CLI options: unrelated

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)

ptrcnull avatar Mar 28 '24 17:03 ptrcnull

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

WhyNotHugo avatar Mar 28 '24 21:03 WhyNotHugo

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

WhyNotHugo avatar Mar 28 '24 22:03 WhyNotHugo

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

fdik avatar Apr 03 '24 11:04 fdik

@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.

WhyNotHugo avatar Apr 03 '24 12:04 WhyNotHugo

Hi,

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

Can I close this issue?

Regards, kix

thekix avatar Aug 15 '24 18:08 thekix

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

fdik avatar Aug 15 '24 19:08 fdik