Skip to content

Commit cff4d5c

Browse files
authored
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (#31512)
1 parent 66b3cd7 commit cff4d5c

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Lib/asyncio/proactor_events.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ def _pipe_closed(self, fut):
452452
self.close()
453453

454454

455-
class _ProactorDatagramTransport(_ProactorBasePipeTransport):
455+
class _ProactorDatagramTransport(_ProactorBasePipeTransport,
456+
transports.DatagramTransport):
456457
max_size = 256 * 1024
457458
def __init__(self, loop, sock, protocol, address=None,
458459
waiter=None, extra=None):

Lib/test/test_asyncio/test_proactor_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ def datagram_transport(self):
839839
def test_make_datagram_transport(self):
840840
tr = self.datagram_transport()
841841
self.assertIsInstance(tr, _ProactorDatagramTransport)
842+
self.assertIsInstance(tr, asyncio.DatagramTransport)
842843
close_transport(tr)
843844

844845
def test_datagram_loop_writing(self):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Inherit asyncio proactor datagram transport from
2+
:class:`asyncio.DatagramTransport`.

0 commit comments

Comments
 (0)