ó ÃÌ4]c@sQdZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd „ƒYZd efd „ƒYZd efd„ƒYZ defd„ƒYZ defd„ƒYZ de fd„ƒYZ defd„ƒYZ defd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#eefd$„ƒYZd%efd&„ƒYZd'efd(„ƒYZd)efd*„ƒYZd+efd,„ƒYZd-efd.„ƒYZd/efd0„ƒYZd1efd2„ƒYZdMZd3efd4„ƒYZ d5e fd6„ƒYZ!d7e!fd8„ƒYZ"d9e!fd:„ƒYZ#d;e#fd<„ƒYZ$d=e#fd>„ƒYZ%d?e#fd@„ƒYZ&dAe#fdB„ƒYZ'dCe#fdD„ƒYZ(dEe#fdF„ƒYZ)dGe*fdH„ƒYZ+dIe,fdJ„ƒYZ-dKe.fdL„ƒYZ/dMS(Ns¿Exceptions used with SQLAlchemy. The base exception class is :exc:`.SQLAlchemyError`. Exceptions which are raised as a result of DBAPI exceptions are all subclasses of :exc:`.DBAPIError`. i(tcompattSQLAlchemyErrorcBsPeZdZdZd„Zd„Zejd„Z d„Z d„Z d„Z RS(sGeneric error class.cOsG|jddƒ}|dk r*||_ntt|ƒj||ŽdS(Ntcode(tpoptNoneRtsuperRt__init__(tselftargtkwR((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRs  cCs|js dSd|jfSdS(Nts6(Background on this error at: http://sqlalche.me/e/%s)(R(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt _code_strs cCsit|jƒdkrX|jd}|rJt|tjƒrJtj|dƒS|jdSn t|jƒSdS(Niisutf-8(tlentargst isinstanceRt binary_typestdecode_backslashreplacetstr(Rt as_unicodettext((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt_message's  cCs5|j|ƒ}|jr1d||jƒf}n|S(Ns%s %s(RRR (RRtmessage((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt _sql_messageCs cCs|jtjƒS(N(RRtpy3k(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt__str__KscCs|jdtƒS(NR(RtTrue(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt __unicode__NsN( t__name__t __module__t__doc__RRRR RRRRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRs    t ArgumentErrorcBseZdZRS(s“Raised when an invalid or conflicting function argument is supplied. This error generally corresponds to construction time state errors. (RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRRstObjectNotExecutableErrorcBseZdZd„ZRS(sqRaised when an object is passed to .execute() that can't be executed as SQL. .. versionadded:: 1.1 cCstt|ƒjd|ƒdS(NsNot an executable object: %r(RRR(Rttarget((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRbs(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRZstNoSuchModuleErrorcBseZdZRS(spRaised when a dynamically-loaded module (usually a database dialect) of a particular name cannot be located.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR!hstNoForeignKeysErrorcBseZdZRS(sURaised when no foreign keys can be located between two selectables during a join.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR"mstAmbiguousForeignKeysErrorcBseZdZRS(shRaised when more than one foreign key matching can be located between two selectables during a join.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR#rstCircularDependencyErrorcBs&eZdZddd„Zd„ZRS(sîRaised by topological sorts when a circular dependency is detected. There are two scenarios where this error occurs: * In a Session flush operation, if two objects are mutually dependent on each other, they can not be inserted or deleted via INSERT or DELETE statements alone; an UPDATE will be needed to post-associate or pre-deassociate one of the foreign key constrained values. The ``post_update`` flag described at :ref:`post_update` can resolve this cycle. * In a :attr:`.MetaData.sorted_tables` operation, two :class:`.ForeignKey` or :class:`.ForeignKeyConstraint` objects mutually refer to each other. Apply the ``use_alter=True`` flag to one or both, see :ref:`use_alter`. cCsb|dkr0|ddjd„|Dƒƒ7}n|}tj||d|ƒ||_||_dS(Ns (%s)s, css|]}t|ƒVqdS(N(trepr(t.0ts((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pys ‹sR(RtjoinRRtcyclestedges(RRR)R*tmsgR((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR‰s  $ cCs&|jd|j|j|jdffS(Ni(t __class__RR)R*R (R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt __reduce__’sN(RRRRRR-(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR$ws t CompileErrorcBseZdZRS(s2Raised when an error occurs during SQL compilation(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR.–stUnsupportedCompilationErrorcBseZdZdZd„ZRS(sœRaised when an operation is not supported by the given compiler. .. seealso:: :ref:`faq_sql_expression_string` :ref:`error_l7de` tl7decCs$tt|ƒjd||fƒdS(Ns+Compiler %r can't render element of type %s(RR/R(Rtcompilert element_type((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR¦s(RRRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR/šstIdentifierErrorcBseZdZRS(s;Raised when a schema name is beyond the max character limit(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR3­stDisconnectionErrorcBseZdZeZRS(s™A disconnect is detected on a raw DB-API connection. This error is raised and consumed internally by a connection pool. It can be raised by the :meth:`.PoolEvents.checkout` event so that the host pool forces a retry; the exception will be caught three times in a row before the pool gives up and raises :class:`~sqlalchemy.exc.InvalidRequestError` regarding the connection attempt. (RRRtFalsetinvalidate_pool(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR4±s tInvalidatePoolErrorcBseZdZeZRS(sáRaised when the connection pool should invalidate all stale connections. A subclass of :class:`.DisconnectionError` that indicates that the disconnect situation encountered on the connection probably means the entire pool should be invalidated, as the database has been restarted. This exception will be handled otherwise the same way as :class:`.DisconnectionError`, allowing three attempts to reconnect before giving up. .. versionadded:: 1.2 (RRRRR6(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR7¿s t TimeoutErrorcBseZdZRS(s@Raised when a connection pool times out on getting a connection.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR8ÑstInvalidRequestErrorcBseZdZRS(svSQLAlchemy was asked to do something it can't do. This error generally corresponds to runtime state errors. (RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR9ÕstNoInspectionAvailablecBseZdZRS(saA subject passed to :func:`sqlalchemy.inspection.inspect` produced no context for inspection.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR:ÝstResourceClosedErrorcBseZdZRS(scAn operation was requested from a connection, cursor, or other object that's in a closed state.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR;âstNoSuchColumnErrorcBseZdZRS(s6A nonexistent column is requested from a ``RowProxy``.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR<çstNoReferenceErrorcBseZdZRS(sDRaised by ``ForeignKey`` to indicate a reference cannot be resolved.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR=ëstNoReferencedTableErrorcBs eZdZd„Zd„ZRS(sQRaised by ``ForeignKey`` when the referred ``Table`` cannot be located. cCstj||ƒ||_dS(N(R=Rt table_name(RRttname((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRõscCs|j|jd|jffS(Ni(R,R R?(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR-ùs(RRRRR-(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR>ïs tNoReferencedColumnErrorcBs eZdZd„Zd„ZRS(sRRaised by ``ForeignKey`` when the referred ``Column`` cannot be located. cCs&tj||ƒ||_||_dS(N(R=RR?t column_name(RRR@tcname((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRs cCs#|j|jd|j|jffS(Ni(R,R R?RB(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR-s(RRRRR-(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRAýs tNoSuchTableErrorcBseZdZRS(s7Table does not exist or is not visible to a connection.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRDstUnreflectableTableErrorcBseZdZRS(sUTable exists but can't be reflected for some reason. .. versionadded:: 1.2 (RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyREstUnboundExecutionErrorcBseZdZRS(sASQL was attempted without a database connection to execute it on.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRFst DontWrapMixincBseZdZRS(s8A mixin class which, when applied to a user-defined Exception class, will not be wrapped inside of :exc:`.StatementError` if the error is emitted within the process of executing a statement. E.g.:: from sqlalchemy.exc import DontWrapMixin class MyCustomException(Exception, DontWrapMixin): pass class MySpecialType(TypeDecorator): impl = String def process_bind_param(self, value, dialect): if value == 'invalid': raise MyCustomException("invalid!") (RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRGstStatementErrorcBsGeZdZdZdZdZdd„Zd„Zd„Z d„Z RS(svAn error occurred during execution of a SQL statement. :class:`StatementError` wraps the exception raised during execution, and features :attr:`.statement` and :attr:`.params` attributes which supply context regarding the specifics of the statement which had an issue. The wrapped exception object is available in the :attr:`.orig` attribute. cCs>tj||d|ƒ||_||_||_g|_dS(NR(RRt statementtparamstorigtdetail(RRRIRJRKR((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyROs    cCs|jj|ƒdS(N(RLtappend(RR+((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyt add_detailVscCs)|j|jd|j|j|jffS(Ni(R,R RIRJRK(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR-YscCsôddlm}|jd|ƒg}|jr§| rXtj rXdtj|jƒ}n d|j}|j|ƒ|jr§|j |jdƒ}|jd|ƒq§n|j ƒ}|rÉ|j|ƒndj g|j D]}d|^qÙ|ƒS( Niÿÿÿÿ(tutilRs [SQL: %s]i s[parameters: %r]s s(%s)( tsqlalchemy.sqlRORRIRRtsafe_bytestringRMRJt _repr_paramsR R(RL(RRROtdetailst stmt_detailt params_reprtcode_strtdet((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR_s      N( RRRRRIRJRKRRNR-R(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRH9s    t DBAPIErrorcBsAeZdZdZeedd„ƒZd„Zedd„Z RS(s Raised when the execution of a database operation fails. Wraps exceptions raised by the DB-API underlying the database operation. Driver-specific implementations of the standard DB-API exception types are wrapped by matching sub-types of SQLAlchemy's :class:`DBAPIError` when possible. DB-API's ``Error`` type maps to :class:`DBAPIError` in SQLAlchemy, otherwise the names are identical. Note that there is no guarantee that different DB-API implementations will raise the same exception type for any given error condition. :class:`DBAPIError` features :attr:`~.StatementError.statement` and :attr:`~.StatementError.params` attributes which supply context regarding the specifics of the statement which had an issue, for the typical case when the error was raised within the context of emitting a SQL statement. The wrapped exception object is available in the :attr:`~.StatementError.orig` attribute. Its type and properties are DB-API implementation specific. tdbapic Csdt|tƒrt|tƒ s.t|tƒr2|S|dk rHt|tƒr|rtd|jj|jj |j df|||d|j ƒSt||ƒ rÑ|rÑtd|jj|jj |f|||ƒSt ƒ}xk|jj D]Z}|j } |r|jj| | ƒ} n| |krçt|| tƒrç|| }PqçqçWn|||||d|j ƒS(Ns (%s.%s) %siR(Rt BaseExceptiont ExceptionRGRRRHR,RRR Rtglobalst__mro__tdbapi_exception_translation_maptgett issubclassRX( tclsRIRJRKtdbapi_base_errtconnection_invalidatedtdialecttglobtsuper_tname((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pytinstancesD            cCs%|j|j|j|j|jffS(N(R,RIRJRKRc(R((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR-Ês cCs{yt|ƒ}Wn#tk r5}dt|ƒ}nXtj|d|jj|jj|f|||d|ƒ||_dS(Ns.Error in str() of DB-API-generated exception: s (%s.%s) %sR(RR[RHRR,RRRc(RRIRJRKRcRRte((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRÕsN( RRRRt classmethodR5RRhR-R(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRXts5 tInterfaceErrorcBseZdZdZRS(sWraps a DB-API InterfaceError.trvf5(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRkèst DatabaseErrorcBseZdZdZRS(sWraps a DB-API DatabaseError.t4xp6(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRmîst DataErrorcBseZdZdZRS(sWraps a DB-API DataError.t9h9h(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRoôstOperationalErrorcBseZdZdZRS(s Wraps a DB-API OperationalError.te3q8(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRqústIntegrityErrorcBseZdZdZRS(sWraps a DB-API IntegrityError.tgkpj(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRsst InternalErrorcBseZdZdZRS(sWraps a DB-API InternalError.t2j85(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRustProgrammingErrorcBseZdZdZRS(s Wraps a DB-API ProgrammingError.tf405(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRw stNotSupportedErrorcBseZdZdZRS(s!Wraps a DB-API NotSupportedError.ttw8g(RRRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyRystSADeprecationWarningcBseZdZRS(s*Issued once per usage of a deprecated API.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR{stSAPendingDeprecationWarningcBseZdZRS(s*Issued once per usage of a deprecated API.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR|st SAWarningcBseZdZRS(sIssued at runtime.(RRR(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pyR}#sN(0RRORR[RRRR!R"R#R$R.R/R3R4R7R8R9R:R;tKeyErrorR<R=R>RARDRERFtobjectRGRtUnmappedColumnErrorRHRXRkRmRoRqRsRuRwRytDeprecationWarningR{tPendingDeprecationWarningR|tRuntimeWarningR}(((sA/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/exc.pytsN?;t