Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/sqlalchemy/orm/__pycache__/instrumentation.cpython-39.pyc
Ðазад
a _�h�H � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ e�� Z G d d � d e �ZG dd� de�Z G d d� de�Ze� Zej ZZej ZZej ZZdd� Zdd� Zdd� Zdd� ZdS )a� 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. � )�base)�collections)�exc)� interfaces)�state� )�utilc @ s� e Zd ZdZejZejZe e �e��ZdZ ejZdZdd� Zdd� Zdd� Zed d � �Zedd� �Zed d� �Zedd� �Ze jdd� �ZdZdd�Zd[dd�Zdd� Zdd� Zdd� Z dd� Z!e jdd � �Z"d!d"� Z#d#d$� Z$e j%d%d&� �Z&e j%d'd(� �Z'e j%d)d*� �Z(d\d,d-�Z)d.d/� Z*d0d1� Z+d]d2d3�Z,d4d5� Z-d6d7� Z.d8d9� Z/d:d;� Z0d<d=� Z1d>d?� Z2d@dA� Z3d^dBdC�Z4dDdE� Z5edFdG� �Z6d_dHdI�Z7d`dJdK�Z8dLdM� Z9dNdO� Z:dPdQ� Z;dRdS� Z<dadTdU�Z=dVdW� Z>e>Z?dXdY� Z@dS )b�ClassManagerz,Tracks state information at the class level.Nc C s� || _ i | _d | _i | _i | _dd� dd� | j jD �D �| _| jD ]}| �|� qB| jj � || � |jD ]"}t|�}|d urh| j� |j� qh| �� | �� d|jv r�t�d| � d S )Nc S s g | ]}|d ur|�qS �N� )�.0�mgrr r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/sqlalchemy/orm/instrumentation.py� <listcomp>A s �z)ClassManager.__init__.<locals>.<listcomp>c S s g | ]}t |t�rt|��qS r )� isinstance�type�manager_of_class)r r r r r r C s ��__del__z�__del__() method on class %s will cause unreachable cycles and memory leaks, as SQLAlchemy instrumentation often creates reference cycles. Please remove this method.)�class_�info�new_init�local_attrs� originals� __bases__Z_bases�update�dispatchZ_eventsZ_new_classmanager_instance�__mro__r �_update�manage�_instrument_init�__dict__r �warn)�selfr Zbase_Zbaseclsr r r r �__init__: s2 �� ��zClassManager.__init__c C s t | �S r )�id�r"