lingua icon indicating copy to clipboard operation
lingua copied to clipboard

Python 3.12 configparser module name error

Open arkid15r opened this issue 1 year ago • 1 comments

As Python 3.12 has been released there is some work that needs to be done in order to keep is compatible:

Traceback (most recent call last):
  File ".../venv/lib/python3.12/site-packages/lingua/extract.py", line 15, in <module>
    from configparser import SafeConfigParser
ImportError: cannot import name 'SafeConfigParser' from 'configparser' (.../python3.12/configparser.py). Did you mean: 'RawConfigParser'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../python-holidays/scripts/l10n/generate_po_files.py", line 19, in <module>
    from lingua.extract import main as create_pot_file
  File ".../python-holidays/venv/lib/python3.12/site-packages/lingua/extract.py", line 17, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

arkid15r avatar Oct 10 '23 16:10 arkid15r

Thanks for bringing this up. I also stumbled over this issue and would be interested in a fix.

Are you still working on this package @wichert ?

sallner avatar Nov 14 '23 13:11 sallner

Closing in favor of https://github.com/vacanza/lingva/pull/1

arkid15r avatar Mar 20 '24 17:03 arkid15r