You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_start_tls_compatible = True - так как это обёртка, убираем подобную логику
self._loop = loop - будет ли работать класс, если указать loop, отличный от текущего?
asyncio: SSLProtocol and _SSLProtocolTransport are heavily coupled so need merging
Analyzing how asyncio internals work, I was puzzled by a role of asyncio.sslproto._SSLProtocolTransport, its domain relation to asyncio.sslproto.SSLProtocol, and why the latter is a thin shell that just redirects all function calls back to SSLProtocol.
After spending some time matching the ends I found out that both classes are actually two faces of the same object. One is the plaintext side looking at user-supplied Protocol, and another is the cyphertext side looking at the actual data source. Thus, they are extremely coupled and cannot be seen independently.
As a result, these two objects need to be turned into two interfaces of a single asyncio.sslproto.SSLProtocol. In other words:
_start_tls_compatible = True - так как это обёртка, убираем подобную логику
self._loop = loop - будет ли работать класс, если указать loop, отличный от текущего?
asyncio: SSLProtocol and _SSLProtocolTransport are heavily coupled so need merging
Analyzing how asyncio internals work, I was puzzled by a role of
asyncio.sslproto._SSLProtocolTransport
, its domain relation toasyncio.sslproto.SSLProtocol
, and why the latter is a thin shell that just redirects all function calls back toSSLProtocol
.After spending some time matching the ends I found out that both classes are actually two faces of the same object. One is the plaintext side looking at user-supplied Protocol, and another is the cyphertext side looking at the actual data source. Thus, they are extremely coupled and cannot be seen independently.
As a result, these two objects need to be turned into two interfaces of a single
asyncio.sslproto.SSLProtocol
. In other words:should be converted into:
for easier understanding of what's happening and elimination of an excessive entity that requires understanding.
The text was updated successfully, but these errors were encountered: