Skip to content

Docs: Note that ResourceWarning is often delayed and needs an extra filter#14727

Open
Joosboy wants to merge 3 commits into
pytest-dev:mainfrom
Joosboy:docs/9825-resource-warnings
Open

Docs: Note that ResourceWarning is often delayed and needs an extra filter#14727
Joosboy wants to merge 3 commits into
pytest-dev:mainfrom
Joosboy:docs/9825-resource-warnings

Conversation

@Joosboy

@Joosboy Joosboy commented Jul 19, 2026

Copy link
Copy Markdown

Closes #9825.

Adds a brief explanation to the Resource Warnings section in doc/en/how-to/capture-warnings.rst that ResourceWarnings are often delayed until garbage collection, meaning they are caught internally by pytest and emitted as PytestUnraisableExceptionWarning. This clarifies that users must filter both warnings to properly catch and suppress or error on them.

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.

Docs on warnings filters should note that ResourceWarning is often delayed

1 participant