Repository navigation
fix for setuptools deprecated - #686
Open
rishi29-cloud wants to merge 1 commit into
Open
rishi29-cloud wants to merge 1 commit into
rishi29-cloud wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[ ] Wrote test for feature — N/A, this is a build/packaging change with no runtime behaviour change
[ ] Added changes to CHANGELOG.md
Changes proposed:
make installcurrently emits two deprecation warnings, andtoxfails outright:The root cause is that
setup.pystill importssetuptools.command.testand registers aPyTestcommand viacmdclass={'test': PyTest}. That module was removed in Setuptools 72, so any invocation ofsetup.py test— which is whattoxruns — now raises. Separately,make installand the CI workflow invoke the deprecatedsetup.py develop.This PR removes the deprecated machinery and moves to standards-based tooling:
setup.py— dropped thefrom setuptools.command.test import test as TestCommandimport, thePyTestcommand class it fed, and thecmdclass/tests_requirearguments. Package metadata is otherwise unchanged, so nothing about what gets installed changes.Makefile—make installnow runspython3 -m pip install -e .instead ofsetup.py develop;make testrunspytest.tox.ini—commandsrunspytestinstead ofpython setup.py test. Addedbokeh>=3.0.0andbokeh_sampledatatodeps: the tox environment never listed bokeh at all, sotests/test_tables.pywould still have failed onfrom bokeh.sampledata.autompg import autompgeven after the command swap. Newer bokeh moved the sample datasets out to the separatebokeh_sampledatapackage, which the import shim forwards to.requirements-tests.txt— pinned the barebokehtobokeh>=3.0.0(pytestandbokeh-sampledatawere already listed)..github/workflows/run_tests.yml— the CI workflow also ranpython setup.py develop, which would have broken in CI the same way tox did. Nowpython -m pip install -e ..tests.py— kept as a working entry point, but it no longer hardcodes the pytest flags.The pytest options that were previously duplicated between
setup.pyandtests.pynow live in a single[pytest]section intox.ini(addopts = --nbval-lax --cov=datascience,testpaths = tests), so barepytest,make testandtoxall behave identically to the oldsetup.py testinvocation. Coverage reporting for the Coveralls step is therefore preserved.Deliberately left out of scope, happy to fold in if maintainers prefer:
DEVELOPERS.mdstill documentspython setup.py sdist/bdist_wheelfor publishing, which is deprecated the same