]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 18 Apr 2025 20:49:23 +0000 (22:49 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 20:49:23 +0000 (20:49 +0000)
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 <zintensitydev@gmail.com>
Doc/library/socket.rst
Misc/NEWS.d/next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst [new file with mode: 0644]
Modules/socketmodule.c

index 0757ffd57d823295c752a2bd1061ce0457073193..afd660929da3390cb7a6e48182c4a887a09401eb 100644 (file)
@@ -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 (file)
index 0000000..5e7a3e2
--- /dev/null
@@ -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.
index dbc9e4ed3919b0f6e1bf71eb82e77218b1da8377..9a7c977bc5698edfaaf4dbc5eeb11e925ad89602 100644 (file)
@@ -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);