Skip to content

Conversation

@picnixz
Copy link
Member

@picnixz picnixz commented Nov 2, 2025

@picnixz
Copy link
Member Author

picnixz commented Nov 2, 2025

I used https://man.cx/if_nametoindex#heading5 for the default errors of each function.

@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 2, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 551a199 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F140905%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 2, 2025
@picnixz
Copy link
Member Author

picnixz commented Nov 7, 2025

All failures are urllib2net failures that already track: #140748.

@picnixz picnixz requested a review from vstinner November 7, 2025 15:34
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@picnixz picnixz merged commit 3ce2d57 into python:main Nov 9, 2025
125 of 132 checks passed
@miss-islington-app
Copy link

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@picnixz picnixz deleted the fix/socket/set-errno-after-if-nametoindex-100218 branch November 9, 2025 12:45
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 9, 2025
…ndextoname}` raise `OSError` (pythonGH-140905)

Previously, socket.if_nametoindex() and socket.if_indextoname() could raise
an `OSError` with a `None` errno. Now, the errno from libc is propagated.
(cherry picked from commit 3ce2d57)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 9, 2025

GH-141284 is a backport of this pull request to the 3.14 branch.

@miss-islington-app
Copy link

Sorry, @picnixz, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3ce2d57b2f02030353af314d89c5f6215d2f5c96 3.13

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 9, 2025
picnixz added a commit to picnixz/cpython that referenced this pull request Nov 9, 2025
…index,indextoname}` raise `OSError` (pythonGH-140905)

Previously, socket.if_nametoindex() and socket.if_indextoname() could raise
an `OSError` with a `None` errno. Now, the errno from libc is propagated.
(cherry picked from commit 3ce2d57)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 9, 2025

GH-141285 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 9, 2025
picnixz added a commit that referenced this pull request Nov 9, 2025
…indextoname}` raise `OSError` (GH-140905) (#141284)

gh-100218: correctly set `errno` when `socket.if_{nametoindex,indextoname}` raise `OSError` (GH-140905)

Previously, socket.if_nametoindex() and socket.if_indextoname() could raise
an `OSError` with a `None` errno. Now, the errno from libc is propagated.
(cherry picked from commit 3ce2d57)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Nov 9, 2025
…indextoname}` raise `OSError` (GH-140905) (#141285)

Previously, socket.if_nametoindex() and socket.if_indextoname() could raise
an `OSError` with a `None` errno. Now, the errno from libc is propagated.

(cherry picked from commit 3ce2d57)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants