python / python/cpython

warnings.catch_warnings docs: dubious mention of sys.stdout

Open
#129,846 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

https://docs.python.org/3/library/warnings.html#warnings.catch_warnings reads:

If record is True, a list is returned that is progressively populated with objects as seen by a custom showwarning() function (which also suppresses output to sys.stdout).

Was it meant to say sys.stderr instead?
Otherwise, I don't understand why it mentions stdout specifically. I don't see anything about stdout elsewhere in the module docs or in the implementation.

Linked PRs
  • gh-130768

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the warnings.catch_warnings section in docs.python.org/library/warnings.html and compare its statement about sys.stdout with the warnings module implementation. Check linked PR gh-130768 first; done means the documentation accurately describes the output stream and the resulting docs change is consistent with the implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.