https://github.com/python/cpython/commit/5f7906715adea645d8141d5337851872cfca4381 commit: 5f7906715adea645d8141d5337851872cfca4381 branch: main author: Hang <[email protected]> committer: ncoghlan <[email protected]> date: 2025-08-29T23:29:59+10:00 summary:
gh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation (gh-122844) --------- Co-authored-by: Alyssa Coghlan <[email protected]> files: M Doc/library/exceptions.rst M Doc/library/warnings.rst diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index a73cc2e8a2dd3e..89ebb69d931c9d 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -897,6 +897,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 diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index 05e061cc697778..b6392450a1722f 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -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. | _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
