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 is deprecated and removed in Python 3.12 #1659

Open
juliangilbey opened this issue Aug 27, 2024 · 0 comments
Open

distutils is deprecated and removed in Python 3.12 #1659

juliangilbey opened this issue Aug 27, 2024 · 0 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@juliangilbey
Copy link

setup.py currently falls back to distutils if versioneer does not provide the required "build" command:

debugpy/setup.py

Lines 62 to 65 in fb6158a

try:
build = cmds["build"]
except KeyError:
from distutils.command.build import build

But distutils no longer exists in Python 3.12, so this code needs to be updated: either versioneer always provides this, in which case the try/except is unnecessary, or it doesn't, in which case the distutils call needs to be replaced.

There are also calls to distutils in several places in the vendored pydevd, some of which may be important to fix; an rgrep gives these occurrences:

src/debugpy/_vendored/pydevd/setup.py:from distutils.extension import Extension
src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c:    "distutils": {
src/debugpy/_vendored/pydevd/pydev_ipython/inputhook.py:        from distutils.version import LooseVersion as V
src/debugpy/_vendored/pydevd/pydev_ipython/version.py:from distutils.version import LooseVersion
src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c:    "distutils": {
src/debugpy/_vendored/pydevd/setup_pydevd_cython.py:        from distutils.extension import Extension
src/debugpy/_vendored/pydevd/build_tools/build.py:                    from distutils import msvc9compiler
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants