XylotrechusZ
�
Ȓ�gf4 � �: � d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dlmZ d dlZd dl Z ddl
mZ ddlm
Z
dd lmZ d
dl
mZ d
dl
mZ d
d
lmZ d
dlmZ ej( rd
dlmZ d
dlmZ d
dlmZ G d� d� Z e� Ze
d� � Ze
d� � Ze
d� � Ze
d� � Z d$d�Z! G d� d� Z"d%d�Z#ejH d& d'd�� Z%ejH d( d)d�� Z% d*d�Z%d$d�Z& G d � d!� Z' G d"� d#� Z(y)+� )�annotationsN)�Any)�Dict)�Optional� )�config)� decorator)�
gc_collect� )�event)�pool)�
await_only)�Literal)�Engine)�URL)�AsyncEnginec �r � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� Zd� Zd� Zd� Zd� Zy)�ConnectionKillerc � � t j � | _ t j t
� | _ t � | _ y �N)�weakref�WeakKeyDictionary�
proxy_refs�collections�defaultdict�set�testing_engines�dbapi_connections��selfs �K/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/testing/engines.py�__init__zConnectionKiller.__init__% s/ � �!�3�3�5���*�6�6�s�;���!$���� c � � t j |d| j � t j |d| j � t j |d| j � t j |d| j � y )N�checkout�checkin�close�close_detached)r �listen� _add_conn�_remove_conn)r r
s r! �add_poolzConnectionKiller.add_pool* sY � �
���T�:�t�~�~�6�
���T�9�d�&7�&7�8�
���T�7�D�$5�$5�6�
���T�+�T�->�->�?r# c �X � | j j |� d| j |<