]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100218: correctly set `errno` when `socket.if_{nametoindex,indextoname}` raise...
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sun, 9 Nov 2025 12:45:38 +0000 (13:45 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Nov 2025 12:45:38 +0000 (13:45 +0100)
commit3ce2d57b2f02030353af314d89c5f6215d2f5c96
tree0a07bc6b26fec358848f7400cdb08221a43c2288
parent0c77e7c23b5c270a3142105542c56c59b59c52a0
gh-100218: correctly set `errno` when `socket.if_{nametoindex,indextoname}` raise `OSError` (#140905)

Previously, socket.if_nametoindex() and socket.if_indextoname() could raise
an `OSError` with a `None` errno. Now, the errno from libc is propagated.
Lib/test/test_socket.py
Misc/NEWS.d/next/Library/2025-11-02-11-46-00.gh-issue-100218.9Ezfdq.rst [new file with mode: 0644]
Modules/socketmodule.c