]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 29 Aug 2025 14:35:17 +0000 (16:35 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Aug 2025 14:35:17 +0000 (00:35 +1000)
---------
(cherry picked from commit 5f7906715adea645d8141d5337851872cfca4381)

Co-authored-by: Hang <bebound@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Doc/library/exceptions.rst
Doc/library/warnings.rst

index f47cc0abb8b667fe2eca81be89121f9322ec8ef7..59043886dabe3bb19404180f42b9ab4872e8caf4 100644 (file)
@@ -880,6 +880,9 @@ The following exceptions are used as warning categories; see the
 
    Base class for warnings about dubious syntax.
 
+   This warning is typically emitted when compiling Python source code, and usually won't be reported
+   when running already compiled code.
+
 
 .. exception:: RuntimeWarning
 
index 288181a982685886a4f922569b1f0f15fd033544..25f54ba7fb85bf743a21ca4912c04dfaf01a7bfd 100644 (file)
@@ -80,7 +80,9 @@ The following warnings category classes are currently defined:
 |                                  | unless triggered by code in ``__main__``).    |
 +----------------------------------+-----------------------------------------------+
 | :exc:`SyntaxWarning`             | Base category for warnings about dubious      |
-|                                  | syntactic features.                           |
+|                                  | syntactic features (typically emitted when    |
+|                                  | compiling Python source code, and hence       |
+|                                  | may not be suppressed by runtime filters)     |
 +----------------------------------+-----------------------------------------------+
 | :exc:`RuntimeWarning`            | Base category for warnings about dubious      |
 |                                  | runtime features.                             |