From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 18 Apr 2025 20:49:23 +0000 (+0200) Subject: [3.13] gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721... X-Git-Tag: v3.13.4~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=83cb89b941b9d52d3e382c6bf7850209186c31cb;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721) (#132702) gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721) (cherry picked from commit ce31ae5209c976d28d1c21fcbb06c0ae5e50a896) Co-authored-by: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma --- diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 0757ffd57d82..afd660929da3 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -470,6 +470,9 @@ Constants .. versionchanged:: 3.11 NetBSD support was added. + .. versionchanged:: next + Restored missing ``CAN_RAW_ERR_FILTER`` on Linux. + .. data:: CAN_BCM CAN_BCM_* diff --git a/Misc/NEWS.d/next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst b/Misc/NEWS.d/next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst new file mode 100644 index 000000000000..5e7a3e2f589a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst @@ -0,0 +1 @@ +Fix missing :data:`!socket.CAN_RAW_ERR_FILTER` constant in the socket module on Linux systems. It was missing since Python 3.11. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index dbc9e4ed3919..9a7c977bc569 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -8157,7 +8157,7 @@ socket_exec(PyObject *m) #endif #if defined(HAVE_LINUX_CAN_RAW_H) || defined(HAVE_NETCAN_CAN_H) ADD_INT_MACRO(m, CAN_RAW_FILTER); -#ifdef CAN_RAW_ERR_FILTER +#ifdef HAVE_LINUX_CAN_RAW_H ADD_INT_MACRO(m, CAN_RAW_ERR_FILTER); #endif ADD_INT_MACRO(m, CAN_RAW_LOOPBACK);