]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-126585: Add EHWPOISON error code (#126586)
authorRUANG (James Roy) <rruuaanng@outlook.com>
Tue, 3 Dec 2024 12:45:50 +0000 (20:45 +0800)
committerGitHub <noreply@github.com>
Tue, 3 Dec 2024 12:45:50 +0000 (12:45 +0000)
Doc/library/errno.rst
Doc/whatsnew/3.14.rst
Misc/NEWS.d/next/Library/2024-11-04-22-02-30.gh-issue-85046.Y5d_ZN.rst [new file with mode: 0644]
Modules/errnomodule.c

index 4983b8961b1c3f3f5073c2286afd01163e34a9d6..824d489818fac9e47a9cc85f4153836f4863ec0c 100644 (file)
@@ -613,6 +613,13 @@ defined by the module.  The specific list of defined symbols is available as
    No route to host
 
 
+.. data:: EHWPOISON
+
+   Memory page has hardware error.
+
+   .. versionadded:: next
+
+
 .. data:: EALREADY
 
    Operation already in progress. This error is mapped to the
index 75d027d33ccd164d6de98c8792db6ce0ba9790f7..7bb9657e6ed9dad1ad3a4207cdbae97ee007acb4 100644 (file)
@@ -345,6 +345,11 @@ dis
   This feature is also exposed via :option:`dis --show-positions`.
   (Contributed by Bénédikt Tran in :gh:`123165`.)
 
+errno
+-----
+
+* Add :data:`errno.EHWPOISON` error code.
+  (Contributed by James Roy in :gh:`126585`.)
 
 fractions
 ---------
diff --git a/Misc/NEWS.d/next/Library/2024-11-04-22-02-30.gh-issue-85046.Y5d_ZN.rst b/Misc/NEWS.d/next/Library/2024-11-04-22-02-30.gh-issue-85046.Y5d_ZN.rst
new file mode 100644 (file)
index 0000000..ae1392e
--- /dev/null
@@ -0,0 +1 @@
+Add :data:`~errno.EHWPOISON` error code to :mod:`errno`.
index 3f96f2f846d6129b471139a7cf81a1fa5abc14f5..9557d68e759497b083c9bf93290db4b60e9d51e9 100644 (file)
@@ -845,6 +845,9 @@ errno_exec(PyObject *module)
 #ifdef ENOKEY
     add_errcode("ENOKEY", ENOKEY, "Required key not available");
 #endif
+#ifdef EHWPOISON
+    add_errcode("EHWPOISON", EHWPOISON, "Memory page has hardware error");
+#endif
 #ifdef EKEYEXPIRED
     add_errcode("EKEYEXPIRED", EKEYEXPIRED, "Key has expired");
 #endif