-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
socket.CAN_RAW_ERR_FILTER is not defined in Python 3.11 and later #129719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
jbogers
pushed a commit
to jbogers/cpython
that referenced
this issue
Feb 6, 2025
jbogers
added a commit
to jbogers/cpython
that referenced
this issue
Feb 6, 2025
jbogers
added a commit
to jbogers/cpython
that referenced
this issue
Feb 6, 2025
jbogers
added a commit
to jbogers/cpython
that referenced
this issue
Feb 6, 2025
I've tried to make a PR with a fix (#129721). This is my first time contributing, so I hope I've correctly followed the required procedures. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Apr 18, 2025
…pythonGH-129721) (cherry picked from commit ce31ae5) 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>
sobolevn
pushed a commit
that referenced
this issue
Apr 18, 2025
GH-129721) (#132702) gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721) (cherry picked from commit ce31ae5) 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
Bug description:
When trying to use
socket.CAN_RAW_ERR_FILTER
on a Debian bookworm system, running Python 3.11, anAttributeError
is raised. This is because the value is no longer defined insocket.py
/_socket
.I have also tested in Python 3.13.1, and the issue is still present there.
Typical usage of the value:
Minimized reproduction:
Actual output:
Expected output (taken from Python 3.10.12):
Investigating the issue, it seems to have been introduced in Python 3.11 by the following PR: #30066
In this PR, adding the
CAN_RAW_ERR_FILTER
value tosocket
was made conditional on definingCAN_RAW_ERR_FILTER
during compilation. However, no change was made to actually define the value, thus it is never compiled for compatible systems.Note that the
CAN_RAW_ERR_FILTER
value is coming fromlinux/can/raw.h
where is it defined as anenum
value. Thus it will not be used by the C/C++ preprocessor to evaluate the#ifdef CAN_RAW_ERR_FILTER
inModules/socketmodule.c
.Excerpt of relevant
raw.h
file from Debian Bookworm:CPython versions tested on:
3.11, 3.13
Operating systems tested on:
Linux
Linked PRs
socket.CAN_RAW_ERR_FILTER
on Linux (GH-129721) #132702The text was updated successfully, but these errors were encountered: