]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (#129721)
authorJeroen Bogers <11465689+jbogers@users.noreply.github.com>
Fri, 18 Apr 2025 19:59:37 +0000 (21:59 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 19:59:37 +0000 (22:59 +0300)
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 6b666753ceb9355f0afcc9ef70d46034ff5a9038..2b1fae57c668de64fc4696e30f150e49365f98fb 100644 (file)
@@ -498,6 +498,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 2326620dcff84fd2b22c423c89982141564e9566..f55a9583b8586a3820e6ea054a00aa3d7692b9be 100644 (file)
@@ -8332,7 +8332,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);