Skip to content

Commit 296b6f5

Browse files
miss-islingtonbeboundncoghlan
authored andcommitted
[3.14] pythongh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation (pythongh-122844) (python#138244)
Co-authored-by: Hang <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]>
1 parent 71e1162 commit 296b6f5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Doc/library/exceptions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,9 @@ The following exceptions are used as warning categories; see the
890890

891891
Base class for warnings about dubious syntax.
892892

893+
This warning is typically emitted when compiling Python source code, and usually won't be reported
894+
when running already compiled code.
895+
893896

894897
.. exception:: RuntimeWarning
895898

Doc/library/warnings.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ The following warnings category classes are currently defined:
8080
| | unless triggered by code in ``__main__``). |
8181
+----------------------------------+-----------------------------------------------+
8282
| :exc:`SyntaxWarning` | Base category for warnings about dubious |
83-
| | syntactic features. |
83+
| | syntactic features (typically emitted when |
84+
| | compiling Python source code, and hence |
85+
| | may not be suppressed by runtime filters) |
8486
+----------------------------------+-----------------------------------------------+
8587
| :exc:`RuntimeWarning` | Base category for warnings about dubious |
8688
| | runtime features. |

0 commit comments

Comments
 (0)