Skip to content

Disutils is deprecated in Python 3.12 #307

Open
@Zsailer

Description

See https://docs.python.org/3.10/whatsnew/3.10.html#distutils

nbclassic depends on distutils to build:

nbclassic/setup.py

Lines 72 to 97 in 9ae4cb1

from distutils.command.build_py import build_py
from distutils.command.sdist import sdist
from setuptools.command.bdist_egg import bdist_egg
from setuptools.command.develop import develop
class bdist_egg_disabled(bdist_egg):
"""Disabled version of bdist_egg
Prevents setup.py install from performing setuptools' default easy_install,
which it should never ever do.
"""
def run(self):
sys.exit("Aborting implicit building of eggs. Use `pip install .` to install from source.")
setup_args['cmdclass'] = {
'build_py': css_js_prerelease(
check_package_data_first(build_py)),
'sdist' : css_js_prerelease(sdist, strict=True),
'develop': css_js_prerelease(develop),
'css' : CompileCSS,
'backendtranslations': CompileBackendTranslation,
'js' : CompileJS,
'jsdeps' : Bower,
'jsversion' : JavascriptVersion,
'bdist_egg': bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled,
}

This means, in Python 3.13 (released last week), using the setup.py to build nbclassic will fail.

Can we try:

  • adding Python 3.13 to our test matrix,
  • removing the distutils portion...and possibly replace the setup.py(?) for pyproject.toml?

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions