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

MNT: migrate away from distutils #3384

Open
neutrinoceros opened this issue Jun 28, 2021 · 3 comments
Open

MNT: migrate away from distutils #3384

neutrinoceros opened this issue Jun 28, 2021 · 3 comments
Labels
infrastructure Related to CI, versioning, websites, organizational issues, etc UX user-experience

Comments

@neutrinoceros
Copy link
Member

neutrinoceros commented Jun 28, 2021

The distutils builtin package is slanted for removal in Python 3.12, which should be released around October 2023.
It is currently used in several places in yt, making it de facto incompatible with Python 3.12

In #3380, among other things, I'm setting an explicit upper limit to compatible Python versions, as a temporary bandaid that can be shipped with yt 4.0, but it'd be preferable to solve this for 4.1, at the latest.

Note that we are already specifying setuptools (not distutils) as our build system in pyproject.toml, which means that migrating away from the bits of distutils that we do use (most importantly in setupext.py) should be trivial.

I do not know how hard (or necessary) it would be to migrate away from distutils directives (first introduced in #2509).

useful resources:
https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html?highlight=distutils
https://www.python.org/dev/peps/pep-0632/#migration-advice

Originally posted by @neutrinoceros in #3380 (comment)

@neutrinoceros
Copy link
Member Author

neutrinoceros commented Nov 25, 2021

@neutrinoceros
Copy link
Member Author

I'm taking action upstream to cut the remaining ties we have to distutils, see pypa/setuptools#3445

@neutrinoceros neutrinoceros changed the title Future proofing: Python 3.12 compatibility MNT: migrate away from distutils Jul 24, 2022
@neutrinoceros
Copy link
Member Author

Discussions with setuptools maintainers helped clarified that we can still rely on setuptools' compatibility shim for distutils for now.
pypa/setuptools#2806 (comment)

This means that yt will still build on Python 3.12 as long as the shim is maintained, but it will also be removed at some point. An implication is that we should start pinning setuptools on release branches to make sure that releases can still be built from source in the future.
I've renamed this issue to better convey the actual problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Related to CI, versioning, websites, organizational issues, etc UX user-experience
Projects
None yet
Development

No branches or pull requests

1 participant