Versioneer 0.18 uses configparser.SafeConfigParser(), which was removed in Python 3.12 (python/cpython#92503)
I have tentatively upgraded the vendored file to versioneer==0.19, which allows me to install on 3.12 without issue, however this does also appear to break support for Python 2, so it may not be an ideal solution for you.
> pip install --no-cache --force-reinstall pprofile
Collecting pprofile
Downloading pprofile-2.1.0.tar.gz (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.7/56.7 kB 596.3 kB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\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 "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\setup.py", line 25, in <module>
version=versioneer.get_version(),
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\versioneer.py", line 1480, in get_version
return get_versions()["version"]
^^^^^^^^^^^^^^
File "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\versioneer.py", line 1412, in get_versions
cfg = get_config_from_root(root)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\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.
Versioneer 0.18 uses
configparser.SafeConfigParser(), which was removed in Python 3.12 (python/cpython#92503)I have tentatively upgraded the vendored file to versioneer==0.19, which allows me to install on 3.12 without issue, however this does also appear to break support for Python 2, so it may not be an ideal solution for you.
> pip install --no-cache --force-reinstall pprofile Collecting pprofile Downloading pprofile-2.1.0.tar.gz (56 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.7/56.7 kB 596.3 kB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [18 lines of output] C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\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 "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\setup.py", line 25, in <module> version=versioneer.get_version(), ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\versioneer.py", line 1480, in get_version return get_versions()["version"] ^^^^^^^^^^^^^^ File "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\versioneer.py", line 1412, in get_versions cfg = get_config_from_root(root) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Daniel\AppData\Local\Temp\pip-install-5iyuhadx\pprofile_13a59f164ac44042a04c5f8208ddd6d4\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.