def create_transport(self): transport = _SelectorTransport(self.loop, self.sock, self.protocol, None) self.addCleanup(close_transport, transport) return transport