Closed
Description
Bug report
Bug description:
The doc of warnings.warn()
says skip_file_prefixes
is None
by default as shown below:
warnings.warn(message, category=None, stacklevel=1, source=None, *, skip_file_prefixes=None)
But, setting None
to skip_file_prefixes
gets the error as shown below:
import warnings
warnings.warn(message='Warning',
category=None,
stacklevel=1,
source=None,
skip_file_prefixes=None) # Error
# ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
TypeError: warn() argument 'skip_file_prefixes' must be tuple, not None
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs
- gh-125818: Fix incorrect signature of argument
skip_file_prefixes
in warnings docs #125823 - [3.13] gh-125818: Fix incorrect signature of argument
skip_file_prefixes
in warnings docs (GH-125823) #126216 - [3.12] gh-125818: Fix incorrect signature of argument
skip_file_prefixes
in warnings docs (GH-125823) #126217
Metadata
Metadata
Assignees
Projects
Status
Todo