+
    }¯³j  ã                  ó   € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^RI
Ht ^R	IHt ^R
IHt ]'       d%   ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt R R lt ! R R]4      t]tR# )aÚ  

.. dialect:: mysql+pymysql
    :name: PyMySQL
    :dbapi: pymysql
    :connectstring: mysql+pymysql://<username>:<password>@<host>/<dbname>[?<options>]
    :url: https://pymysql.readthedocs.io/

Unicode
-------

Please see :ref:`mysql_unicode` for current recommendations on unicode
handling.

.. _pymysql_ssl:

SSL Connections
------------------

The PyMySQL DBAPI accepts the same SSL arguments as that of MySQLdb,
described at :ref:`mysqldb_ssl`.   See that section for additional examples.

If the server uses an automatically-generated certificate that is self-signed
or does not match the host name (as seen from the client), it may also be
necessary to indicate ``ssl_check_hostname=false`` in PyMySQL::

    connection_uri = (
        "mysql+pymysql://scott:tiger@192.168.0.134/test"
        "?ssl_ca=/home/gord/client-ssl/ca.pem"
        "&ssl_cert=/home/gord/client-ssl/client-cert.pem"
        "&ssl_key=/home/gord/client-ssl/client-key.pem"
        "&ssl_check_hostname=false"
    )

MySQL-Python Compatibility
--------------------------

The pymysql DBAPI is a pure Python port of the MySQL-python (MySQLdb) driver,
and targets 100% compatibility.   Most behavioral notes for MySQL-python apply
to the pymysql driver as well.

)Úannotations)ÚAny)ÚDict)ÚOptional)ÚType)ÚTYPE_CHECKING)ÚUnion)ÚMySQLDialect_mysqldb)Úlanghelpers)ÚLiteral)ÚConnectArgsType)ÚDBAPIConnection)ÚDBAPICursor)ÚDBAPIModule)ÚPoolProxiedConnection)ÚURLc               ó    € V ^8„  d   QhRRRR/# )é   Úconnection_clsz	Type[Any]ÚreturnÚbool© )Úformats   "Úb/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sqlalchemy/dialects/mysql/pymysql.pyÚ__annotate__r   J   s   € ÷ 
ñ 
°Yð 
À4ñ 
ó    c                ó  € \         P                  ! V P                  4      p VP                  ^,          pVR8H  ;'       d/    VP                  '       * ;'       g    VP                  ^ ,          RJ#   \
         d     R# i ; i)aT  Given a Connection class like pymysql.Connection, aiomysql.Connection,
asyncmy.Connection, inspect the ping() method and determine if it
has a "reconnect" parameter that either defaults to True, or is positional.

a return value of True here means that when we call ``connection.ping()``,
we **must** pass `reconnect=False`.  a return value of False means that
we should call ``connection.ping()`` with **no arguments**.

This routine originates from issue #10492 for pymysql, however arg
signature mismatches in aiomysql/asyncmy tracked by issue #13306
necessitated a more open ended function.

Ú	reconnectF)r
   Úget_callable_argspecÚpingÚargsÚdefaultsÚ
IndexError)r   ÚinspÚreconnect_args   &  r   Ú _connection_ping_reconnects_truer%   J   sy   € ô ×+Ò+¨N×,?Ñ,?Ó@€Dð
ØŸ	™	 !�ˆð  Ñ+÷ 
ð 
Ø—‘Ô×>Ð> §¡¨qÕ!1¸Ð!>ð	
øô ô Úðús   ¢A0 Á0A?Á>A?c                  óÒ   a € ] tR t^ctRtRtRt]P                  R R l4       t	]
R R l4       t]P                  R R	 l4       tR
 R ltRR V 3R llltR V 3R lltR R ltRtV ;t# )ÚMySQLDialect_pymysqlÚpymysqlTNc               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   Ú!MySQLDialect_pymysql.__annotate__j   s   € ÷ ñ ¨dñ r   c                	ó„   €  \        R 4      P                  pVP                  V n        R#   \        \
        3 d     R# i ; i)zpymysql.cursorsTF)Ú
__import__ÚcursorsÚSSCursorÚ	_sscursorÚImportErrorÚAttributeError)Úselfr.   s   & r   Úsupports_server_side_cursorsÚ1MySQLDialect_pymysql.supports_server_side_cursorsi   s?   € ð	Ü Ð!2Ó3×;Ñ;ˆGØ$×-Ñ-ˆDŒNÙøÜœ^Ð,ô 	Úð	ús   ‚&* ª?¾?c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r+   s   s   € ÷ %ñ %˜[ñ %r   c                	ó   € \        R 4      # )r(   )r-   )Úclss   &r   Úimport_dbapiÚ!MySQLDialect_pymysql.import_dbapir   s   € ä˜)Ó$Ð$r   c               ó   € V ^8„  d   QhRR/# r*   r   )r   s   "r   r   r+   w   s   € ÷ @ñ @ Tñ @r   c                óˆ   €  \        R4      P                  P                  p\        V4      #   \        \
        3 d     R# i ; i)a  determine if pymysql has deprecated, changed the default of,
or removed the 'reconnect' argument of connection.ping().

See #10492 and
https://github.com/PyMySQL/mysqlclient/discussions/651#discussioncomment-7308971
for background.

Revised as part of #13306

zpymysql.connectionsT)r-   ÚconnectionsÚ
Connectionr%   r1   r2   )r3   r>   s   & r   Ú_send_false_to_pingÚ(MySQLDialect_pymysql._send_false_to_pingv   sG   € ð	@Ü#Ø%óç‰kŸ*™*ð ô 4°JÓ?Ð?øô œ^Ð,ô 	Úð	ús   ‚, ¬AÁ Ac               ó    € V ^8„  d   QhRRRR/# )r   Údbapi_connectionr   r   zLiteral[True]r   )r   s   "r   r   r+   Œ   s   € ÷ ñ ¨ð ¸Mñ r   c                	óp   € V P                   '       d   VP                  R 4       R# VP                  4        R# )FT)r?   r   )r3   rB   s   &&r   Údo_pingÚMySQLDialect_pymysql.do_pingŒ   s2   € Ø×#×#Ð#Ø×!Ñ! %Ô(ñ ð ×!Ñ!Ô#ár   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úurlr   Ú_translate_argszOptional[Dict[str, Any]]r   r   r   )r   s   "r   r   r+   ”   s$   € ÷ 
ñ 
Øð
Ø)Að
à	ñ
r   c                	óD   <€ Vf   \        RR7      p\        SV `	  WR7      # )NÚuser)Úusername)rH   )ÚdictÚsuperÚcreate_connect_args)r3   rG   rH   Ú	__class__s   &&&€r   rN   Ú(MySQLDialect_pymysql.create_connect_args”   s/   ø€ ð Ò"Ü"¨FÔ3ˆOÜ‰wÑ*Øð +ó 
ð 	
r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   ÚezDBAPIModule.ErrorÚ
connectionz7Optional[Union[PoolProxiedConnection, DBAPIConnection]]ÚcursorzOptional[DBAPICursor]r   r   r   )r   s   "r   r   r+   �   s3   € ÷ ñ àðð Lðð &ð	ð
 
ñr   c                	óØ   <€ \         SV `  WV4      '       d   R # \        WP                  P                  4      '       d,   \        V4      P                  4       pRV9   ;'       g    RV9   # R# )Tzalready closedzconnection was killedF)rM   Úis_disconnectÚ
isinstanceÚloaded_dbapiÚErrorÚstrÚlower)r3   rR   rS   rT   Ústr_erO   s   &&&& €r   rV   Ú"MySQLDialect_pymysql.is_disconnect�   s`   ø€ ô ‰7Ñ  °×7Ò7ÙÜ˜×,Ñ,×2Ñ2×3Ò3Ü˜“F—L‘L“NˆEà  EÑ)×MÐMÐ-DÈÑ-Mðñ r   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	exceptionÚBaseExceptionr   r   r   )r   s   "r   r   r+   ­   s   € ÷ !ñ !¨]ð !¸sñ !r   c                	óœ   € \        VP                  ^ ,          \        4      '       d   VP                  ^ ,          pVP                  ^ ,          # )é    )rW   r    Ú	Exception)r3   r_   s   &&r   Ú_extract_error_codeÚ(MySQLDialect_pymysql._extract_error_code­   s5   € Ü�i—n‘n QÕ'¬×3Ò3Ø!Ÿ™ qÕ)ˆIØ�~‰~˜aÕ Ð r   )r0   )N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚdriverÚsupports_statement_cacheÚdescription_encodingr
   Úmemoized_propertyr4   Úclassmethodr9   r?   rD   rN   rV   rd   Ú__static_attributes__Ú__classcell__)rO   s   @r   r'   r'   c   s   ø† Ø€FØ#ÐàÐà×"Ñ"ôó #ðð ô%ó ð%ð ×"Ñ"ô@ó #ð@õ*÷
ò 
÷ð ÷ !ó !r   r'   N)Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   r   Úmysqldbr	   Úutilr
   Úutil.typingr   Úengine.interfacesr   r   r   r   r   Ú
engine.urlr   r%   r'   Údialectr   r   r   Ú<module>rz      s\   ðñ)õV #å Ý Ý Ý Ý  Ý å )Ý Ý "çå4Ý4Ý0Ý0Ý:Ý!õ
ô2M!Ð/ô M!ð` ‚r   