Skip to content

versioneer fails pip install during pre-commit install on python 3.12 #36

Description

@minusf
pre-commit version: 3.5.0
git --version: git version 2.39.3 (Apple Git-145)
sys.version:
    3.12.0 (main, Oct  2 2023, 12:03:24) [Clang 15.0.0 (clang-1500.0.40.1)]
sys.executable: /opt/homebrew/Cellar/pre-commit/3.5.0_1/libexec/bin/python
os.name: posix
sys.platform: darwin
An unexpected error has occurred: CalledProcessError: command: ('/.../.cache/pre-commit/repo4k1mogjv/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
...
            File "/.../.cache/pre-commit/repo4k1mogjv/versioneer.py", line 1480, in get_version
              return get_versions()["version"]
                     ^^^^^^^^^^^^^^
            File "/.../.cache/pre-commit/repo4k1mogjv/versioneer.py", line 1412, in get_versions
              cfg = get_config_from_root(root)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/.../.cache/pre-commit/repo4k1mogjv/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: subprocess-exited-with-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions