https://github.com/python/cpython/commit/83cb89b941b9d52d3e382c6bf7850209186c31cb
commit: 83cb89b941b9d52d3e382c6bf7850209186c31cb
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: sobolevn <m...@sobolevn.me>
date: 2025-04-18T20:49:23Z
summary:

[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+jbog...@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensity...@gmail.com>

files:
A Misc/NEWS.d/next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst
M Doc/library/socket.rst
M Modules/socketmodule.c

diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 0757ffd57d8232..afd660929da339 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 00000000000000..5e7a3e2f589a76
--- /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 dbc9e4ed3919b0..9a7c977bc5698e 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);

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to