/var/opt/nydus/ops/mysql/connector/__pycache__
NameSizeModeActions
abstracts.cpython-312.pyc1263050644editdlrm
authentication.cpython-312.pyc148150644editdlrm
charsets.cpython-312.pyc102270644editdlrm
connection.cpython-312.pyc705380644editdlrm
connection_cext.cpython-312.pyc485700644editdlrm
constants.cpython-312.pyc482270644editdlrm
conversion.cpython-312.pyc315540644editdlrm
cursor.cpython-312.pyc587990644editdlrm
cursor_cext.cpython-312.pyc497900644editdlrm
custom_types.cpython-312.pyc13400644editdlrm
dbapi.cpython-312.pyc30230644editdlrm
errorcode.cpython-312.pyc907520644editdlrm
errors.cpython-312.pyc133090644editdlrm
logger.cpython-312.pyc3390644editdlrm
network.cpython-312.pyc319440644editdlrm
optionfiles.cpython-312.pyc145250644editdlrm
pooling.cpython-312.pyc273930644editdlrm
protocol.cpython-312.pyc471850644editdlrm
tls_ciphers.cpython-312.pyc78190644editdlrm
types.cpython-312.pyc25860644editdlrm
utils.cpython-312.pyc281810644editdlrm
version.cpython-312.pyc6900644editdlrm
_decorating.cpython-312.pyc39980644editdlrm
_scripting.cpython-312.pyc157000644editdlrm
__init__.cpython-312.pyc17090644editdlrm
Edit: /var/opt/nydus/ops/mysql/connector/__pycache__/errors.cpython-312.pyc (13309B)
N jF4UdZddlmZmZmZmZmZmZddlm Z ddl m Z ddl m Z mZGddeZGd d eZGd d eZGd deZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGdd eZGd!d"eZeeeeeeeeeeeeeeeeeeeeeeeeeeef ZeeeeeeeeeeeeeeefZia ee!efe"d#< dEd%eee!ee!eeffd&eed'ee!eeffd(Z# dFd)e!d*ee$d+ee$d,ee%d'ef d-Z&d.e'd'efd/Z(id0ed1ed2ed3ed4ed5ed6ed7ed8ed9ed:ed;eded?ed@eeeeeeeeeeeeeeedAZ)ee$efe"dB<eeeeeeeedCZ*ee!efe"dD<y$)GzPython exceptions.)DictMappingOptionalTupleTypeUnion)get_client_error) StrOrBytes) read_bytesread_intc zeZdZdZ d deedeedeeeeefdfdeeddf fd Z defd Z xZ S) ErrorzException that is base class for all other error exceptions. See [1] for more details. References: [1]: https://dev.mysql.com/doc/connector-python/en/connector-python-api-errors-error.html Nmsgerrnovalues.sqlstatereturnct|||_|j|_|xsd|_||_|jsJd|jcxkrdkr5nn2t |j|_|0 |j|z|_n|jsdx|_|_|jr_|jdk7rP|j|jd}|j rd}|j |d <nd }|jd i||_|j|j|j f|_ y#t$r!}|jd|d|_Yd}~d}~wwxYw) Nii z (Warning: )z Unknown error)rrz{errno} ({state}): {msg}statez{errno}: {msg}) super__init__r _full_msgrrr TypeErrorformatargs) selfrrrrerrfieldsfmt __class__s G/opt/nydus/tmp/pip-target-a90h98xg/lib/python/mysql/connector/errors.pyrzError.__init__.s* [b   xxTTZZ6$6' 3DH!>#xx&0DH(7 7DNTX 88 b(#zz$((;F}}0"&--w&'SZZ1&1DNZZ? !>"&((;se1=DHH>s;D>> E(E##E(c|jSN)r)r s r%__str__z Error.__str__Ps ~~NNNN) __name__ __module__ __qualname____doc__rstrintrrrr( __classcell__r$s@r%rr%s"#8<"& @ c] @} @uS#X345 @ 3- @  @Dr)rceZdZdZy)Warningz Exception for important warningsNr+r,r-r.rr)r%r4r4Ts*r)r4ceZdZdZy)InterfaceErrorz-Exception for errors related to the interfaceNr5rr)r%r7r7X7r)r7ceZdZdZy) DatabaseErrorz,Exception for errors related to the databaseNr5rr)r%r:r:\s6r)r:ceZdZdZy) InternalErrorz-Exception for errors internal database errorsNr5rr)r%r<r<`r8r)r<ceZdZdZy)OperationalErrorz8Exception for errors related to the database's operationNr5rr)r%r>r>dsBr)r>ceZdZdZy)ProgrammingErrorz'Exception for errors programming errorsNr5rr)r%r@r@hs1r)r@ceZdZdZy)IntegrityErrorz3Exception for errors regarding relational integrityNr5rr)r%rBrBl=r)rBceZdZdZy) DataErrorz;Exception for errors reporting problems with processed dataNr5rr)r%rErEpsEr)rEceZdZdZy)NotSupportedErrorzBException for errors when an unsupported database feature was usedNr5rr)r%rGrGtsLr)rGceZdZdZy) PoolErrorz3Exception for errors relating to connection poolingNr5rr)r%rIrIxrCr)rIceZdZdZy)ConnectionTimeoutErrorzo Exception for errors related to the socket connection timing out while connecting with the server Nr5rr)r%rKrK|sr)rKc teZdZUdZdZeed< d deedeedee eefdeed df fd Z xZ S) ReadTimeoutErrorzWException for errors relating to socket timing out while receiving data from the serverz The Read Operation timed out. As a consequence the current connection has been closed to avoid any unstable behaviour, consider using the reconnect() option and continue with the current session's workflow. DEFAULT_READ_TIMEOUT_ERROR_MSGNrrrrrc>t||j|||yr')rrrNr rrrrr$s r%rzReadTimeoutError.__init__s <t||j|||yr')rrrTrPs r%rzWriteTimeoutError.__init__s ==ufhWr)r*) r+r,r-r.rTr/rQrr0rrr1r2s@r%rSrSs}],#S"#,0"& X c]X}XsCx) X 3- X  XXr)rS_CUSTOM_ERROR_EXCEPTIONSNerror exceptionrct|tr |siatS|s|stSt|ttfs t dt|tr||i}|j D]C\}}t|ts t d |t |tst |t|<EtS#t$r}t d|d}~wwxYw)aDefines custom exceptions for MySQL server errors. This function defines custom exceptions for MySQL server errors and returns the current set customizations. To reset the customizations, simply supply an empty dictionary. Args: error: Can be a MySQL Server error number or a dictionary in which case the key is the server error number and the value is the exception to be raised. exception: If `error` is a MySQL Server error number then you have to pass also the exception class, otherwise you don't. Returns: dictionary: Current set customizations. Examples: ``` import mysql.connector from mysql.connector import errorcode # Server error 1028 should raise a DatabaseError mysql.connector.custom_error_exception( 1028, mysql.connector.DatabaseError) # Or using a dictionary: mysql.connector.custom_error_exception({ 1028: mysql.connector.DatabaseError, 1029: mysql.connector.OperationalError, }) # Reset mysql.connector.custom_error_exception({}) ``` zGet the exception matching the MySQL error This function will return an exception based on the SQLState. The given message will be passed on in the returned exception. The exception returned can be customized using the mysql.connector.custom_error_exception() function. Returns an Exception )rrr)rrr)rVKeyError_ERROR_EXCEPTIONSr4r:_SQLSTATE_CLASS_EXCEPTION)rrrrbs r%get_mysql_exceptionrhs  '.3ehWW      'CuxPP      5#& &E22F(!A758   FEHEEFs, 4 AA!A55BBpacketcdx}} |ddk7r td d} |dd}t|d\}}|d d k7r+t |t t fr|jd }n7|}n4t|d dd\}}|jd }|jd }t|||S#t$r}td|dcYd}~Sd}~wwxYw#ttf$r}td|dcYd}~Sd}~wwxYw) zReturns an exception object based on the MySQL error Returns an exception object based on the MySQL error in the given packet. Returns an Error-Object. NzPacket is not an error packetz"Failed getting Error information (rrdr#utf8r ) r\ IndexErrorr7r rZbytes bytearraydecoder UnicodeErrorrh)rirerrmsgr!rs r% get_exceptionrv;s EFK !9 <= =  &*HK +  !9?&5)"45v.)&*a8 FHv.H]]6*F ufh 77' K B3%qIJJK"  %K B3%qIJJKs;B%A;C % C.C<CC C2C-'C2-C20207080A21222324252627282A2B2C2D2E)333435373C3D3F404244HZXA0KHYrg)iiiiiii irf)NN)NNF)+r.typingrrrrrrlocalesr typesr utilsr r r_rr4r7r:r<r>r@rBrErGrIrKrMrSErrorClassTypes ErrorTypesrVr0rQrar/boolrhrqrvrgrfrr)r%rs:>>%',I,^+i+8U87E78M8C}C2}2>]>F FM M>>UWuW&XX&K  O O           &8:$sO349IM+/@$ E#tC/)B$BCCD E@$(@$ S(?+ +,@$J"# 'F 'F #'Fsm'Fd^ 'F  'FT 8% 8J 8F 9) 9- 9  9  9  ) 9  ) 9 . 9  9  9  9  9  9  9 - 9  9  -! 9" -# 9$              ? 94_ 45 F         14_,- r)