summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2022-02-22 23:39:24 (GMT)
committerGitHub <noreply@github.com>2022-02-22 23:39:24 (GMT)
commitcff4d5c5d29528299ec1ac5b3b3a6f7735577c01 (patch)
tree0c213ceba56abca4e3e70e68fd7e67f5aa858c46 /Lib
parent66b3cd7063322a9f5c922a97bbd06fdb98309999 (diff)
downloadcpython-cff4d5c5d29528299ec1ac5b3b3a6f7735577c01.zip
cpython-cff4d5c5d29528299ec1ac5b3b3a6f7735577c01.tar.gz
cpython-cff4d5c5d29528299ec1ac5b3b3a6f7735577c01.tar.bz2
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (#31512)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/asyncio/proactor_events.py3
-rw-r--r--Lib/test/test_asyncio/test_proactor_events.py1
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index ae59f30..43d5e70 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -452,7 +452,8 @@ class _ProactorWritePipeTransport(_ProactorBaseWritePipeTransport):
self.close()
-class _ProactorDatagramTransport(_ProactorBasePipeTransport):
+class _ProactorDatagramTransport(_ProactorBasePipeTransport,
+ transports.DatagramTransport):
max_size = 256 * 1024
def __init__(self, loop, sock, protocol, address=None,
waiter=None, extra=None):
diff --git a/Lib/test/test_asyncio/test_proactor_events.py b/Lib/test/test_asyncio/test_proactor_events.py
index 45af810..6757382 100644
--- a/Lib/test/test_asyncio/test_proactor_events.py
+++ b/Lib/test/test_asyncio/test_proactor_events.py
@@ -839,6 +839,7 @@ class BaseProactorEventLoopTests(test_utils.TestCase):
def test_make_datagram_transport(self):
tr = self.datagram_transport()
self.assertIsInstance(tr, _ProactorDatagramTransport)
+ self.assertIsInstance(tr, asyncio.DatagramTransport)
close_transport(tr)
def test_datagram_loop_writing(self):