Installing directly from GitHub fails on Python 3.12
jrbourbeau opened this issue · comments
Describe the bug
While updating Dask's nightly CI to run on Python 3.12, I noticed that we're no longer able to install sparse
directly from GitHub anymore
To Reproduce
mamba create -n test-sparse python=3.12
mamba activate test-sparse
pip install git+https://github.com/pydata/sparse
which fails with
Collecting git+https://github.com/pydata/sparse
Cloning https://github.com/pydata/sparse to /private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav
Running command git clone --filter=blob:none --quiet https://github.com/pydata/sparse /private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav
Resolved https://github.com/pydata/sparse to commit 7c0c962a87f1884702497d3b546d023b74087928
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
/private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav/versioneer.py:432: SyntaxWarning: invalid escape sequence '\s'
] = '''
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav/setup.py", line 43, in <module>
version=versioneer.get_version(),
^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav/versioneer.py", line 1524, in get_version
return get_versions()["version"]
^^^^^^^^^^^^^^
File "/private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav/versioneer.py", line 1451, in get_versions
cfg = get_config_from_root(root)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/h0/_w6tz8jd3b9bk6w7d_xpg9t40000gn/T/pip-req-build-eluysxav/versioneer.py", line 346, in get_config_from_root
parser = configparser.SafeConfigParser()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
['numpy>=1.17', 'scipy>=0.19', 'numba>=0.49']
['numpy>=1.17', 'scipy>=0.19', 'numba>=0.49']
[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.
It looks like versioneer
may need to be updated to be compatible with Python 3.12
Additionally, it looks like we'll need to wait for numba
to support Python 3.12 as well
It looks like
versioneer
may need to be updated to be compatible with Python 3.12
Might just make the jump to pyproject.toml
.
Additionally, it looks like we'll need to wait for
numba
to support Python 3.12 as well
Ah, yes, the eternal conflict between fluctuating bytecode and things that depend on it like Numba.
Might just make the jump to pyproject.toml.
Yeah, agreed. Though it may be slightly more involved as I don't see a pyproject.toml
file here
Yeah, agreed. Though it may be slightly more involved as I don't see a
pyproject.toml
file here
pyproject.toml
is in master
if you'd like to test it out. I also replaced versioneer
with setuptools_scm
.
Numba 0.59 supports Python 2.12, so I'm closing.