Skip to content

ci: build sdist with python -m build for a PEP 625-compliant filename#712

Merged
wbarnha merged 1 commit into
masterfrom
claude/fix-sdist-pep625
Jul 19, 2026
Merged

ci: build sdist with python -m build for a PEP 625-compliant filename#712
wbarnha merged 1 commit into
masterfrom
claude/fix-sdist-pep625

Conversation

@wbarnha

@wbarnha wbarnha commented Jul 19, 2026

Copy link
Copy Markdown
Member

Description

The v0.12.0 publish job failed uploading the sdist to PyPI
(run):

400 Filename 'faust-streaming-0.12.0.tar.gz' is invalid,
    should be 'faust_streaming-0.12.0.tar.gz'.

All wheels uploaded fine (faust_streaming-0.12.0-*.whl, 200 OK) — only the
sdist was rejected.

Root cause

The build_sdist job built the tarball with the deprecated
python3 setup.py sdist under an old setuptools>=30.3.0 floor, which emits
the legacy hyphenated distribution filename faust-streaming-0.12.0.tar.gz.
PyPI now enforces PEP 625 and requires the
normalized name (underscores): faust_streaming-0.12.0.tar.gz.

Fix

  • Build the sdist with python -m build --sdist instead of
    setup.py sdist.
  • Raise the [build-system] setuptools floor to >=69, the version that
    normalizes sdist filenames per PEP 625.

The wheels were unaffected (cibuildwheel already emits the normalized name), so
no wheel-side change is needed. The publish step already sets
skip-existing: true, so a re-run will skip the already-uploaded 0.12.0 wheels
and upload only the (now correctly-named) sdist.

Verification

Local python -m build --sdist now produces:

faust_streaming-<version>.tar.gz   ✅  (was faust-streaming-<version>.tar.gz)

Note on recovering the v0.12.0 sdist

v0.12.0's wheels are already on PyPI; only its sdist is missing. Because a
workflow re-run uses the workflow file at the tagged commit (still the old
one), the cleanest way to get a correct sdist published is to cut v0.12.1
with this fix (wheels + sdist rebuild fresh; skip-existing handles any
overlap). Alternatively, build the sdist locally with python -m build --sdist
and twine upload it to the existing 0.12.0 release.

🤖 Generated with Claude Code


Generated by Claude Code

PyPI rejected the v0.12.0 sdist upload:

    400 Filename 'faust-streaming-0.12.0.tar.gz' is invalid,
        should be 'faust_streaming-0.12.0.tar.gz'.

The release job built the sdist with the deprecated `setup.py sdist` under an
old setuptools floor, which emits the legacy hyphenated distribution filename.
PyPI now enforces PEP 625 and requires the normalized name (underscores).

Build the sdist with `python -m build --sdist` instead, and raise the
build-system setuptools floor to >=69 (which normalizes sdist filenames), so
the artifact is named `faust_streaming-<version>.tar.gz`.  The wheels were
already fine (cibuildwheel emits the normalized name).

Verified locally: `python -m build --sdist` now produces
`faust_streaming-<version>.tar.gz`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.15%. Comparing base (3f8e190) to head (edf1592).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #712   +/-   ##
=======================================
  Coverage   94.15%   94.15%           
=======================================
  Files         104      104           
  Lines       11136    11136           
  Branches     1201     1201           
=======================================
  Hits        10485    10485           
  Misses        550      550           
  Partials      101      101           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wbarnha
wbarnha merged commit 411e6dd into master Jul 19, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant