File: //usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/__pycache__/instrumentation.cpython-310.pyc
o
���g_ � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
lmZ ddlmZ ddlm
Z
dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddl"m#Z# dd l"m$Z$ er�dd!lm%Z% dd"lm&Z& dd#lm'Z' dd$lm(Z( dd%lm)Z) dd&l*m+Z+ dd'l,m-Z- dd(l.m/Z/ dd)lm0Z0 dd*lm1Z1 ed+ed,�Z2e�3d-�Z4G d.d/� d/e$�Z5G d0d1� d1e$�Z6G d2d3� d3e!ee7d4f e e e �Z8G d5d6� d6�Z9G d7d8� d8e �Z:e:� Z;ej< Z<Z=ej> Z>Z?ej@ Z@ZAejB ZBZC 9 dRdSdJdK�ZDdLdM� ZEdNdO� ZFdPdQ� ZGdS )Ta� Defines SQLAlchemy's system of class instrumentation.
This module is usually not directly visible to user applications, but
defines a large part of the ORM's interactivity.
instrumentation.py deals with registration of end-user classes
for state tracking. It interacts closely with state.py
and attributes.py which establish per-instance and per-class-attribute
instrumentation, respectively.
The class instrumentation system can be customized on a per-class
or global basis using the :mod:`sqlalchemy.ext.instrumentation`
module, which provides the means to build and specify
alternate instrumentation forms.
.. versionchanged: 0.8
The instrumentation extension system was moved out of the
ORM and into the external :mod:`sqlalchemy.ext.instrumentation`
package. When that package is imported, it installs
itself within sqlalchemy.orm so that its more comprehensive
resolution mechanics take effect.
� )�annotations)�Any)�Callable)�cast)�
Collection)�Dict)�Generic)�Iterable)�List)�Optional)�Set)�Tuple)�Type)�
TYPE_CHECKING)�TypeVar)�UnionN� )�base)�collections)�exc)�
interfaces)�state)�_O)�_is_collection_attribute_impl� )�util)�EventTarget)�HasMemoized)�Literal)�Protocol)�
_RegistryType)�
AttributeImpl)�QueryableAttribute)�_AdaptedCollectionProtocol)�_CollectionFactoryType)�
_MapperConfig)�InstanceEvents)�Mapper)�
InstanceState)�
dispatcher�_T)�bound�DEL_ATTRc @ s e Zd Zdd d
�ZdS )
�_ExpiredAttributeLoaderProtor �state.InstanceState[Any]�toload�Set[str]�passive�base.PassiveFlag�return�Nonec C � d S �N� )�selfr r/ r1 r7 r7 �I/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/instrumentation.py�__call__S s z%_ExpiredAttributeLoaderProto.__call__N)r r. r/ r0 r1 r2 r3 r4 ��__name__�
__module__�__qualname__r: r7 r7 r7 r9 r- R � r- c @ s e Zd Zddd�ZdS ) �_ManagerFactory�class_�Type[_O]r3 �ClassManager[_O]c C r5 r6 r7 �r8 rA r7 r7 r9 r: \ � z_ManagerFactory.__call__N�rA rB r3 rC r; r7 r7 r7 r9 r@ [ r? r@ c @ s� e Zd ZU dZded<