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

distutils package deprecation warning in configure.py #42186

Open
targos opened this issue Mar 2, 2022 · 5 comments
Open

distutils package deprecation warning in configure.py #42186

targos opened this issue Mar 2, 2022 · 5 comments
Labels
build Issues and PRs related to build files or the CI. python PRs and issues that require attention from people who are familiar with Python.

Comments

@targos
Copy link
Member

targos commented Mar 2, 2022

D:\Git\nodejs\node\configure.py:17: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

@nodejs/python

@targos targos added build Issues and PRs related to build files or the CI. python PRs and issues that require attention from people who are familiar with Python. labels Mar 2, 2022
@cclauss
Copy link
Contributor

cclauss commented Mar 2, 2022

I think we have at least 18 months before Python 3.12 is released.
https://www.python.org/dev/peps/pep-0664

@richardlau
Copy link
Member

richardlau commented Mar 2, 2022

For reference:

from distutils.version import StrictVersion

PEP 632 suggests to use packaging, although that doesn't appear to be a built-in module (unlike distutils) and may be another package to install (either via pip or your OS' package manager). Or maybe we can just parse into tuples as suggested in #29927 (comment).

gyp-next will also be affected: https://github.com/nodejs/gyp-next/blob/35305d66b4f377e0f00e52d0426164a592779f17/pylib/gyp/input.py#L19

from distutils.version import StrictVersion

@cclauss
Copy link
Contributor

cclauss commented Mar 2, 2022

pypa/setuptools#3145

@AdamMajer
Copy link
Contributor

node-gyp has same issue here (nodejs/node-gyp#2869) so the solution is probably to use same solution.

BTW, this is already causing build failures for Fedora Rawhide

@cclauss cclauss changed the title Python 3 deprecation warning in configure.py distutils package deprecation warning in configure.py Aug 12, 2023
@cclauss
Copy link
Contributor

cclauss commented Aug 12, 2023

Yes. The code in question is vendored in from Node-gyp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. python PRs and issues that require attention from people who are familiar with Python.
Projects
None yet
Development

No branches or pull requests

4 participants