AntSimi / py-eddy-tracker

Eddy identification and tracking
https://py-eddy-tracker.readthedocs.io/en/latest/
GNU General Public License v3.0
123 stars 53 forks source link

AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? #239

Open carlosal1015 opened 4 months ago

carlosal1015 commented 4 months ago

Bug report

Code for reproduction

With python 3.12 we have the following error

* Building wheel...
/tmp/makepkg/python-py-eddy-tracker/src/py-eddy-tracker-3.6.1/versioneer.py:432: SyntaxWarning: invalid escape sequence '\s'
  ] = '''
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
    main()
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 271, in build_wheel
    return _build_backend().build_wheel(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 404, in build_wheel
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 389, in _build_with_temp_dir
    self.run_setup()
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 480, in run_setup
    super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
    exec(code, locals())
  File "<string>", line 14, in <module>
  File "/tmp/makepkg/python-py-eddy-tracker/src/py-eddy-tracker-3.6.1/versioneer.py", line 1524, in get_version
    return get_versions()["version"]
           ^^^^^^^^^^^^^^
  File "/tmp/makepkg/python-py-eddy-tracker/src/py-eddy-tracker-3.6.1/versioneer.py", line 1451, in get_versions
    cfg = get_config_from_root(root)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/makepkg/python-py-eddy-tracker/src/py-eddy-tracker-3.6.1/versioneer.py", line 346, in get_config_from_root
    parser = configparser.SafeConfigParser()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

Looks like related with https://github.com/python-versioneer/python-versioneer/issues/375