mirror of https://github.com/python/cpython
GH-90352: fix _SelectorDatagramTransport to inherit from DatagramTransport (#98844)
This commit is contained in:
parent
c0f2a5ef91
commit
9bdec0aa45
|
@ -1126,7 +1126,7 @@ class _SelectorSocketTransport(_SelectorTransport):
|
|||
self._empty_waiter = None
|
||||
|
||||
|
||||
class _SelectorDatagramTransport(_SelectorTransport):
|
||||
class _SelectorDatagramTransport(_SelectorTransport, transports.DatagramTransport):
|
||||
|
||||
_buffer_factory = collections.deque
|
||||
|
||||
|
|
|
@ -1081,6 +1081,10 @@ class SelectorDatagramTransportTests(test_utils.TestCase):
|
|||
self.protocol.datagram_received.assert_called_with(
|
||||
b'data', ('0.0.0.0', 1234))
|
||||
|
||||
def test_transport_inheritance(self):
|
||||
transport = self.datagram_transport()
|
||||
self.assertIsInstance(transport, asyncio.DatagramTransport)
|
||||
|
||||
def test_read_ready_tryagain(self):
|
||||
transport = self.datagram_transport()
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix ``_SelectorDatagramTransport`` to inherit from :class:`~asyncio.DatagramTransport` in :mod:`asyncio`. Patch by Kumar Aditya.
|
Loading…
Reference in New Issue