8000 bpo-42272: remove bad submodule warning filter doc · python/cpython@1767ef9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1767ef9

Browse files
committed
bpo-42272: remove bad submodule warning filter doc
The `error:::mymodule[.*]` example in the "Describing Warning Filters" section of the warnings module documentation does not behave as the comment describes. Since the module portion of the filter string is interpreted literally, it would match a module with a fully-qualified name that is literally `mymodule[.*]`. Unfortunately, there is not a way to match '"module" and any subpackages of "mymodule"' as documented, since the module part of a filter string is matched literally. Instead, update the filter and comment to match only "mymodule". skip news (since this is a doc fix) Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
1 parent a2a6100 commit 1767ef9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Doc/library/warnings.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ Some examples::
212212
error::ResourceWarning # Treat ResourceWarning messages as errors
213213
default::DeprecationWarning # Show DeprecationWarning messages
214214
ignore,default:::mymodule # Only report warnings triggered by "mymodule"
215-
error:::mymodule[.*] # Convert warnings to errors in "mymodule"
216-
# and any subpackages of "mymodule"
215+
error:::mymodule # Convert warnings to errors in "mymodule"
217216

218217

219218
.. _default-warning-filter:

0 commit comments

Comments
 (0)
0