관리-도구
편집 파일: attr.cpython-38.pyc
U -?�fQ � @ s� d Z ddlmZ ddlZddlmZ ddlZddlmZ ddl Z ddl m Z ddl mZ ddl mZ dd l m Z dd l mZ ddl mZ ddl mZ dd l mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# dd l$m%Z% dd!l&m'Z' ed"e d#�Z(e j)�r�dd$l*m+Z+ dd%l*m,Z, dd&l*m-Z- G d'd(� d(e#j.ee �Z/G d)d*� d*ee( �Z0ee e( e0e( f Z1G d+d,� d,e/e �Z2G d-d.� d.e/e ee! �Z3G d/d0� d0e3e �Z4G d1d2� d2e'�Z5G d3d4� d4e3e �Z6G d5d6� d6e6e �Z7G d7d8� d8e6e �Z8dS )9a� Attribute implementation for _Dispatch classes. The various listener targets for a particular event class are represented as attributes, which refer to collections of listeners to be fired off. These collections can exist at the class level as well as at the instance level. An event is fired off using code like this:: some_object.dispatch.first_connect(arg1, arg2) Above, ``some_object.dispatch`` would be an instance of ``_Dispatch`` and ``first_connect`` is typically an instance of ``_ListenerCollection`` if event listeners are present, or ``_EmptyListener`` if none are present. The attribute mechanics here spend effort trying to ensure listener functions are available with a minimum of function call overhead, that unnecessary objects aren't created (i.e. many empty per-instance listener collections), as well as that everything is garbage collectable when owning references are lost. Other features such as "propagation" of listener functions across many ``_Dispatch`` instances, "joining" of multiple ``_Dispatch`` instances, as well as support for subclass propagation (e.g. events assigned to ``Pool`` vs. ``QueuePool``) are all implemented here. � )�annotationsN)�chain)� TracebackType)�Any)�cast)� Collection)�Deque)� FrozenSet)�Generic)�Iterator)�MutableMapping)�MutableSequence)�NoReturn)�Optional)�Sequence)�Set)�Tuple)�Type)�TypeVar)�Union� )�legacy)�registry)�_ET)� _EventKey)�_ListenerFnType� )�exc)�util)�AsyncAdaptedLock)�Protocol�_T)�bound)� _Dispatch)�_DispatchCommon)�_HasEventsDispatchc @ s( e Zd ZU dZded<