I have a pull requests that I opened 2 years ago that could use a core review.
It solves a minor issue with error reporting for socket.setsockopt as demonstrated in: https://github.com/python/cpython/issues/107545
socket.setsockopt