Skip to content

Commit 956fc5a

Browse files
rruuaanngsrinivasreddy
authored andcommitted
pythongh-126585: Add EHWPOISON error code (python#126586)
1 parent f1354ca commit 956fc5a

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

Doc/library/errno.rst

+7
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,13 @@ defined by the module. The specific list of defined symbols is available as
613613
No route to host
614614

615615

616+
.. data:: EHWPOISON
617+
618+
Memory page has hardware error.
619+
620+
.. versionadded:: next
621+
622+
616623
.. data:: EALREADY
617624

618625
Operation already in progress. This error is mapped to the

Doc/whatsnew/3.14.rst

+5
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,11 @@ dis
345345
This feature is also exposed via :option:`dis --show-positions`.
346346
(Contributed by Bénédikt Tran in :gh:`123165`.)
347347

348+
errno
349+
-----
350+
351+
* Add :data:`errno.EHWPOISON` error code.
352+
(Contributed by James Roy in :gh:`126585`.)
348353

349354
fractions
350355
---------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :data:`~errno.EHWPOISON` error code to :mod:`errno`.

Modules/errnomodule.c

+3
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,9 @@ errno_exec(PyObject *module)
845845
#ifdef ENOKEY
846846
add_errcode("ENOKEY", ENOKEY, "Required key not available");
847847
#endif
848+
#ifdef EHWPOISON
849+
add_errcode("EHWPOISON", EHWPOISON, "Memory page has hardware error");
850+
#endif
848851
#ifdef EKEYEXPIRED
849852
add_errcode("EKEYEXPIRED", EKEYEXPIRED, "Key has expired");
850853
#endif

0 commit comments

Comments
 (0)