/var/opt/nydus/ops/mysql/connector/aio/__pycache__
NameSizeModeActions
abstracts.cpython-312.pyc1155400644editdlrm
authentication.cpython-312.pyc131520644editdlrm
charsets.cpython-312.pyc173430644editdlrm
connection.cpython-312.pyc708760644editdlrm
cursor.cpython-312.pyc601950644editdlrm
logger.cpython-312.pyc3510644editdlrm
network.cpython-312.pyc305960644editdlrm
pooling.cpython-312.pyc302760644editdlrm
protocol.cpython-312.pyc115140644editdlrm
utils.cpython-312.pyc59830644editdlrm
_decorating.cpython-312.pyc43120644editdlrm
__init__.cpython-312.pyc4930644editdlrm
Edit: /var/opt/nydus/ops/mysql/connector/aio/__pycache__/utils.cpython-312.pyc (5983B)
N jndZddgZddlZddlZddlZ ddlZddlmZm Z m Z m Z erddl m Z ejdGdd ejZGd dej j"Z dd d d ededede de ej(eff dZde de de dej,fdZy#e$rdZYwxYw)z Utilities. to_threadopen_connectionN) TYPE_CHECKINGAnyCallableTuple)MySQLConnectionAbstract StreamWriterc4eZdZdZdej ddfdZy)StreamReaderProtocolzExtends asyncio.streams.StreamReaderProtocol for adding start_tls(). The ``start_tls()`` is based on ``asyncio.streams.StreamWriter`` introduced in Python 3.11. It provides the same functionality for older Python versions. writerreturnNch|j}||_||_|jddu|_y)zQReplace stream writer. Args: writer: Stream Writer. sslcontextN) transport_stream_writer _transportget_extra_info _over_ssl)selfr rs J/opt/nydus/tmp/pip-target-a90h98xg/lib/python/mysql/connector/aio/utils.py_replace_writerz$StreamReaderProtocol._replace_writer<s5 $$ $#"11,?tK)__name__ __module__ __qualname____doc__asyncior rrrr r 5s# Lg&:&: Lt Lrr c DeZdZdZddddej dededdfdZy) r zExtends asyncio.streams.StreamWriter for adding start_tls(). The ``start_tls()`` is based on ``asyncio.streams.StreamWriter`` introduced in Python 3.11. It provides the same functionality for older Python versions. N)server_hostnamessl_handshake_timeout ssl_contextr!r"rc"K|jjdu}|j}|jd{|jj |j |||||d{}||_|j |y7P7w)zUpgrade an existing stream-based connection to TLS. Args: ssl_context: Configured SSL context. server_hostname: Server host name. ssl_handshake_timeout: SSL handshake timeout. N) server_sider!r") _protocol_client_connected_cbdrain_loop start_tlsrr)rr#r!r"r%protocol new_transports rr*zStreamWriter.start_tlsOsnn99E >>jjl"jj22 OO  #+"73       &  s!8BB 2B-B .B B) rrrrssl SSLContextstrintr*rrrr r Hs> $%) '^^' ' # '  'ri)limithostportr1kwdsrc Ktj}tjj||}t || |j fd||fi|d{\}}t | ||}||fS7w)aA wrapper for create_connection() returning a (reader, writer) pair. This function is based on ``asyncio.streams.open_connection`` and adds a custom stream reader. MySQL expects TLS negotiation to happen in the middle of a TCP connection, not at the start. This function in conjunction with ``_StreamReaderProtocol`` and ``_StreamWriter`` allows the TLS negotiation on an existing connection. Args: host: Server host name. port: Server port. limit: The buffer size limit used by the returned ``StreamReader`` instance. By default the limit is set to 64 KiB. Returns: tuple: Returns a pair of reader and writer objects that are instances of ``StreamReader`` and ``StreamWriter`` classes. )r1loop)r6cS)Nr)r+srz!open_connection..srN)rget_running_loopstreams StreamReaderr create_connectionr ) r2r3r1r4r6readerr_r r+s @rrros.  # # %D __ ) )D ) AF#F6H///0@$UPTUULIq )Xvt VsAA=!A;"A=funcargskwargscKtj}tj}t j |j |g|i|}|jd|d{S7w)aQAsynchronously run function ``func`` in a separate thread. This function is based on ``asyncio.to_thread()`` introduced in Python 3.9, which provides the same functionality for older Python versions. Returns: coroutine: A coroutine that can be awaited to get the eventual result of ``func``. N)rr9 contextvars copy_context functoolspartialrunrun_in_executor)r?r@rAr6ctx func_calls rrrs]  # # %D  " " $C!!#''4A$A&AI%%dI6 66 6sA"A+$A)%A+)NN)r__all__rrCrEr- ImportErrortypingrrrrmysql.connector.aio.abstractsr appendr r:r r/r0r;rFuturerrrrrQs@ ) *76E NN>"L777L&$'7??//$'P#'8= 25GJ 7   -.> 7( 73 7# 7'.. 7I CsB**B43B4