mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (#31512)
This commit is contained in:
parent
66b3cd7063
commit
cff4d5c5d2
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -0,0 +1,2 @@
|
||||
Inherit asyncio proactor datagram transport from
|
||||
:class:`asyncio.DatagramTransport`.
|
Loading…
Reference in New Issue
Block a user