[3.13] gh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation (gh-138243)

---------
(cherry picked from commit 5f7906715a)

Co-authored-by: Hang <bebound@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-08-29 16:35:17 +02:00 committed by GitHub
parent f6536d48cd
commit e93cacb8cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View 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

View 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. |