Skip to content

Commit c200548

Browse files
jbogersJeroen Bogers
authored andcommitted
gh-129719: Restore missing socket.CAN_RAW_ERR_FILTER on Linux
1 parent d83a8a2 commit c200548

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Doc/library/socket.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,9 @@ Constants
473473
.. versionchanged:: 3.11
474474
NetBSD support was added.
475475

476+
.. versionchanged:: 3.14
477+
Restored missing ``CAN_RAW_ERR_FILTER`` on Linux.
478+
476479
.. data:: CAN_BCM
477480
CAN_BCM_*
478481

Doc/whatsnew/3.14.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,13 @@ pty
11131113
Use :func:`pty.openpty` instead.
11141114
(Contributed by Nikita Sobolev in :gh:`118824`.)
11151115

1116+
socket
1117+
------
1118+
1119+
* Fix missing CAN_RAW_ERR_FILTER constant in the :mod:`socket` module on Linux systems.
1120+
It was missing since Python 3.11.
1121+
(Contributed by Jeroen Bogers in :gh:`129719`.)
1122+
11161123
sqlite3
11171124
-------
11181125

Modules/socketmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8223,7 +8223,7 @@ socket_exec(PyObject *m)
82238223
#endif
82248224
#if defined(HAVE_LINUX_CAN_RAW_H) || defined(HAVE_NETCAN_CAN_H)
82258225
ADD_INT_MACRO(m, CAN_RAW_FILTER);
8226-
#ifdef CAN_RAW_ERR_FILTER
8226+
#ifdef HAVE_LINUX_CAN_RAW_H
82278227
ADD_INT_MACRO(m, CAN_RAW_ERR_FILTER);
82288228
#endif
82298229
ADD_INT_MACRO(m, CAN_RAW_LOOPBACK);

0 commit comments

Comments
 (0)