https://github.com/python/cpython/commit/84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d
commit: 84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d
branch: main
author: RUANG (James Roy) <[email protected]>
committer: erlend-aasland <[email protected]>
date: 2024-12-03T12:45:50Z
summary:

gh-126585: Add EHWPOISON error code (#126586)

files:
A Misc/NEWS.d/next/Library/2024-11-04-22-02-30.gh-issue-85046.Y5d_ZN.rst
M Doc/library/errno.rst
M Doc/whatsnew/3.14.rst
M Modules/errnomodule.c

diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst
index 4983b8961b1c3f..824d489818fac9 100644
--- a/Doc/library/errno.rst
+++ b/Doc/library/errno.rst
@@ -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
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 75d027d33ccd16..7bb9657e6ed9da 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -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
index 00000000000000..ae1392e2caf387
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-11-04-22-02-30.gh-issue-85046.Y5d_ZN.rst
@@ -0,0 +1 @@
+Add :data:`~errno.EHWPOISON` error code to :mod:`errno`.
diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c
index 3f96f2f846d612..9557d68e759497 100644
--- a/Modules/errnomodule.c
+++ b/Modules/errnomodule.c
@@ -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

_______________________________________________
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]

Reply via email to