Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Setuptools 69.0.0 breaks Astropy's setup #4126

Closed
neutrinoceros opened this issue Nov 21, 2023 · 4 comments · Fixed by #4127
Closed

[BUG] Setuptools 69.0.0 breaks Astropy's setup #4126

neutrinoceros opened this issue Nov 21, 2023 · 4 comments · Fixed by #4127

Comments

@neutrinoceros
Copy link

setuptools version

setuptools==69.0.0

Python version

3.12

OS

Ubuntu

Additional environment information

No response

Description

About 15h ago, Astropy's CI started failing to build with

ImportError: cannot import name 'newer_group' from 'setuptools.dep_util'

This seems to correspond to an intentional change in setuptools 69.
Nonetheless, from reading the PR that introduced the change (#4069), I'm not sure that this was supposed to break immediately. Was this intended ?

Expected behavior

a deprecation warning instead of a hard error ?

How to Reproduce

$ python -c "from setuptools.dep_util import newer_group"

Output

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'newer_group' from 'setuptools.dep_util' (/private/tmp/venv/lib/python3.12/site-packages/setuptools/dep_util.py)
@abravalheri
Copy link
Contributor

I see, astropy was using a function that was imported by setuptools.dep_util in order to implement another function.

I think I can prepare a fix quickly...

@abravalheri
Copy link
Contributor

abravalheri commented Nov 21, 2023

Hi @neutrinoceros, could you please check if #4127 works for you?

You can install that version of setuptools with:

python -m venv .venv
.venv/bin/python -m pip install -U pip wheel
.venv/bin/python -m pip install https://github.com/abravalheri/setuptools/archive/refs/heads/issue-4126.zip

+any other build dependencies.

Then you can run .venv/bin/python -m pip install . --no-build-isolation or .venv/bin/python -m build --no-isolation to test if it works for you.

@abravalheri abravalheri reopened this Nov 21, 2023
@abravalheri abravalheri added Waiting User Feedback and removed Needs Triage Issues that need to be evaluated for severity and status. labels Nov 21, 2023
@neutrinoceros
Copy link
Author

neutrinoceros commented Nov 21, 2023

@abravalheri I confirm that #4127 works for us, thank you !
For the record, I was also able to resolve the incompatibility on Astropy's side astropy/astropy#15634, but having a fix in setuptools itself will also fix building existing releases, so that's still desirable for us.

@abravalheri
Copy link
Contributor

abravalheri commented Nov 21, 2023

Thank you very much for confirming.
I will wait for the CI and cut a release, it might take about 1h (maybe a bit more) until it is properly published on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants