Migrate package metadata from setup.py to pyproject.toml (PEP 621)
@sl0thentr0py đang làm issue này rồi.
Từ ngày 29/5/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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)
- Ngôn ngữ chính
- Python
- Star
- 2.2k
- Fork
- 672
- Merge trung bình
- 23 giờ 14 phút
- Pull request đã merge (30 ngày)
- 218
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-python#7543 · 2 bình luận · 1 người được giao ·
-
Python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getsentry/sentry-python#6992 · 1 bình luận ·
-
Improvement Python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
getsentry/sentry-python#6970 · 1 bình luận ·
-
Bug Python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
getsentry/sentry-python#6504 · 1 bình luận ·
-
Improvement Python Spans
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-python#5833 · 1 bình luận ·
Tất cả issue của getsentry/sentry-python
Issue tương tự
-
bug ci good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
documentation
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
inmanta/inmanta-core#10835 ·
-
sponsored
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
opensubtitlescom: moviehash never sent when opensubtitles (.org) is not in the provider list Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Diaoul/subliminal#1382 ·