Fix provider distribution builds failing with flit 4 - #71118
Merged
Conversation
flit 4.0 removed the --setup-py/--no-setup-py options, so every flit-backed provider build now aborts during argument parsing as soon as flit 4 resolves. Not generating setup.py has been flit's default since well before the 3.12 floor breeze requires, so no longer asking for it explicitly leaves the built distributions unchanged.
`flit build` does not use PEP 517 build isolation, so whichever flit_core is installed becomes the backend for every provider distribution and the `flit_core==3.12.0` pin each provider declares never applies on the path we release from. flit_core 4.0.1 writes Import-Name and Import-Namespace without a trailing newline (pypa/flit#813), consuming the blank line that separates the metadata headers from the description, so the resulting METADATA parses with MissingHeaderBodySeparatorDefect. Removal of the cap is tracked at apache#71121.
The assertion mirrors the argv literal it guards and mocks away the argument parser that actually rejected the flag, so it detects reverts rather than the class of breakage it was written for. The provider distribution build jobs cover that.
…fect flit 4.0.2 fixed the METADATA corruption the comment cited, but the reason to hold the backend at 3.12.0 is that nothing has exercised flit 4 against provider distributions or the reproducible-build checks.
rjgoyln
marked this pull request as ready for review
August 4, 2026 20:52
rjgoyln
requested review from
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
gopidesupavan,
jason810496,
jedcunningham,
jscheffl,
potiuk and
vatsrahul1001
as code owners
August 4, 2026 20:52
1 task
vatsrahul1001
approved these changes
Aug 5, 2026
potiuk
approved these changes
Aug 5, 2026
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
vatsrahul1001
added a commit
that referenced
this pull request
Aug 5, 2026
) (#71149) * Fix provider distribution builds failing with flit 4 flit 4.0 removed the --setup-py/--no-setup-py options, so every flit-backed provider build now aborts during argument parsing as soon as flit 4 resolves. Not generating setup.py has been flit's default since well before the 3.12 floor breeze requires, so no longer asking for it explicitly leaves the built distributions unchanged. * Cap flit below 4 so provider distributions keep valid metadata `flit build` does not use PEP 517 build isolation, so whichever flit_core is installed becomes the backend for every provider distribution and the `flit_core==3.12.0` pin each provider declares never applies on the path we release from. flit_core 4.0.1 writes Import-Name and Import-Namespace without a trailing newline (pypa/flit#813), consuming the blank line that separates the metadata headers from the description, so the resulting METADATA parses with MissingHeaderBodySeparatorDefect. Removal of the cap is tracked at #71121. * Drop the flit flag regression test The assertion mirrors the argv literal it guards and mocks away the argument parser that actually rejected the flag, so it detects reverts rather than the class of breakage it was written for. The provider distribution build jobs cover that. * Rest the flit cap on the unvalidated backend rather than the 4.0.1 defect flit 4.0.2 fixed the METADATA corruption the comment cited, but the reason to hold the backend at 3.12.0 is that nothing has exercised flit 4 against provider distributions or the reproducible-build checks. --------- (cherry picked from commit 9a85faa) Co-authored-by: rjgoyln <151457491+rjgoyln@users.noreply.github.com> Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001
added a commit
that referenced
this pull request
Aug 5, 2026
) (#71149) * Fix provider distribution builds failing with flit 4 flit 4.0 removed the --setup-py/--no-setup-py options, so every flit-backed provider build now aborts during argument parsing as soon as flit 4 resolves. Not generating setup.py has been flit's default since well before the 3.12 floor breeze requires, so no longer asking for it explicitly leaves the built distributions unchanged. * Cap flit below 4 so provider distributions keep valid metadata `flit build` does not use PEP 517 build isolation, so whichever flit_core is installed becomes the backend for every provider distribution and the `flit_core==3.12.0` pin each provider declares never applies on the path we release from. flit_core 4.0.1 writes Import-Name and Import-Namespace without a trailing newline (pypa/flit#813), consuming the blank line that separates the metadata headers from the description, so the resulting METADATA parses with MissingHeaderBodySeparatorDefect. Removal of the cap is tracked at #71121. * Drop the flit flag regression test The assertion mirrors the argv literal it guards and mocks away the argument parser that actually rejected the flag, so it detects reverts rather than the class of breakage it was written for. The provider distribution build jobs cover that. * Rest the flit cap on the unvalidated backend rather than the 4.0.1 defect flit 4.0.2 fixed the METADATA corruption the comment cited, but the reason to hold the backend at 3.12.0 is that nothing has exercised flit 4 against provider distributions or the reproducible-build checks. --------- (cherry picked from commit 9a85faa) Co-authored-by: rjgoyln <151457491+rjgoyln@users.noreply.github.com> Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
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.
Summary
flit 4.0.1, published on 2026-08-04, removed the
--setup-py/--no-setup-pyoptions, and breeze depended onflit>=3.12.0with no upper bound, so CI resolved it within minutes of upload and every flit-backed provider build began aborting during argument parsing. The flag has been a no-op since long before the 3.12 floor breeze requires, so dropping it unblocks CI.The cap keeps that backend where CI has exercised it.
flit builduses no PEP 517 build isolation, so whicheverflit_coreis installed builds every provider distribution and theflit_core==3.12.0pin each provider declares never applies on the path we release from — which is how a new major became the build backend without anyone choosing it. flit 4 moves core metadata to 2.5 among other changes to build output, none of it exercised against provider distributions or the reproducible-build checks; #71121 tracks adopting it deliberately.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines