https://github.com/python/cpython/commit/947c8ea3bc4240554c953396251d9a5ac2198ff4
commit: 947c8ea3bc4240554c953396251d9a5ac2198ff4
branch: main
author: Alexis Dauphin <[email protected]>
committer: picnixz <[email protected]>
date: 2026-05-06T19:52:23+02:00
summary:
gh-148599: Update WSA `socket` error codes (#148033)
files:
A Misc/NEWS.d/next/Library/2026-04-15-09-36-03.gh-issue-148599.90i1Ku.rst
M Lib/socket.py
diff --git a/Lib/socket.py b/Lib/socket.py
index 34d897a82edd4f..03c3fe88f15cfe 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -123,7 +123,7 @@ def _intenum_converter(value, enum_klass):
10004: "The operation was interrupted.",
10009: "A bad file handle was passed.",
10013: "Permission denied.",
- 10014: "A fault occurred on the network??",
+ 10014: "An invalid pointer was passed.",
10022: "An invalid operation was attempted.",
10024: "Too many open files.",
10035: "The socket operation would block.",
@@ -181,7 +181,7 @@ def _intenum_converter(value, enum_klass):
11001: "Host not found.",
11002: "Nonauthoritative host not found.",
11003: "This is a nonrecoverable error.",
- 11004: "Valid name, no data record requested type.",
+ 11004: "Valid name, no data record of requested type.",
11005: "QoS receivers.",
11006: "QoS senders.",
11007: "No QoS senders.",
@@ -197,7 +197,7 @@ def _intenum_converter(value, enum_klass):
11017: "QoS flowspec error.",
11018: "Invalid QoS provider buffer.",
11019: "Invalid QoS filter style.",
- 11020: "Invalid QoS filter style.",
+ 11020: "Invalid QoS filter type.",
11021: "Incorrect QoS filter count.",
11022: "Invalid QoS object length.",
11023: "Incorrect QoS flow count.",
diff --git
a/Misc/NEWS.d/next/Library/2026-04-15-09-36-03.gh-issue-148599.90i1Ku.rst
b/Misc/NEWS.d/next/Library/2026-04-15-09-36-03.gh-issue-148599.90i1Ku.rst
new file mode 100644
index 00000000000000..eb76b3358aa0f0
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2026-04-15-09-36-03.gh-issue-148599.90i1Ku.rst
@@ -0,0 +1 @@
+Update the :mod:`socket` module's WSA error messages to match official
documentation.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]