From 450bb40730218302199eb5ff9ffbb5f4a1700980 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Tue, 28 Jan 2025 11:25:06 -0500 Subject: [PATCH 1/4] Clarify SystemError description --- Doc/library/exceptions.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index f72b11e34c5c3d..0f5989c8bf1c9b 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -562,15 +562,17 @@ The following exceptions are the exceptions that are usually raised. Raised when the interpreter finds an internal error, but the situation does not look so serious to cause it to abandon all hope. The associated value is a - string indicating what went wrong (in low-level terms). + string indicating what went wrong (in low-level terms). In :term:`CPython`, + this could be raised by incorrectly using Python's C API, such as returning + a ``NULL`` value without an exception set. - You should report this to the author or maintainer of your Python interpreter. + If you're confident that this exception wasn't your fault, you should + report this to the author or maintainer of your Python interpreter. Be sure to report the version of the Python interpreter (``sys.version``; it is also printed at the start of an interactive Python session), the exact error message (the exception's associated value) and if possible the source of the program that triggered the error. - .. exception:: SystemExit This exception is raised by the :func:`sys.exit` function. It inherits from From 19194bbcce8e5cf0eedfea88c9811c2cacc8b97a Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Tue, 28 Jan 2025 11:25:34 -0500 Subject: [PATCH 2/4] Fix stray newline change. --- Doc/library/exceptions.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 0f5989c8bf1c9b..174873b43fcda3 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -573,6 +573,7 @@ The following exceptions are the exceptions that are usually raised. message (the exception's associated value) and if possible the source of the program that triggered the error. + .. exception:: SystemExit This exception is raised by the :func:`sys.exit` function. It inherits from From c7d27611fa0dd316ab8861a9461efec192e69ce1 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Tue, 28 Jan 2025 12:52:46 -0500 Subject: [PATCH 3/4] Add note about packages. --- Doc/library/exceptions.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 174873b43fcda3..b8319fdeb80783 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -566,12 +566,13 @@ The following exceptions are the exceptions that are usually raised. this could be raised by incorrectly using Python's C API, such as returning a ``NULL`` value without an exception set. - If you're confident that this exception wasn't your fault, you should - report this to the author or maintainer of your Python interpreter. - Be sure to report the version of the Python interpreter (``sys.version``; it is - also printed at the start of an interactive Python session), the exact error - message (the exception's associated value) and if possible the source of the - program that triggered the error. + If you're confident that this exception wasn't your fault, or the fault of + a package you're using, you should report this to the author or maintainer + of your Python interpreter. Be sure to report the version of the Python + interpreter (``sys.version``; it is also printed at the start of an + interactive Python session), the exact error message (the exception's + associated value) and if possible the source of the program that triggered + the error. .. exception:: SystemExit From 9d99859e1f3ba856dbaff971d099c47bfc55b610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric?= Date: Thu, 30 Jan 2025 18:38:58 -0500 Subject: [PATCH 4/4] de-reindent --- Doc/library/exceptions.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index b8319fdeb80783..319d261ef3fb4d 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -568,11 +568,11 @@ The following exceptions are the exceptions that are usually raised. If you're confident that this exception wasn't your fault, or the fault of a package you're using, you should report this to the author or maintainer - of your Python interpreter. Be sure to report the version of the Python - interpreter (``sys.version``; it is also printed at the start of an - interactive Python session), the exact error message (the exception's - associated value) and if possible the source of the program that triggered - the error. + of your Python interpreter. + Be sure to report the version of the Python interpreter (``sys.version``; it is + also printed at the start of an interactive Python session), the exact error + message (the exception's associated value) and if possible the source of the + program that triggered the error. .. exception:: SystemExit