From 9dba4b7db370319006758731d09866c42518c27d Mon Sep 17 00:00:00 2001 From: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:13:39 +0100 Subject: [PATCH 1/7] gh-129719: Restore missing socket.CAN_RAW_ERR_FILTER on Linux --- Doc/library/socket.rst | 3 +++ Doc/whatsnew/3.14.rst | 7 +++++++ Modules/socketmodule.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index b36acad29ecb00..9534283db22dca 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -473,6 +473,9 @@ Constants .. versionchanged:: 3.11 NetBSD support was added. + .. versionchanged:: 3.14 + Restored missing ``CAN_RAW_ERR_FILTER`` on Linux. + .. data:: CAN_BCM CAN_BCM_* diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 59c432d30a342b..f1a10c95dacd21 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -1113,6 +1113,13 @@ pty Use :func:`pty.openpty` instead. (Contributed by Nikita Sobolev in :gh:`118824`.) +socket +------ + +* Fix missing CAN_RAW_ERR_FILTER constant in the :mod:`socket` module on Linux systems. + It was missing since Python 3.11. + (Contributed by Jeroen Bogers in :gh:`129719`.) + sqlite3 ------- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 4b6d2dd1c5fc7b..b9f415acefb2e3 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -8223,7 +8223,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); From bde35e300565175ea62344ffbba7f55fafb5afa7 Mon Sep 17 00:00:00 2001 From: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:05:19 +0100 Subject: [PATCH 2/7] Put changes in correct section of documentation --- Doc/whatsnew/3.14.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index f1a10c95dacd21..967df23e515951 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -655,6 +655,12 @@ sys * On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore. It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``. +socket +------ + +* Fix missing CAN_RAW_ERR_FILTER constant in the :mod:`socket` module on Linux systems. + It was missing since Python 3.11. + (Contributed by Jeroen Bogers in :gh:`129719`.) sys.monitoring -------------- @@ -1113,13 +1119,6 @@ pty Use :func:`pty.openpty` instead. (Contributed by Nikita Sobolev in :gh:`118824`.) -socket ------- - -* Fix missing CAN_RAW_ERR_FILTER constant in the :mod:`socket` module on Linux systems. - It was missing since Python 3.11. - (Contributed by Jeroen Bogers in :gh:`129719`.) - sqlite3 ------- From 886127c5175830a9afdc5e225c99244335e19b42 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:23:52 +0000 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst new file mode 100644 index 00000000000000..1af49c7ff11f8c --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst @@ -0,0 +1 @@ +Fix missing CAN_RAW_ERR_FILTER constant in the socket module on Linux systems. It was missing since Python 3.11. From c07ac70e9c76ead96e15aa8ece027a4a715a1452 Mon Sep 17 00:00:00 2001 From: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:29:56 +0100 Subject: [PATCH 4/7] Put news in proper section --- .../2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Misc/NEWS.d/next/{Core_and_Builtins => Library}/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst (100%) diff --git a/Misc/NEWS.d/next/Core_and_Builtins/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 similarity index 100% rename from Misc/NEWS.d/next/Core_and_Builtins/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst rename to Misc/NEWS.d/next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst From 98e7c8c1a67d5d640f52290db0e6693a36b4dc4c Mon Sep 17 00:00:00 2001 From: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:31:07 +0100 Subject: [PATCH 5/7] Process review comments from @ZeroIntensity --- Doc/library/socket.rst | 2 +- Doc/whatsnew/3.14.rst | 7 ------- .../Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 9534283db22dca..f10f9d7adedaab 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -473,7 +473,7 @@ Constants .. versionchanged:: 3.11 NetBSD support was added. - .. versionchanged:: 3.14 + .. versionchanged:: next Restored missing ``CAN_RAW_ERR_FILTER`` on Linux. .. data:: CAN_BCM diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 967df23e515951..91bd5e0ceba585 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -655,13 +655,6 @@ sys * On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore. It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``. -socket ------- - -* Fix missing CAN_RAW_ERR_FILTER constant in the :mod:`socket` module on Linux systems. - It was missing since Python 3.11. - (Contributed by Jeroen Bogers in :gh:`129719`.) - sys.monitoring -------------- 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 index 1af49c7ff11f8c..5f57c15ec26f1b 100644 --- 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 @@ -1 +1 @@ -Fix missing CAN_RAW_ERR_FILTER constant in the socket module on Linux systems. It was missing since Python 3.11. +Fix missing :data:`socket.CAN_RAW_ERR_FILTER` constant in the socket module on Linux systems. It was missing since Python 3.11. From 02d4b84455ea207f411eca2989917a50b72031dd Mon Sep 17 00:00:00 2001 From: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:31:50 +0100 Subject: [PATCH 6/7] Fix whitespace change --- Doc/whatsnew/3.14.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 91bd5e0ceba585..59c432d30a342b 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -655,6 +655,7 @@ sys * On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore. It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``. + sys.monitoring -------------- From 173955095227b71e6044fc8bf159075ddd99f1b2 Mon Sep 17 00:00:00 2001 From: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:12:18 +0100 Subject: [PATCH 7/7] Fix documentation error. Co-authored-by: Peter Bierma --- .../next/Library/2025-02-06-11-23-51.gh-issue-129719.Of6rvb.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 5f57c15ec26f1b..5e7a3e2f589a76 100644 --- 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 @@ -1 +1 @@ -Fix missing :data:`socket.CAN_RAW_ERR_FILTER` constant in the socket module on Linux systems. It was missing since Python 3.11. +Fix missing :data:`!socket.CAN_RAW_ERR_FILTER` constant in the socket module on Linux systems. It was missing since Python 3.11.