Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[3.9] gh-98793: Fix typecheck in overlapped.c (GH-98835) (GH-98890)
(cherry picked from commit d3d1738)

Co-authored-by: Charlie Zhao <[email protected]>
Co-authored-by: Kumar Aditya <[email protected]>
(cherry picked from commit 3ac8c0a)
  • Loading branch information
2 people authored and ambv committed Oct 31, 2025
commit 561bd00b45a3e125a01c80090c11f6e46cd61e48
11 changes: 11 additions & 0 deletions Lib/test/test_asyncio/test_windows_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,17 @@ def threadMain():
stop.set()
thr.join()

def test_address_argument_type_error(self):
# Regression test for https://github.com/python/cpython/issues/98793
proactor = self.loop._proactor
sock = socket.socket(type=socket.SOCK_DGRAM)
bad_address = None
with self.assertRaises(TypeError):
proactor.connect(sock, bad_address)
with self.assertRaises(TypeError):
proactor.sendto(sock, b'abc', addr=bad_address)
sock.close()


class WinPolicyTests(WindowsEventsTestCase):

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix argument typechecks in :func:`!_overlapped.WSAConnect` and :func:`!_overlapped.Overlapped.WSASendTo` functions.
Loading