Skip to content

Commit 6717edc

Browse files
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (GH-31512) (GH-31514)
(cherry picked from commit cff4d5c) Co-authored-by: Andrew Svetlov <[email protected]> Co-authored-by: Andrew Svetlov <[email protected]>
1 parent 28d9353 commit 6717edc

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
@@ -838,6 +838,7 @@ def datagram_transport(self):
838838
def test_make_datagram_transport(self):
839839
tr = self.datagram_transport()
840840
self.assertIsInstance(tr, _ProactorDatagramTransport)
841+
self.assertIsInstance(tr, asyncio.DatagramTransport)
841842
close_transport(tr)
842843

843844
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)