]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-148320: document that `import sys.monitoring` raises `ModuleNotFoundError...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 11 Apr 2026 15:30:24 +0000 (17:30 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Apr 2026 15:30:24 +0000 (15:30 +0000)
gh-148320: document that `import sys.monitoring` raises `ModuleNotFoundError` (GH-148365)
(cherry picked from commit d7c9f1877cbd733d6c0fda395a9fcf78171f51b0)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Doc/library/sys.monitoring.rst

index 4a460479e4afd74d636d15752fefbb47ce3df60a..16e6b1d6dc786b08500ee81485d9d2e8473c5858 100644 (file)
@@ -11,9 +11,9 @@
 .. note::
 
     :mod:`!sys.monitoring` is a namespace within the :mod:`sys` module,
-    not an independent module, so there is no need to
-    ``import sys.monitoring``, simply ``import sys`` and then use
-    ``sys.monitoring``.
+    not an independent module, and ``import sys.monitoring`` would fail
+    with a :exc:`ModuleNotFoundError`. Instead, simply ``import sys``
+    and then use ``sys.monitoring``.
 
 
 This namespace provides access to the functions and constants necessary to