Server IP : 192.158.238.246 / Your IP : 3.15.27.146 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/__pycache__/ |
Upload File : |
B ��4]�p � @ sZ d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd l mZ dd lm Z ddlmZ ddlmZ d dlmZ d dlmZ d dlmZ d dlmZ G dd� dej�ZG dd� de�ZG dd� dej�ZG dd� dej�ZG dd� de�ZG dd� dej�ZG dd� de�ZG d d!� d!ej�Z G d"d#� d#ej�Z!G d$d%� d%ej�Z"dS )&zORM event interfaces. � N� )�instrumentation)� interfaces)� mapperlib)�QueryableAttribute)�_mapper_or_none)�Query)�scoped_session)�Session)�sessionmaker� )�event)�exc)�util)�inspect_getfullargspecc s` e Zd ZdZdZejZedd� �Z eddd��Z e� fdd ��Zd d� Zdd � Z dd� Z� ZS )�InstrumentationEventsa Events related to class instrumentation events. The listeners here support being established against any new style class, that is any object that is a subclass of 'type'. Events will then be fired off for events against that class. If the "propagate=True" flag is passed to event.listen(), the event will fire off for subclasses of that class as well. The Python ``type`` builtin is also accepted as a target, which when used has the effect of events being emitted for all classes. Note the "propagate" flag here is defaulted to ``True``, unlike the other class level events where it defaults to ``False``. This means that new subclasses will also be the subject of these events, when a listener is established on a superclass. Z SomeBaseClassc C s t |t�rt|�S d S d S )N)� isinstance�type�_InstrumentationEventsHold)�cls�target� r �H/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/events.py�_accept_with5 s z"InstrumentationEvents._accept_withTc s` |j |j|j ��� � ��fdd����fdd�}t��j|��|�tj�� ��j f |� d S )Nc s@ �� }�r"t | |�r"� | f|�� S �s<| |kr<� | f|�� S d S )N)� issubclass)Z target_cls�argZ listen_cls)�fn� propagater r r �listenD s z-InstrumentationEvents._listen.<locals>.listenc s, t j�d � �tj�}ttjj� ��|� d S )N)r �registryZ _EventKeyr �_instrumentation_factory�getattr�dispatch�remove)�ref�key)� identifierr r r r# K s z-InstrumentationEvents._listen.<locals>.remove)�dispatch_targetr&