build(pyproject): drop unused setuptools runtime dependency

setuptools became a dependency in commit 249fcf8e3e ("Add setuptools
to dependencies") because app.py imported pkg_resources and Rye-managed
virtualenvs do not ship setuptools. That import was replaced in
commit 852f501485 ("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]].

[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: https://github.com/simonw/datasette/issues/2065
Ref: https://github.com/simonw/datasette/issues/2057
This commit is contained in:
Luke Hsiao 2026-07-12 13:08:36 -06:00
commit 3a7e9dd63e

View file

@ -37,7 +37,6 @@ dependencies = [
"itsdangerous>=1.1",
"sqlite-utils>=4.0",
"asyncinject>=0.7",
"setuptools",
"pip",
"pydantic>=2",
]