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

Disutils is deprecated in Python 3.12 #307

Open
Zsailer opened this issue Oct 10, 2024 · 0 comments
Open

Disutils is deprecated in Python 3.12 #307

Zsailer opened this issue Oct 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Zsailer
Copy link
Member

Zsailer commented Oct 10, 2024

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants