build(pyproject): drop unused setuptools runtime dependency#2838
Open
lukehsiao wants to merge 1 commit into
Open
build(pyproject): drop unused setuptools runtime dependency#2838lukehsiao wants to merge 1 commit into
lukehsiao wants to merge 1 commit into
Conversation
setuptools became a dependency in commit 249fcf8 ("Add setuptools to dependencies") because app.py imported pkg_resources and Rye-managed virtualenvs do not ship setuptools. That import was replaced in commit 852f501 ("Switch from pkg_resources to importlib.metadata in app.py, refs simonw#2057"), so nothing in Datasette has consumed the dependency since. pluggy's load_setuptools_entrypoints() reads entry points through importlib.metadata despite its name, and the publish/package Dockerfile templates never reference setuptools. Discovered using `pyproject-udeps` [[1]]. [1]: https://github.com/lukehsiao/pyproject-udeps Tested: in a fresh uv venv, which ships without setuptools: $ uv venv t && uv pip install --python t/bin/python . $ t/bin/python -c "import setuptools" ModuleNotFoundError: No module named 'setuptools' $ t/bin/datasette --version datasette, version 1.0a36 $ t/bin/datasette plugins [] $ t/bin/datasette --get /-/versions.json {"ok": true, ...} Ref: simonw#2065 Ref: simonw#2057
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.
setuptools became a dependency in commit 249fcf8 ("Add setuptools to dependencies") because app.py imported pkg_resources and Rye-managed virtualenvs do not ship setuptools. That import was replaced in commit 852f501 ("Switch from pkg_resources to importlib.metadata in app.py, refs #2057"), so nothing in Datasette has consumed the dependency since. pluggy's load_setuptools_entrypoints() reads entry points through importlib.metadata despite its name, and the publish/package Dockerfile templates never reference setuptools.
Discovered using
pyproject-udeps[1].Tested: in a fresh uv venv, which ships without setuptools:
Ref: #2065
Ref: #2057