alchemistry / alchemlyb

the simple alchemistry library
https://alchemlyb.readthedocs.io
BSD 3-Clause "New" or "Revised" License
195 stars 49 forks source link

alchemlyb on py 3.12 fails with versioneer issues #352

Closed orbeckst closed 6 months ago

orbeckst commented 6 months ago

CI Python 3.12 installation fails with error related to versioneer:

Processing /home/runner/work/alchemlyb/alchemlyb
  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]
      /home/runner/work/alchemlyb/alchemlyb/versioneer.py:420: 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 "/home/runner/work/alchemlyb/alchemlyb/setup.py", line 16, in <module>
          version=versioneer.get_version(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/runner/work/alchemlyb/alchemlyb/versioneer.py", line 1479, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/home/runner/work/alchemlyb/alchemlyb/versioneer.py", line 1411, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/runner/work/alchemlyb/alchemlyb/versioneer.py", line 341, 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.
Error: Process completed with exit code 1.

Either update versioneer or replace with versioningit.