Migrate package metadata from setup.py to pyproject.toml (PEP 621)
@sl0thentr0py ci sta già lavorando.
Dal 29/5/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Background
The package metadata still lives in setup.py (name, version, dependencies, extras, entry points, classifiers, etc.). pyproject.toml currently only carries tool configuration (coverage, pytest, mypy, ruff).
With the tox/uv migration landing (see #6325, #6327, #6367, and the rest of the chore/migrate-to-tox-uv work), the distribution itself is the last piece still using legacy setuptools configuration. Moving to PEP 621 [project] metadata would:
- Make the project introspectable by modern tooling (
uv sync,uv add,pip install .without executing arbitrary Python, build frontends, dependency scanners, SBOM tools). - Eliminate the
setup.pyexecution step during builds. - Align with the direction setuptools itself recommends.
Scope
Port everything currently in setup.py into pyproject.toml:
-
[build-system]table (setuptools backend) -
[project]table:name,version,description,readme,requires-python,license,authors,urls,classifiers -
[project] dependencies←install_requires -
[project.optional-dependencies]←extras_require(all ~40 extras — names must match exactly; they're public API) -
[project.entry-points.\"opentelemetry_propagator\"]←entry_points -
[tool.setuptools] zip-safe = false -
[tool.setuptools.package-data]forpy.typed(PEP 561) -
[tool.setuptools.packages.find]withtests*excluded - Verify
MANIFEST.instill behaves correctly (or fold intoinclude-package-data) - Update release tooling (
.craft.yml, version-bump scripts) to read/write the version inpyproject.tomlinstead ofsetup.py - Remove
setup.pyonce the above is verified
Verification
-
python -m buildproduces an sdist + wheel byte-identical in contents (modulo metadata format) to the current release -
pip install sentry-sdk[flask],[django],[opentelemetry], etc. resolve identically -
py.typedis shipped in the wheel -
tests/is not shipped in the wheel - OTel propagator entry point is discoverable post-install
- Release pipeline dry-run succeeds
Risks
- Public-facing extras names — a typo silently breaks
pip install sentry-sdk[name]. - Version bump automation — release tooling likely greps
setup.py. python_requires=\">=3.6\"in currentsetup.pylooks stale vs. the rest of the repo; worth confirming the intended floor before carrying it forward.
Related
- Tox/uv migration: #6325, #6327, #6367, et al.
- #6121 (removed
bdist_wheeluniversal option) - #5932 (license classifier inconsistency — pyproject migration is a chance to fix cleanly via
licensefield)
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 672
- Merge medio
- 23h 14m
- PR unite (30g)
- 218
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-python#7543 · 2 commenti · 1 assegnatario ·
-
Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-python#6992 · 1 commento ·
-
Improvement Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-python#6970 · 1 commento ·
-
Bug Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
getsentry/sentry-python#6504 · 1 commento ·
-
Improvement Python Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
getsentry/sentry-python#5833 · 1 commento ·
Tutte le issue di getsentry/sentry-python
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
triage/confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
agentscope-ai/agentscope#2775 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
comp/desktop P3 type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
NousResearch/hermes-agent#118866 ·