Skip to content

Pre-mark pytest_plugins for assertion rewrite - #15039

Open
SemTiOne wants to merge 2 commits into
pytest-dev:mainfrom
SemTiOne:fix/2353-preregister-assert-rewrite
Open

SemTiOne wants to merge 2 commits into
pytest-dev:mainfrom
SemTiOne:fix/2353-preregister-assert-rewrite

Conversation

@SemTiOne

Copy link
Copy Markdown
Contributor

pytest_plugins entries are now marked for rewriting before any import runs, so plugins pulled in as a side effect are rewritten too.

Blocked, registered, or already imported plugins behave as before.

Closes #2353.

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.
  • Add text like closes #XYZW to the PR description and/or commits (where XYZW is the issue number). See the github docs for more information.
  • If AI agents were used, they are credited in Co-authored-by commit trailers.
  • Create a new changelog file in the changelog directory, with a name like <ISSUE NUMBER>.<TYPE>.rst. See changelog/README.rst for details.
  • Add yourself to AUTHORS in alphabetical order.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Sep 16, 2026
@SemTiOne
SemTiOne marked this pull request as ready for review September 16, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin registration for assert rewrite for pytest_plugins is done one at a time at import time

2 participants