Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
exc.cpython-313.pyc77 linesDownload Raw Back to __pycache__
1�

2��j�����SrSSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJ	r	 S	S3K4Jr SSKJ
r SS
KJ5r6 SSK
Jr SSK
Jr \(aS	SKJr S	SKJr S	SKJr \	"S\S9r\\4r"SS\R45r\r"SS\R45r"SS\R<5r"SS\R@5r!"SS\R45r""SS \R45r#"S!S"\!5r$"S#S$\!5r%"S%S&\R@5r&"S'S(\R@5r'"S)S*\R@5r(S/S+jr)\7RT"S,5S0S-j5r+g.)1zSQLAlchemy ORM exceptions.�)�annotations)�Any)�Optional)�Tuple)�Type)�
TYPE_CHECKING)�TypeVar�)�_mapper_property_as_plain_name�)�exc)�util)�MultipleResultsFound)�
NoResultFound)�LoaderStrategy)�MapperProperty)�
InstanceState�_T)�boundc��\rSrSrSrSrg)�StaleDataError�$a!An operation encountered database state that is unaccounted for.8 9Conditions which cause this to happen include:10 11* A flush may have attempted to update or delete rows12  and an unexpected number of rows were matched during13  the UPDATE or DELETE statement.   Note that when14  version_id_col is used, rows in UPDATE or DELETE statements15  are also matched against the current known version16  identifier.17 18* A mapped object with version_id_col was refreshed,19  and the version number coming back from the database does20  not match that of the object itself.21 22* A object is detached from its parent object, however23  the object was previously attached to a different parent24  identity which was garbage collected, and a decision25  cannot be made if the new parent was really the most26  recent "parent".27 28�N��__name__�29__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��XD:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/orm/exc.pyrr$s��r!rc��\rSrSrSrSrg)�30FlushError�@z0A invalid condition was detected during flush().rNrrr!r"r$r$@s��:r!r$c��\rSrSrSrSrg)�MappedAnnotationError�Dz�Raised when ORM annotated declarative cannot interpret the31expression present inside of the :class:`.Mapped` construct.32 33.. versionadded:: 2.0.4034 35rNrrr!r"r'r'Ds��r!r'c��\rSrSrSrSrg)�
UnmappedError�Mz?Base for exceptions that involve expected mappings not present.rNrrr!r"r*r*Ms��Ir!r*c��\rSrSrSrSrg)�ObjectDereferencedError�QzHAn operation cannot complete due to an object being garbage36collected.37 38rNrrr!r"r-r-Qs��r!r-c��\rSrSrSrSrSrg)�DetachedInstanceError�XzOAn attempt to access unloaded attributes on a39mapped instance that is detached.�bhk3rN)rrrrr�coder rr!r"r0r0Xs��)��Dr!r0c�Z�\rSrSrSr\R"S5SS	Sjj5rS40SjrSr	g)�UnmappedInstanceError�_z;An mapping operation was requested for an unknown instance.�sqlalchemy.orm.baseNc��[RRnU(d:UR[	U55 [[	U55nSU<SU<S3n[RX5 g![aA S[[	U55S3n[U[5(aUS[U5--
nN`f=f)NzClass z| is mapped, but this instance lacks instrumentation.  This occurs when the instance is created before sqlalchemy.orm.mapper(z
) was called.�Class '�' is not mappedz;; was a class (%s) supplied where an instance was required?)41r�	preloaded�orm_base�class_mapper�type�_safe_cls_name�UnmappedClassError�42isinstancer*�__init__)�self�obj�msg�base�names     r"rB�UnmappedInstanceError.__init__bs����~�~�&�&���
��!�!�$�s�)�,�%�d�3�i�0��43&*�4�1��	���t�)��&�
���t�C�y� 9�:�/�J���c�4�(�(��$�&4�S�&9�:��C��
�s�9A2�2AB=�<B=c�<�URSURS44$�Nr��	__class__�args�rCs r"�44__reduce__� UnmappedInstanceError.__reduce__y����~�~��d�i�i��l�3�3�3r!r�N)rD�objectrE�
Optional[str]��returnr�45rrrrrr�preload_modulerBrOr rr!r"r5r5_s(��E�	���.�/�*�0�*�,4r!r5c�0�\rSrSrSrSSSjjrS	SjrSrg)46r@�}z8An mapping operation was requested for an unknown class.Nc�R�U(d[U5n[RX5 grR)�_default_unmappedr*rB)rC�clsrEs   r"rB�UnmappedClassError.__init__�s���#�C�(�C����t�)r!c�<�URSURS44$rJrKrNs r"rO�UnmappedClassError.__reduce__�rQr!rrR)r]zType[_T]rErTrU)rrrrrrBrOr rr!r"r@r@}s��B�*�474r!r@c�Z�\rSrSrSr\R"S5SS	Sjj5rS48SjrSr	g)�ObjectDeletedError�a�A refresh operation failed to retrieve the database49row corresponding to an object's known primary key identity.50 51A refresh operation proceeds when an expired attribute is52accessed on an object, or when :meth:`_query.Query.get` is53used to retrieve an object which is, upon retrieval, detected54as expired.   A SELECT is emitted for the target row55based on primary key; if no row is returned, this56exception is raised.57 58The true meaning of this exception is simply that59no row exists for the primary key identifier associated60with a persistent object.   The row may have been61deleted, or in some cases the primary key updated62to a new value, outside of the ORM's management of the target63object.64 65r7Nc��[RRnU(dSURU5-n[R66R
X5 g)NzDInstance '%s' has been deleted, or its row is otherwise not present.)rr;r<�	state_str�sa_exc�InvalidRequestErrorrB)rC�staterErFs    r"rB�ObjectDeletedError.__init__�sF���~�~�&�&���0�26�.�.��2G�H�
�67	�"�"�+�+�D�6r!c�<�URSURS44$rJrKrNs r"rO�ObjectDeletedError.__reduce__�rQr!rrR)rhzInstanceState[Any]rErTrUrWrr!r"rbrb�s,���&68���.�/�	7�0�	7�4r!rbc��\rSrSrSrSrg)�UnmappedColumnError�z5Mapping operation was requested on an unknown column.rNrrr!r"rmrm�s��?r!rmc�6�\rSrSrSrSSjrSrg)�LoaderStrategyException�z2A loader strategy for an attribute does not exist.c
��Uc)[RRUSU<SU<35 gUce[RRUS[R"U5<SU<S[U5<S[U5<S3	5 g)NzCan't find strategy z for z
Can't apply "z" strategy to property "z", which is a "z7"; this loader strategy is intended to be used with a "z".)rfrgrBr�clsname_as_plain_namer)rC�applied_to_property_type�requesting_property�69applies_to�actual_strategy_type�strategy_keys      r"rB� LoaderStrategyException.__init__�s{�� �'��&�&�/�/���!4�6�
��)�)�)��&�&�/�/��70�.�.�/C�D�'�2�3K�L�2�:�>��
r!rN)71rt�	Type[Any]ruzMapperProperty[Any]rvz#Optional[Type[MapperProperty[Any]]]rwzOptional[Type[LoaderStrategy]]rxzTuple[Any, ...])rrrrrrBr rr!r"rprp�s:��<��"+��1��8�	�72=��&�
r!rpc��SRURUR45nU$![a [	USS5nUc[U5nU$f=f)N�.r)�joinrr�AttributeError�getattr�repr)r]�cls_names  r"r?r?�s]��!��8�8�S�^�^�S�\�\�:�;��73�O��	�!��3�74�D�1�����C�y�H���O�	!�s�'+�%A�Ar7c���[RRnURU5Rn[U5nU(dSUS3$g![75[4[-a 0nN4f=f)Nr9r:)	rr;r<�manager_of_class�mappersr@�	TypeError�NO_STATEr?)r]rFr�rGs    r"r\r\�sw���>�>�"�"�D���'�'��,�4�4���#��D�����o�.�.���	���	�����	�s�A�A,�+A,N)r]rzrV�str)r]rzrVrT),r�76__future__r�typingrrrrrr	rr�r
rfrr�77interfacesrrrhrrr~�KeyErrorr��SQLAlchemyErrorr�ConcurrentModificationErrorr$�
ArgumentErrorr'rgr*r-r0r5r@rbrmrpr?rXr\rr!r"�<module>r�s@��!�"����� ��0���&���*�*�$��T�����H�%��L��V�+�+��2-��;��'�'�;��F�0�0��J�F�.�.�J��f�4�4���F�2�2��4�M�4�<	4��	4�!4��3�3�!4�H@�&�4�4�@��f�8�8��B����*�+��,�r!
codekingpro/portable-devtools · Team Ai