Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Python 3.12 #189

Closed
ptrcnull opened this issue Mar 28, 2024 · 6 comments
Closed

Incompatible with Python 3.12 #189

ptrcnull opened this issue Mar 28, 2024 · 6 comments
Labels
question Further information is requested

Comments

@ptrcnull
Copy link

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)
@WhyNotHugo
Copy link
Contributor

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

@WhyNotHugo
Copy link
Contributor

Most changes are in master already, except for #190

@fdik
Copy link

fdik commented Apr 3, 2024

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
Copy link
Contributor

@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
Copy link
Member

thekix commented Aug 15, 2024

Hi,

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

Can I close this issue?

Regards,
kix

@thekix thekix added the question Further information is requested label Aug 15, 2024
@fdik
Copy link

fdik commented Aug 15, 2024 via email

@thekix thekix closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants