/
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
sqlalchemy
/
dialects
/
mysql
/
up file
home
� 1��fc @ sV d Z d d l m Z d d l m Z d d l m Z d e f d � � YZ e Z d S( s� .. 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. i ( t MySQLDialect_mysqldbi ( t langhelpers( t py3kt MySQLDialect_pymysqlc B s� e Z d Z e Z d Z e Z e Z e j d � � Z e d � � Z e j d � � Z d � Z d d � Z d � Z e r� d � Z n RS( t pymysqlc C sB y# t d � j } | j | _ t SWn t t f k r= t SXd S( Ns pymysql.cursors( t __import__t cursorst SSCursort _sscursort Truet ImportErrort AttributeErrort False( t selfR ( ( sT /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/pymysql.pyt supports_server_side_cursorsE s c C s t d � S( NR ( R ( t cls( ( sT /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/pymysql.pyt dbapiN s c C s� y t d � j j } Wn t t f k r0 t SXt j | j � } y | j d } Wn t k rh t SX| d k o� | j p� | j d t k Sd S( s 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. s pymysql.connectionsi t reconnecti N( R t connectionst ConnectionR R R R t get_callable_argspect pingt argst IndexErrorR t defaults( R R t inspt reconnect_arg( ( sT /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/pymysql.pyt _send_false_to_pingR s c C s'