pytroll/pytroll-collectors

Installing fails on Python 3.12; versioneer update needed?

Closed this issue · 0 comments

Trying to install pytroll-collectors fails on Python 3.12. The failure apparently happens due to an outdated version of versioneer, which refers to SafeConfigParser, a class that has been removed.

In a clean repo, pip install pytroll-collectors fails with:

Collecting pytroll-collectors
  Using cached pytroll_collectors-0.15.1.tar.gz (112 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      /tmp/pip-install-a_grrpv_/pytroll-collectors_63499942fb5345279a073fa4e81584bc/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-a_grrpv_/pytroll-collectors_63499942fb5345279a073fa4e81584bc/setup.py", line 63, in <module>
          version=versioneer.get_version(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-a_grrpv_/pytroll-collectors_63499942fb5345279a073fa4e81584bc/versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/tmp/pip-install-a_grrpv_/pytroll-collectors_63499942fb5345279a073fa4e81584bc/versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-a_grrpv_/pytroll-collectors_63499942fb5345279a073fa4e81584bc/versioneer.py", line 342, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.