]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 29 Aug 2025 21:13:09 +0000 (23:13 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Aug 2025 21:13:09 +0000 (00:13 +0300)
Co-authored-by: Hang <bebound@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Doc/library/exceptions.rst
Doc/library/warnings.rst

index 8cc887b8ceb378af8cac4fc4de2817b00217575f..9d3e0a4c20f9eb1e3a8de59b9b49ba0b15f58413 100644 (file)
@@ -890,6 +890,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 00bafd1be4bd0c09a3cde8a4b5aecff490489712..a2bb4b1830dec4f3265b4273eef7cf462160369f 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.                             |