Skip to content

Commit

Permalink
pythongh-126585: Add EHWPOISON error code (python#126586)
Browse files Browse the repository at this point in the history
  • Loading branch information
rruuaanng authored Dec 3, 2024
1 parent 35d37d6 commit 84ff131
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Doc/library/errno.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :data:`~errno.EHWPOISON` error code to :mod:`errno`.
3 changes: 3 additions & 0 deletions Modules/errnomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84ff131

Please sign in to comment.