[issue28213] asyncio SSLProtocol _app_transport is private

Константин Волков report at bugs.python.org
Tue Sep 20 05:21:57 EDT 2016


New submission from Константин Волков:

Seems that this field must not be private(or must have read-only property) as it is supposed to use outside of class.

I catched that, when implemented STARTTLS smtp process, when you must start SSL connection over existing socket connection. Currently it is not hard, its easy to add SSL layer as loop do:

self._tls_protocol = sslproto.SSLProtocol()
socket_transport = self.transport
socket_transport._protocol = self._tls_protocol
self.transport = self._tls_protocol._app_transport
self._tls_protocol.connection_made(socket_transport)

But here you must access to private property "app_transport". It must be public because its purpose to public "result" of SSL layer implementation. 

>From class BaseSelectorEventLoop:

def _make_ssl_transport(...):
    ...
    return ssl_protocol._app_transport

----------
components: asyncio
messages: 277020
nosy: gvanrossum, yselivanov, Константин Волков
priority: normal
severity: normal
status: open
title: asyncio SSLProtocol _app_transport is private
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28213>
_______________________________________


More information about the Python-bugs-list mailing list