diff options
author | RUANG (James Roy) <rruuaanng@outlook.com> | 2024-12-03 12:45:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-03 12:45:50 (GMT) |
commit | 84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d (patch) | |
tree | c3c89ddd2548d14559628e8a2a20fc84c1e23ac7 | |
parent | 35d37d6592d1be71ea76042165f6cbfa6c4c3a17 (diff) | |
download | cpython-84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d.zip cpython-84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d.tar.gz cpython-84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d.tar.bz2 |
gh-126585: Add EHWPOISON error code (#126586)
-rw-r--r-- | Doc/library/errno.rst | 7 | ||||
-rw-r--r-- | Doc/whatsnew/3.14.rst | 5 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-11-04-22-02-30.gh-issue-85046.Y5d_ZN.rst | 1 | ||||
-rw-r--r-- | Modules/errnomodule.c | 3 |
4 files changed, 16 insertions, 0 deletions
diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index 4983b89..824d489 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 75d027d..7bb9657 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 0000000..ae1392e --- /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 3f96f2f..9557d68 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 |