Keep usefixtures fixtures ahead of autouse dependencies - #14993
Closed
wolfgang-aura wants to merge 1 commit into
Closed
Keep usefixtures fixtures ahead of autouse dependencies#14993wolfgang-aura wants to merge 1 commit into
wolfgang-aura wants to merge 1 commit into
Conversation
wolfgang-aura
pushed a commit
to wolfgang-aura/Mailman
that referenced
this pull request
Sep 9, 2026
`prepare-submission` writes `pull-request.md` for the person preparing the submission: placeholder paragraphs, a "Before filing" checklist, a suggested branch. Whatever survives the rewrite into the final body is read by a maintainer as part of the argument for the change, and nothing checked for it. pytest-dev/pytest#14993 was filed with the alternative-not-taken heading, the host-environment section, and "Human review and filing remain pending" still in the body. Adds `draft_leftovers` to mailman/handoff.py, in three families: draft scaffolding, sentences saying the work is still pending, and references to run IDs or `.mailman` paths. `handoff` exits non-zero and prints the offending lines under DRAFT LEFTOVERS; `handoff-check` refuses with reason `draft-leftovers`, the same shape as the existing first-person-claim gate. The pending and internal families are matched per paragraph, because a sentence that survives a rewrite gets re-wrapped and a line-at-a-time search misses it. Length is deliberately not judged: whether a section earns its place is the writer's call, and the standard still asks for host limits to be stated. Records in docs/runs/0010 that nothing was posted upstream on the pytest issue and why. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkBjZjTgi45fqneyWicr3L
wolfgang-aura
added a commit
to wolfgang-aura/Mailman
that referenced
this pull request
Sep 11, 2026
`claims` now records when the issue closed, who reported it and whether a maintainer has replied. `handoff-check` refuses a pull request whose issue is closed; `handoff` prints an UNTRIAGED ISSUE section when the reporter is outside the project and nobody who speaks for it has answered. pdm-project/pdm#3884 was filed nine hours after its maintainer closed the issue, with the state already in claims.json. pytest-dev/pytest#14993 was filed on a thirteen-hour-old outside report whose premise the reporter later withdrew. Both closed without a word. Closes #88. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
Closes #14992.
Pytest 9.1 changed fixture-closure construction so a fixture requested with
usefixturescan be set up after the dependencies of an earlier autousefixture. This can move a guard or other setup action after the work it was
intended to protect.
The regression came from traversing every initial fixture name depth-first
before honoring the established order of the initial requests. The fix keeps
the initial fixture names ahead of their transitive dependencies, preserves
scope ordering for the expanded closure, updates the affected order
expectations, adds a regression test for the reported setup order, and records
the behavior in a bug-fix changelog entry.
How this was tested
At the reported base commit
3fd8675d6d798507c06cf9c60753be6d9d7b0e17, themachine-checked reproduction failed with the observed order
['precondition', 'subject_deps', 'guard', 'subject']. After the change, thefinal independent fixture-suite verification reported
241 passed, 3 xfailed.The checks ran on Windows 11. Mailman recorded Python 3.14.3 for the host
command metadata. A separate reviewer probe of nested pytester invocations
encountered existing Windows cache-permission failures in unrelated cases; the
issue-specific regression passed independently.
An alternative not taken
The implementation could special-case only
usefixturesnames after thedepth-first traversal. Restoring the initial-name prefix keeps the established
precedence rule in the shared closure algorithm and avoids a second ordering
mechanism, while the existing scope sort still handles the expanded fixture
set.
AI disclosure
This change was drafted with AI assistance: codex (
gpt-5.6-luna) wrote thepatch and codex (
gpt-5.6-luna) reviewed it under Mailman. The test resultsabove were executed by the Mailman harness. Human review and filing remain
pending.