
    ,h              
      |   % S r SSKJr  SSKrSSKrSSKrSSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK J!r!  \R$                  (       a*  SSK"J#r#  SSK"J$r$  SSK%J&q&  SSK%J'q'  SSK%J(q(  SS K%J)q)  SS!K*J+r+  / S"Qr,\RZ                  " 5       r.\/ S#4   r/\" S$\S%9r0\" S&\S%9r1\" S'\S%9r2\" S(S)S%9r3\" S*S+S%9r4 " S, S-\!5      r5 " S. S#\!5      r6 " S/ S05      r7\(       a  SXS2 jr8O\Rr                  " S35      r8 " S4 S15      r:SYS5 jr;    SZS6 jr<S7 r=S8 r>S9 r?S: r@S; rAS< rBSYS= jrCS> rDS? rESYS@ jrFS[SA jrGS[SB jrH\I\J4rKS\SC jrLS\SD jrMS[SE jrN " SF SG\\0   5      rO " SH SI\\0   5      rP " SJ SK\
\1\24   5      rQ\R                  " \S\O\I\P\T\Q05      rUSL\VSM'   \R                  " \SSNSOSPSQ.\G" 5       4\ISRSOSPSQ.\N" 5       4\TSSST0\H" 5       405      rWSU\VSV'   SW rX\X" \Y" 5       5        g)]aL  Support for collections of mapped entities.

The collections package supplies the machinery used to inform the ORM of
collection membership changes.  An instrumentation via decoration approach is
used, allowing arbitrary types (including built-ins) to be used as entity
collections without requiring inheritance from a base class.

Instrumentation decoration relays membership change events to the
:class:`.CollectionAttributeImpl` that is currently managing the collection.
The decorators observe function call arguments and return values, tracking
entities entering or leaving the collection.  Two decorator approaches are
provided.  One is a bundle of generic decorators that map function arguments
and return values to events::

  from sqlalchemy.orm.collections import collection


  class MyClass:
      # ...

      @collection.adds(1)
      def store(self, item):
          self.data.append(item)

      @collection.removes_return()
      def pop(self):
          return self.data.pop()

The second approach is a bundle of targeted decorators that wrap appropriate
append and remove notifiers around the mutation methods present in the
standard Python ``list``, ``set`` and ``dict`` interfaces.  These could be
specified in terms of generic decorator recipes, but are instead hand-tooled
for increased efficiency.  The targeted decorators occasionally implement
adapter-like behavior, such as mapping bulk-set methods (``extend``,
``update``, ``__setslice__``, etc.) into the series of atomic mutation events
that the ORM requires.

The targeted decorators are used internally for automatic instrumentation of
entity collection classes.  Every collection class goes through a
transformation process roughly like so:

1. If the class is a built-in, substitute a trivial sub-class
2. Is this class already instrumented?
3. Add in generic decorators
4. Sniff out the collection interface through duck-typing
5. Add targeted decoration to any undecorated interface method

This process modifies the class at runtime, decorating methods and adding some
bookkeeping properties.  This isn't possible (or desirable) for built-in
classes like ``list``, so trivial sub-classes are substituted to hold
decoration::

  class InstrumentedList(list):
      pass

Collection classes can be specified in ``relationship(collection_class=)`` as
types or a function that returns an instance.  Collection classes are
inspected and instrumented during the mapper compilation phase.  The
collection_class callable will be executed once to produce a specimen
instance, and the type of that specimen will be instrumented.  Functions that
return built-in types like ``lists`` will be adapted to produce instrumented
instances.

When extending a known type like ``list``, additional decorations are not
generally not needed.  Odds are, the extension method will delegate to a
method that's already instrumented.  For example::

  class QueueIsh(list):
      def push(self, item):
          self.append(item)

      def shift(self):
          return self.pop(0)

There's no need to decorate these methods.  ``append`` and ``pop`` are already
instrumented as part of the ``list`` interface.  Decorating them would fire
duplicate events, which should be avoided.

The targeted decoration tries not to rely on other methods in the underlying
collection class, but some are unavoidable.  Many depend on 'read' methods
being present to properly instrument a 'write', for example, ``__setitem__``
needs ``__getitem__``.  "Bulk" methods like ``update`` and ``extend`` may also
reimplemented in terms of atomic appends and removes, so the ``extend``
decoration will actually perform many ``append`` operations and not call the
underlying method at all.

Tight control over bulk operation and the firing of events is also possible by
implementing the instrumentation internally in your methods.  The basic
instrumentation package works under the general assumption that collection
mutation will not raise unusual exceptions.  If you want to closely
orchestrate append and remove events with exception management, internal
instrumentation may be the answer.  Within your method,
``collection_adapter(self)`` will retrieve an object that you can use for
explicit control over triggering append and remove events.

The owning object and :class:`.CollectionAttributeImpl` are also reachable
through the adapter, allowing for some very sophisticated behavior.

    )annotationsN)Any)Callable)cast)
Collection)Dict)Iterable)List)NoReturn)Optional)Set)Tuple)Type)TYPE_CHECKING)TypeVar)Union   )NO_KEY   )exc)utilNO_ARG)inspect_getfullargspec)Protocol)AttributeEventToken)CollectionAttributeImplattribute_keyed_dictcolumn_keyed_dictkeyfunc_mappingKeyFuncDict)InstanceState)

collectioncollection_adapterr#   r!   r   r%   mapped_collectioncolumn_mapped_collectionattribute_mapped_collectionMappedCollection_AdaptedCollectionProtocol_T)bound_KT_VT_COLCollection[Any]_FNCallable[..., Any]c                      \ rS rSrSS jrSrg)_CollectionConverterProtocol   c                    g N )selfr'   s     R/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/orm/collections.py__call__%_CollectionConverterProtocol.__call__   s    #    r;   N)r'   r2   returnr2   )__name__
__module____qualname____firstlineno__r>   __static_attributes__r;   r@   r=   r7   r7      s    5r@   r7   c                  H    \ rS rSr% S\S'   S\S'   S\S'   S\S'   S	\S
'   Srg)r-      CollectionAdapter_sa_adapterr5   _sa_appender_sa_removerzCallable[..., Iterable[Any]]_sa_iteratorr7   _sa_converterr;   N)rB   rC   rD   rE   __annotations__rF   r;   r@   r=   r-   r-      s     ""$$##..//r@   c                      \ rS rSrSr\S 5       r\S 5       r\S 5       r\S 5       r	\\
R                  " SS5      S	 5       5       r\S
 5       r\S 5       r\S 5       r\S 5       rSrg)r'      aB  Decorators for entity collection classes.

The decorators fall into two groups: annotations and interception recipes.

The annotating decorators (appender, remover, iterator, converter,
internally_instrumented) indicate the method's purpose and take no
arguments.  They are not written with parens::

    @collection.appender
    def append(self, append): ...

The recipe decorators all require parens, even those that take no
arguments::

    @collection.adds("entity")
    def insert(self, position, entity): ...


    @collection.removes_return()
    def popitem(self): ...

c                    SU l         U $ )a  Tag the method as the collection appender.

The appender method is called with one positional argument: the value
to append. The method will be automatically decorated with 'adds(1)'
if not already decorated::

    @collection.appender
    def add(self, append): ...


    # or, equivalently
    @collection.appender
    @collection.adds(1)
    def add(self, append): ...


    # for mapping type, an 'append' may kick out a previous value
    # that occupies that slot.  consider d['a'] = 'foo'- any previous
    # value in d['a'] is discarded.
    @collection.appender
    @collection.replaces(1)
    def add(self, entity):
        key = some_key_func(entity)
        previous = None
        if key in self:
            previous = self[key]
        self[key] = entity
        return previous

If the value to append is not allowed in the collection, you may
raise an exception.  Something to remember is that the appender
will be called for each object mapped by a database query.  If the
database contains rows that violate your collection semantics, you
will need to get creative to fix the problem, as access via the
collection will not work.

If the appender method is internally instrumented, you must also
receive the keyword argument '_sa_initiator' and ensure its
promulgation to collection events.

appender_sa_instrument_rolefns    r=   rS   collection.appender   s    V ",	r@   c                    SU l         U $ )a  Tag the method as the collection remover.

The remover method is called with one positional argument: the value
to remove. The method will be automatically decorated with
:meth:`removes_return` if not already decorated::

    @collection.remover
    def zap(self, entity): ...


    # or, equivalently
    @collection.remover
    @collection.removes_return()
    def zap(self): ...

If the value to remove is not present in the collection, you may
raise an exception or return None to ignore the error.

If the remove method is internally instrumented, you must also
receive the keyword argument '_sa_initiator' and ensure its
promulgation to collection events.

removerrT   rV   s    r=   rZ   collection.remover  s    2 "+	r@   c                    SU l         U $ )zTag the method as the collection remover.

The iterator method is called with no arguments.  It is expected to
return an iterator over all collection members::

    @collection.iterator
    def __iter__(self): ...

iteratorrT   rV   s    r=   r]   collection.iterator  s     ",	r@   c                    SU l         U $ )ah  Tag the method as instrumented.

This tag will prevent any decoration from being applied to the
method. Use this if you are orchestrating your own calls to
:func:`.collection_adapter` in one of the basic SQLAlchemy
interface methods, or to prevent an automatic ABC method
decoration from wrapping your implementation::

    # normally an 'extend' method on a list-like class would be
    # automatically intercepted and re-implemented in terms of
    # SQLAlchemy events and append().  your implementation will
    # never be called, unless:
    @collection.internally_instrumented
    def extend(self, items): ...

T)_sa_instrumentedrV   s    r=   internally_instrumented"collection.internally_instrumented,  s    $ #	r@   z1.3zThe :meth:`.collection.converter` handler is deprecated and will be removed in a future release.  Please refer to the :class:`.AttributeEvents.bulk_replace` listener interface in conjunction with the :func:`.event.listen` function.c                    SU l         U $ )a	  Tag the method as the collection converter.

This optional method will be called when a collection is being
replaced entirely, as in::

    myobj.acollection = [newvalue1, newvalue2]

The converter method will receive the object being assigned and should
return an iterable of values suitable for use by the ``appender``
method.  A converter must not assign values or mutate the collection,
its sole job is to adapt the value the user provides into an iterable
of values for the ORM's use.

The default converter implementation will use duck-typing to do the
conversion.  A dict-like collection will be convert into an iterable
of dictionary values, and other types will simply be iterated::

    @collection.converter
    def convert(self, other): ...

If the duck-typing of the object does not match the type of this
collection, a TypeError is raised.

Supply an implementation of this method if you want to expand the
range of possible types that can be assigned in bulk or perform
validation on the values about to be assigned.

	converterrT   rV   s    r=   rd   collection.converterA  s    J "-	r@   c                   ^  U 4S jnU$ )a  Mark the method as adding an entity to the collection.

Adds "add to collection" handling to the method.  The decorator
argument indicates which method argument holds the SQLAlchemy-relevant
value.  Arguments can be specified positionally (i.e. integer) or by
name::

    @collection.adds(1)
    def push(self, item): ...


    @collection.adds("entity")
    def do_stuff(self, thing, entity=None): ...

c                   > ST4U l         U $ )Nfire_append_event_sa_instrument_beforerW   args    r=   	decorator"collection.adds.<locals>.decorator{      (;S'AB$Ir@   r;   rl   rm   s   ` r=   addscollection.addsi  s    $	 r@   c                   ^  U 4S jnU$ )a  Mark the method as replacing an entity in the collection.

Adds "add to collection" and "remove from collection" handling to
the method.  The decorator argument indicates which method argument
holds the SQLAlchemy-relevant value to be added, and return value, if
any will be considered the value to remove.

Arguments can be specified positionally (i.e. integer) or by name::

    @collection.replaces(2)
    def __setitem__(self, index, item): ...

c                (   > ST4U l         SU l        U $ )Nrh   fire_remove_event)rj   _sa_instrument_afterrk   s    r=   rm   &collection.replaces.<locals>.decorator  s    (;S'AB$&9B#Ir@   r;   rp   s   ` r=   replacescollection.replaces  s     	
 r@   c                   ^  U 4S jnU$ )a  Mark the method as removing an entity in the collection.

Adds "remove from collection" handling to the method.  The decorator
argument indicates which method argument holds the SQLAlchemy-relevant
value to be removed. Arguments can be specified positionally (i.e.
integer) or by name::

    @collection.removes(1)
    def zap(self, item): ...

For methods where the value to remove is not known at call-time, use
collection.removes_return.

c                   > ST4U l         U $ Nru   ri   rk   s    r=   rm   %collection.removes.<locals>.decorator  ro   r@   r;   rp   s   ` r=   removescollection.removes  s    "	 r@   c                     S n U $ )au  Mark the method as removing an entity in the collection.

Adds "remove from collection" handling to the method.  The return
value of the method, if any, is considered the value to remove.  The
method arguments are not inspected::

    @collection.removes_return()
    def pop(self): ...

For methods where the value to remove is known at call-time, use
collection.remove.

c                    SU l         U $ r|   )rv   rV   s    r=   rm   ,collection.removes_return.<locals>.decorator  s    &9B#Ir@   r;   )rm   s    r=   removes_returncollection.removes_return  s     	 r@   r;   N)rB   rC   rD   rE   __doc__staticmethodrS   rZ   r]   ra   r   
deprecatedrd   rq   rx   r~   r   rF   r;   r@   r=   r'   r'      s    4 + +Z  6    ( 	__	? @  .  ,  ,  r@   r'   rI   c                    g)z7Fetch the :class:`.CollectionAdapter` for a collection.Nr;   )r'   s    r=   r(   r(     s    r@   rJ   c                     \ rS rSr% SrSrS\S'   S\S'   S\S	'   S
\S'   S\S'   S\S'   S\S'         S.S jrS/S jr\	S0S j5       r
\	S1S j5       rS r S2     S3S jjrS rS/S jrS4S jrS5S jrS6S jrS r S2     S3S jjrS5S jr S2   S7S  jjrS/S! jrS" rS# rS$ rS\4S% jrS\4S& jrS\4S' jrS\4S( jrS\4S) jr S\4S* jr!S+ r"S, r#S-r$g)8rI   i  aQ  Bridges between the ORM and arbitrary Python collections.

Proxies base-level collection operations (append, remove, iterate)
to the underlying Python collection, and emits add/remove events for
entities entering or leaving the collection.

The ORM uses :class:`.CollectionAdapter` exclusively for interaction with
entity collections.


)attr_key_dataowner_state
_converterinvalidatedemptyr   r   strr   z)Callable[..., _AdaptedCollectionProtocol]r   InstanceState[Any]r   r7   r   boolr   r   c                    Xl         UR                  U l        [        R                  " U5      U l        X l        Xl        UR                  U l	        SU l
        SU l        g NF)r   keyr   weakrefrefr   r   rJ   rN   r   r   r   )r<   r   r   datas       r=   __init__CollectionAdapter.__init__  sN     	HH	 [[&
&,, 
r@   c                0    [         R                  " S5        g )Nz%This collection has been invalidated.)r   warnr<   s    r=   _warn_invalidated#CollectionAdapter._warn_invalidated  s    		9:r@   c                "    U R                  5       $ )z$The entity collection being adapted.)r   r   s    r=   r   CollectionAdapter.data
  s     zz|r@   c                h    U R                   R                  U R                     U R                  5       L $ )zreturn True if the owner state still refers to this collection.

This will return False within a bulk replace operation,
where this collection is the one being replaced.

)r   dictr   r   r   s    r=   _referenced_by_owner&CollectionAdapter._referenced_by_owner  s*     $$TYY/4::<??r@   c                6    U R                  5       R                  $ r:   r   rK   r   s    r=   bulk_appenderCollectionAdapter.bulk_appender  s    zz|(((r@   Nc                >    U R                  5       R                  XS9  g)z8Add an entity to the collection, firing mutation events._sa_initiatorNr   r<   item	initiators      r=   append_with_event#CollectionAdapter.append_with_event  s    
 	

!!$!@r@   c                    U R                   (       a   S5       eSU l         XR                  R                  U R                  '   g )Nz7This collection adapter is already in the 'empty' stateT)r   r   _empty_collectionsr   )r<   	user_datas     r=   
_set_emptyCollectionAdapter._set_empty#  s:    

	ED	E
9B++DII6r@   c                    U R                   (       d   S5       eSU l         U R                  R                  R                  U R                  5      U R                  R
                  U R                  '   g )Nz3This collection adapter is not in the 'empty' stateF)r   r   r   popr   r   r   s    r=   _reset_emptyCollectionAdapter._reset_empty*  sZ    JJ	A@	A
//33DII> 	dii(r@   c                .    [         R                  " S5      e)NzZThis is a special 'empty' collection which cannot accommodate internal mutation operations)sa_excInvalidRequestErrorr   s    r=   _refuse_emptyCollectionAdapter._refuse_empty3  s    ((+
 	
r@   c                    U R                   (       a  U R                  5         U R                  5       R                  USS9  gz=Add or restore an entity to the collection, firing no events.Fr   Nr   r   r   rK   r<   r   s     r=   append_without_event&CollectionAdapter.append_without_event9  s0     :: 

!!$e!<r@   c                    U R                   (       a  U R                  5         U R                  5       R                  nU H
  nU" USS9  M     gr   r   )r<   itemsrS   r   s       r=   append_multiple_without_event/CollectionAdapter.append_multiple_without_event@  s:    :: ::<,,DT/ r@   c                6    U R                  5       R                  $ r:   r   rL   r   s    r=   bulk_removerCollectionAdapter.bulk_removerH  s    zz|'''r@   c                >    U R                  5       R                  XS9  g)z=Remove an entity from the collection, firing mutation events.r   Nr   r   s      r=   remove_with_event#CollectionAdapter.remove_with_eventK  s     	

   ?r@   c                    U R                   (       a  U R                  5         U R                  5       R                  USS9  g)z7Remove an entity from the collection, firing no events.Fr   N)r   r   r   rL   r   s     r=   remove_without_event&CollectionAdapter.remove_without_eventQ  s.    :: 

  U ;r@   c                    U R                   (       a  U R                  5         U R                  5       R                  n[	        U 5       H	  nU" X1S9  M     g)z>Empty the collection, firing a mutation event for each entity.r   Nr   r   r   rL   list)r<   r   rZ   r   s       r=   clear_with_event"CollectionAdapter.clear_with_eventW  s>    
 :: **,**JDD2 r@   c                    U R                   (       a  U R                  5         U R                  5       R                  n[	        U 5       H
  nU" USS9  M     g)z'Empty the collection, firing no events.Fr   Nr   )r<   rZ   r   s      r=   clear_without_event%CollectionAdapter.clear_without_eventb  s@     :: **,**JDD. r@   c                P    [        U R                  5       R                  5       5      $ )z(Iterate over entities in the collection.)iterr   rM   r   s    r=   __iter__CollectionAdapter.__iter__k  s     DJJL--/00r@   c                b    [        [        U R                  5       R                  5       5      5      $ )z!Count entities in the collection.)lenr   r   rM   r   s    r=   __len__CollectionAdapter.__len__p  s!    4

113455r@   c                    gNTr;   r   s    r=   __bool__CollectionAdapter.__bool__t  s    r@   c                0   U(       d  g USLa  U R                   (       a  U R                  5         U R                  (       a  U R                  5         U H@  nU R                  R                  U R                  U R                  R                  UUU5        MB     g g r   r   r   r   r   r   fire_append_wo_mutation_eventr   r   r<   r   r   r   r   s        r=   #_fire_append_wo_mutation_event_bulk5CollectionAdapter._fire_append_wo_mutation_event_bulkw  s|     E!&&(zz!!#		77$$$$))  "r@   c                   USLa~  U R                   (       a  U R                  5         U R                  (       a  U R                  5         U R                  R                  U R                  U R                  R                  XU5      $ U$ )a*  Notify that a entity is entering the collection but is already
present.


Initiator is a token owned by the InstrumentedAttribute that
initiated the membership mutation, and should be left as None
unless you are passing along an initiator value from a chained
operation.

.. versionadded:: 1.4.15

Fr   r<   r   r   r   s       r=   r   /CollectionAdapter.fire_append_wo_mutation_event  sm     E!&&(zz!!#99::  $"2"2"7"7#  Kr@   c                   USLa~  U R                   (       a  U R                  5         U R                  (       a  U R                  5         U R                  R                  U R                  U R                  R                  XU5      $ U$ )zNotify that a entity has entered the collection.

Initiator is a token owned by the InstrumentedAttribute that
initiated the membership mutation, and should be left as None
unless you are passing along an initiator value from a chained
operation.

F)r   r   r   r   r   rh   r   r   r   s       r=   rh   #CollectionAdapter.fire_append_event  sm     E!&&(zz!!#99..  $"2"2"7"7#  Kr@   c                0   U(       d  g USLa  U R                   (       a  U R                  5         U R                  (       a  U R                  5         U H@  nU R                  R                  U R                  U R                  R                  UUU5        MB     g g r   r   r   r   r   r   ru   r   r   r   s        r=   _fire_remove_event_bulk)CollectionAdapter._fire_remove_event_bulk  sz    E!&&(zz!!#		++$$$$))  "r@   c                   USLa  U R                   (       a  U R                  5         U R                  (       a  U R                  5         U R                  R                  U R                  U R                  R                  XU5        gg)zNotify that a entity has been removed from the collection.

Initiator is the InstrumentedAttribute that initiated the membership
mutation, and should be left as None unless you are passing along
an initiator value from a chained operation.

FNr   r   s       r=   ru   #CollectionAdapter.fire_remove_event  sf     E!&&(zz!!#II''  $"2"2"7"7# "r@   c                    U R                   (       a  U R                  5         U R                  R                  U R                  U R                  R
                  UUS9  g)zNotify that an entity is about to be removed from the collection.

Only called if the entity cannot be removed after calling
fire_remove_event().

)r   r   N)r   r   r   fire_pre_remove_eventr   r   )r<   r   r   s      r=   r   'CollectionAdapter.fire_pre_remove_event  sN     ""$		''!!	 	( 	
r@   c                    U R                   U R                  U R                  R                  U R                  U R                  U R
                  S.$ )N)r   r   	owner_clsr   r   r   )r   r   class_r   r   r   r   s    r=   __getstate__CollectionAdapter.__getstate__  sB    99++))00II++ZZ
 	
r@   c                4   US   U l         US   U l        [        R                  " US   5      U l        US   R
                  U l        XS   l        US   U l        [        US   U R                   5      R                  U l        UR                  SS5      U l        g )Nr   r   r   r   r   r   F)r   r   r   r   r   rN   r   rJ   r   getattrimplr   getr   )r<   ds     r=   __setstate__CollectionAdapter.__setstate__  s    eH	]+ [[6+
F)11 $&	]+AkNDII6;;	UU7E*
r@   )r   r   r   r   r   r   r   )r   r   r   r   r   r-   )rA   None)rA   r-   )rA   r   r:   )r   r   r   Optional[AttributeEventToken]rA   r	  )rA   r   )r   r   rA   r	  )r   zIterable[Any]rA   r	  )r   r
  rA   r	  )%rB   rC   rD   rE   r   	__slots__rO   r   r   propertyr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rh   r   ru   r   r   r  rF   r;   r@   r=   rI   rI     s   
I "!
I 54##,,K% ( )	,;   @ @) EIAA$AA	AC

=0( EI@@$A@	@< :>	36	3		3/1
6  $, =Af 4 15& , 8< ( 15& & /3 
 
+r@   c                   [        U [        5      (       d   e[        R                  nU" U=(       d    S5      nUR	                  U =(       d    S5      nU" U =(       d    S5      R                  U5      nUR                  U5      nUR                  5       n	U =(       d    S H  n
X;   a  U	" XS9  M  X;   d  M  U	" U
SS9  M      U(       a  UR                  XcS9  UR                  XS9  gg)a  Load a new collection, firing events based on prior like membership.

Appends instances in ``values`` onto the ``new_adapter``. Events will be
fired for any instance not present in the ``existing_adapter``.  Any
instances in ``existing_adapter`` not present in ``values`` will have
remove events fired upon them.

:param values: An iterable of collection member instances

:param existing_adapter: A :class:`.CollectionAdapter` of
 instances to be replaced

:param new_adapter: An empty :class:`.CollectionAdapter`
 to load with ``values``


r;   r   F)r   N)	
isinstancer   r   IdentitySetintersection
differencer   r   r   )valuesexisting_adapternew_adapterr   idsetexisting_idset	constants	additionsremovalsrS   members              r=   bulk_replacer    s    & fd####E+1r2N++FLb9Ifl#..y9I((3H((*H,B,V5 V51	  << 	= 	
 	000O	 r@   c                   U [         ;   a
  [         U    nO[        [        U 5      n[        U" 5       5      nU[         ;   a  [         U   n[        U" 5       5      n[        R                  5       (       a<   [        USS5      [        U5      :w  a  [        U5        [        R                  5         U$ U$ ! [        R                  5         f = f)aW  Prepare a callable for future use as a collection class factory.

Given a collection class factory (either a type or no-arg callable),
return another factory that will produce compatible instances when
called.

This function is responsible for converting collection_class=list
into the run-time behavior of collection_class=InstrumentedList.

r`   N)
__canned_instrumentationr   _CollectionFactoryTypetype__instrumentation_mutexacquirer  id_instrument_classrelease)factoryimpl_factoryclss      r=   prepare_instrumentationr(  6  s    " **/82G<
 |~
C && 04<>" &&((	.s.5C@!#&#++-< $++-s   2%B/ /Cc                    U R                   S:X  a  [        R                  " S5      e[        U 5      u  p[	        XU5        [        XU5        [        XU5        g)z6Modify methods in a class and install instrumentation.__builtin__zGCan not instrument a built-in type. Use a subclass, even a trivial one.N)rC   r   ArgumentError_locate_roles_and_methods_setup_canned_roles_assert_required_roles_set_collection_attributesr'  rolesmethodss      r=   r#  r#  f  sT     ~~&"",
 	

 /s3NEG,3w/s73r@   c                   0 n0 nU R                    H  n[        U5      R                  5        H  u  pE[        U5      (       d  M  [	        US5      (       a%  UR
                  nUS;   d   eUR                  Xd5        SnSn[	        US5      (       a  UR                  u  pU	S;   d   eX4n[	        US5      (       a  UR                  n	U	S;   d   eU	nU(       a	  Xx4-   X$'   M  U(       d  M  SSU4X$'   M     M     X4$ )z_search for _sa_instrument_role-decorated methods in
method resolution order, assign to roles.

rU   )rS   rZ   r]   rd   Nrj   )rh   ru   rv   )	__mro__varsr   callablehasattrrU   
setdefaultrj   rv   )r'  r1  r2  superclsnamemethodrolebeforeafteroparguments              r=   r,  r,  {  s    EMOGKK N002LDF## v45511        , 15F#'Ev677%;;GGGGv56600GGGG & 1 $dE 1? 3  B >r@   c                n   [         R                  " U 5      nU[        ;   a  Uc   e[        U   u  pEUR                  5        H  u  pgUR	                  Xg5        M     UR                  5        HF  u  p[        XS5      n
U
(       d  M  X;  d  M!  [        U
S5      (       a  M4  [        XU	" U
5      5        MH     gg)zsee if this class has "canned" roles based on a known
collection type (dict, set, list).  Apply those roles
as needed to the "roles" dictionary, and also
prepare "decorator" methods

Nr`   )r   duck_type_collection__interfacesr   r8  r  r7  setattr)r'  r1  r2  collection_typecanned_roles
decoratorsr<  r:  r;  rm   rW   s              r=   r-  r-    s     //4O,&***#/#@ &,,.JDT( / ",!1!1!3Fd+B)$677Yr]3 "4 'r@   c                    SU;  d  [        XS   5      (       d#  [        R                  " SU R                  -  5      eUS   U;  a$  [        [	        XS   5      S5      (       d  SX!S   '   SU;  d  [        XS   5      (       d#  [        R                  " SU R                  -  5      eUS   U;  a$  [        [	        XS   5      S5      (       d  SX!S   '   SU;  d  [        XS   5      (       d#  [        R                  " S	U R                  -  5      eg
)zLensure all roles are present, and apply implicit instrumentation if
needed

rS   z>Type %s must elect an appender method to be a collection classr`   )rh   r   NrZ   z<Type %s must elect a remover method to be a collection class)ru   r   Nr]   z>Type %s must elect an iterator method to be a collection classN)r7  r   r+  rB   r  r0  s      r=   r.  r.    s1   
 gc3D&E&E""!#&<<0
 	
 
z	'	)':&');3 3 &Dj!"WS	2B%C%C""!#&<<0
 	
 
y		(9%&(:2 2 %Ci !gc3D&E&E""!#&<<0
 	
 'Fr@   c                B   UR                  5        H*  u  nu  pEn[        U U[        [        X5      XEU5      5        M,     UR                  5        H  u  ps[        U SU-  [        X5      5        M      SU l        [        U S5      (       d  SU l        [        U 5      U l        g)zcapply ad-hoc instrumentation from decorators, class-level defaults
and implicit role declarations

z_sa_%sNrN   )	r   rD  _instrument_membership_mutatorr  rJ   r7  rN   r"  r`   )r'  r1  r2  method_namer=  r@  r>  r<  s           r=   r/  r/    s    
 3:--/..f*)6U	
 3B #[[]X_gc&?@ + CO3(( c7Cr@   c                  ^ ^^^^^ T(       a  [        [        R                  " [        T 5      S   5      5      n[	        T[
        5      (       a&  Tm[        U5      T:  =(       a    UT   =(       d    SmOTU;   a  UR                  T5      mOSmTmAUUUU UU4S jnSUl        [        T S5      (       a  T R                  Ul
        T R                  Ul        T R                  Ul        U$ )zERoute method args and/or return value through the collection
adapter.r   Nc                   > T(       ab  Tc%  T
U;  a  [         R                  " ST-  5      eUT
   nO:[        U 5      T:  a  U T   nO%T
U;   a  UT
   nO[         R                  " ST-  5      eUR                  SS 5      nUSL a  S nOU S   R                  nT(       a  U(       a  [        UT5      " WU5        T(       a  U(       d  T	" U 0 UD6$ T	" U 0 UD6nUb  [        UT5      " XS5        U$ )NzMissing argument %sr   Fr   )r   r+  r   r   rJ   r  )argskwvaluer   executorresr>  r@  r=  r;  	named_argpos_args         r=   wrapper/_instrument_membership_mutator.<locals>.wrapper  s    B& ..-8  9t9w& ME"_yME ..-8  FF?D1	HAw**HhHf%eY7H4&2&&$%"%C%(8Jr@   TrU   )r   r   flatten_iteratorr   r  intr   indexr`   r7  rU   rB   r   )r;  r=  r@  r>  fn_argsrU  rS  rT  s   ````  @@r=   rJ  rJ    s     !!"8"@"CD
 h$$GGx/EGH4EMI7"!--1 I! !F  $Gv,--&,&@&@#GnnGONr@   c                X    USLa%  U R                   nU(       a  UR                  XSS9  ggg)z=Run set wo mutation events.

The collection is not mutated.

FNr   )rJ   r   )r'   r   r   rQ  s       r=   __set_wo_mutationr]  7  s<     E!))22 3   "r@   c                V    USLa#  U R                   nU(       a  UR                  XUS9nU$ )zVRun set events.

This event always occurs before the collection is actually mutated.

Fr\  )rJ   rh   r'   r   r   r   rQ  s        r=   __setr`  E  s4     E!))--ds-KDKr@   c                X    USLa%  U R                   nU(       a  UR                  XUS9  ggg)zRun del events.

This event occurs before the collection is actually mutated, *except*
in the case of a pop operation, in which case it occurs afterwards.
For pop operations, the __before_pop hook is called before the
operation occurs.

Fr\  N)rJ   ru   r_  s        r=   __delrb  S  s7     E!))&&t&D  "r@   c                N    U R                   nU(       a  UR                  U5        gg)z;An event which occurs on a before a pop() operation occurs.N)rJ   r   )r'   r   rQ  s      r=   __before_poprd  b  s#    %%H&&}5 r@   c                    ^
 S m
U
4S jn U
4S jnU
4S jnU
4S jnU
4S jnU
4S jnU
4S jnU
4S	 jnU
4S
 jn[        5       R                  5       n	U	R                  S5        U	$ )z:Tailored instrumentation wrappers for any list-like class.c                d    SU l         [        [        U R                  5      R                  U l        g r   )r`   r  r   rB   r   rV   s    r=   _tidy_list_decorators.<locals>._tidyl  "    "T2;;/77
r@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                8   > [        XU[        5      nT" X5        g r:   )r`  r   )r<   r   r   rW   s      r=   append0_list_decorators.<locals>.append.<locals>.appendq  s    ]F;DtNr@   r:   r;   )rW   rl  rg  s   ` r=   rl   _list_decorators.<locals>.appendp  s    	 	fr@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                8   > [        XU[        5        T" X5        g r:   rb  r   r<   rP  r   rW   s      r=   remove0_list_decorators.<locals>.remove.<locals>.removey  s    $}f5tOr@   r:   r;   rW   rs  rg  s   ` r=   rs   _list_decorators.<locals>.removex  s    	
 	fr@   c                &   >^  U 4S jnT" U5        U$ )Nc                2   > [        XS U5      nT" XU5        g r:   )r`  )r<   rY  rP  rW   s      r=   insert0_list_decorators.<locals>.insert.<locals>.insert  s    $tU3EtE"r@   r;   )rW   ry  rg  s   ` r=   ry   _list_decorators.<locals>.insert  s    	# 	fr@   c                &   >^  U 4S jnT" U5        U$ )Nc                  > [        U[        5      (       d+  X   nUb  [        XS U5        [        XS U5      nT
" XU5        g UR                  =(       d    SnUR
                  =(       d    SnUS:  a  U[        U 5      -  nUR                  b  UR                  nO[        U 5      nUS:  a  U[        U 5      -  nUS:X  aT  X L a  g [        XVU5       H  n[        U 5      U:  d  M  X	 M     [        U5       H  u  pxU R                  Xu-   U5        M     g [        [        XVU5      5      n	[        U5      [        U	5      :w  a%  [        S[        U5      < S[        U	5      < 35      e[        X5       H  u  pxU R                  Xx5        M     g )Nr   r   z#attempt to assign sequence of size z to extended slice of size )r  slicerb  r`  stepstartr   stoprange	enumeratery  r   
ValueErrorzip__setitem__)r<   rY  rP  existingr  r  r  ir   rngrW   s             r=   r  :_list_decorators.<locals>.__setitem__.<locals>.__setitem__  s\   eU++;'$$6d474& zzQ(q19SY&E::) ::Dt9D!8CI%D19}"55t9u, $ 6 $-U#3AIt4 $4 uU$78C5zSX-(  #5z3s85 
 $'s?((1 $3r@   r;   rW   r  rg  s   ` r=   r  %_list_decorators.<locals>.__setitem__  s    &	2P 	kr@   c                &   >^  U 4S jnT" U5        U$ )Nc                   > [        U[        5      (       d  X   n[        XS U5        T" X5        g X    H  n[        XS U5        M     T" X5        g r:   )r  r~  rb  r<   rY  r   rW   s      r=   __delitem__:_list_decorators.<locals>.__delitem__.<locals>.__delitem__  sK    eU++{d$.4
 !KD$dE2 (4r@   r;   rW   r  rg  s   ` r=   r  %_list_decorators.<locals>.__delitem__  s    	  	kr@   c                   > S nT" U5        U$ )Nc                J    [        U5       H  nU R                  U5        M     g r:   r   rl  r<   iterablerP  s      r=   extend0_list_decorators.<locals>.extend.<locals>.extend  s    hE" (r@   r;   )rW   r  rg  s     r=   r   _list_decorators.<locals>.extend  s    	# 	fr@   c                   > S nT" U5        U$ )Nc                L    [        U5       H  nU R                  U5        M     U $ r:   r  r  s      r=   __iadd__4_list_decorators.<locals>.__iadd__.<locals>.__iadd__  s#     hE" (Kr@   r;   )rW   r  rg  s     r=   r  "_list_decorators.<locals>.__iadd__      	 	hr@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                H   > [        U 5        T" X5      n[        XS U5        U$ r:   rd  rb  r  s      r=   r   *_list_decorators.<locals>.pop.<locals>.pop  s%    d?D$dE*Kr@   r;   rW   r   rg  s   ` r=   r   _list_decorators.<locals>.pop  s    	 	c

r@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                B   > U  H  n[        XS U5        M     T" U 5        g r:   rb  r  s      r=   clear._list_decorators.<locals>.clear.<locals>.clear  s     d$. tHr@   r  r;   rW   r  rg  s   ` r=   r  _list_decorators.<locals>.clear  s    	
 	er@   rg  localscopyr   )rl  rs  ry  r  r  r  r  r   r  lrg  s             @r=   _list_decoratorsr  i  sU    8*X"	 	AEE'NHr@   c                    ^ S mU4S jn U4S jnU4S jnU4S jnU4S jnU4S jnU4S jn[        5       R                  5       nUR                  S	5        U$ )
zBTailored instrumentation wrappers for any dict-like mapping class.c                d    SU l         [        [        U R                  5      R                  U l        g r   )r`   r  r   rB   r   rV   s    r=   rg  _dict_decorators.<locals>._tidy  ri  r@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                X   > X;   a  [        X U   X15        [        XX15      nT" XU5        g r:   )rb  r`  )r<   r   rP  r   rW   s       r=   r  :_dict_decorators.<locals>.__setitem__.<locals>.__setitem__  s,    {dI}:$}:Et% r@   r:   r;   r  s   ` r=   r  %_dict_decorators.<locals>.__setitem__  s    	! 	kr@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                >   > X;   a  [        X U   X!5        T" X5        g r:   r  )r<   r   r   rW   s      r=   r  :_dict_decorators.<locals>.__delitem__.<locals>.__delitem__  s    {dI}:tMr@   r:   r;   r  s   ` r=   r  %_dict_decorators.<locals>.__delitem__  s    	
 	kr@   c                &   >^  U 4S jnT" U5        U$ )Nc                H   > U  H  n[        X U   S U5        M     T" U 5        g r:   r  )r<   r   rW   s     r=   r  ._dict_decorators.<locals>.clear.<locals>.clear  s$    dItS1 tHr@   r;   r  s   ` r=   r  _dict_decorators.<locals>.clear  s    	
 	er@   c                4   >^  [         4U 4S jjnT" U5        U$ )Nc                   > [        U 5        X;   nU[        L a	  T" X5      nO	T" XU5      nU(       a  [        XS U5        U$ r:   )rd  r   rb  )r<   r   default_to_delr   rW   s        r=   r   *_dict_decorators.<locals>.pop.<locals>.pop  sC    kG& $}$W-d$,Kr@   r   r  s   ` r=   r   _dict_decorators.<locals>.pop  s    #) 		 	c

r@   c                &   >^  U 4S jnT" U5        U$ )Nc                N   > [        U 5        T" U 5      n[        XS   S S5        U$ )Nr   r  r<   r   rW   s     r=   popitem2_dict_decorators.<locals>.popitem.<locals>.popitem)  s)    d8D$Qq)Kr@   r;   )rW   r  rg  s   ` r=   r  !_dict_decorators.<locals>.popitem(  s    	 	gr@   c                "   > SS jnT" U5        U$ )Nc                x    X;  a  U R                  X5        U$ U R                  U5      nX2L a  [        XS 5        U$ r:   )r  __getitem__r]  )r<   r   r  rP  s       r=   r8  8_dict_decorators.<locals>.setdefault.<locals>.setdefault3  s?      .((-#%d48r@   r:   r;   )rW   r8  rg  s     r=   r8  $_dict_decorators.<locals>.setdefault2  s    		 	jr@   c                ,   > [         4S jnT" U5        U$ )Nc                V   U[         Lar  [        US5      (       a8  [        U5       H(  nX0;  d	  X   X   La  X   X'   M  [        XU   S 5        M*     O)U H#  u  p4X0;  d  X   ULa  X@U'   M  [        XS 5        M%     U H(  nX0;  d	  X   X#   La  X#   X'   M  [        XU   S 5        M*     g )Nkeys)r   r7  r   r]  )r<   __otherrO  r   rP  s        r=   update0_dict_decorators.<locals>.update.<locals>.updateB  s    f$7F++#G}?diw|.K(/DI-dCL$G	  - '.
?diu.D(-I-d4@	 '.
 ?dirw&> "DI%dsGT:	 r@   r   rW   r  rg  s     r=   r   _dict_decorators.<locals>.updateA  s    !' 	;( 	fr@   rg  r  )	r  r  r  r   r  r8  r  r  rg  s	           @r=   _dict_decoratorsr    sJ    80 	AEE'NHr@   c                >    [        U[        U R                  4-   5      $ )zGAllow only set, frozenset and self.__class__-derived
objects in binops.)r  _set_binop_bases	__class__r<   objs     r=   _set_binops_check_strictr  a  s     c+t~~.??@@r@   c                    [        U[        U R                  4-   5      =(       d    [        R                  " U5      [
        :H  $ )z5Allow anything set-like to participate in set binops.)r  r  r  r   rB  setr  s     r=   _set_binops_check_looser  g  s8     	3(DNN+<<= 	1$$S)S0r@   c                    ^ S mU4S jn U4S jnU4S jnU4S jnU4S jnU4S jnU4S jnU4S	 jnU4S
 jnU4S jn	U4S jn
U4S jnU4S jn[        5       R                  5       nUR                  S5        U$ )z9Tailored instrumentation wrappers for any set-like class.c                d    SU l         [        [        U R                  5      R                  U l        g r   )r`   r  r  rB   r   rV   s    r=   rg  _set_decorators.<locals>._tidyr  s"    "S"++.66
r@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                \   > X;  a  [        XU[        5      nO[        XU5        T" X5        g r:   )r`  r   r]  rr  s      r=   add)_set_decorators.<locals>.add.<locals>.addw  s(     d=&A!$}=tOr@   r:   r;   )rW   r  rg  s   ` r=   r  _set_decorators.<locals>.addv  s    	 	c

r@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                B   > X;   a  [        XU[        5        T" X5        g r:   rq  rr  s      r=   discard1_set_decorators.<locals>.discard.<locals>.discard      }d=&9tOr@   r:   r;   )rW   r  rg  s   ` r=   r   _set_decorators.<locals>.discard  s    	 	gr@   c                *   >^  SU 4S jjnT" U5        U$ )Nc                B   > X;   a  [        XU[        5        T" X5        g r:   rq  rr  s      r=   rs  /_set_decorators.<locals>.remove.<locals>.remove  r  r@   r:   r;   ru  s   ` r=   rs  _set_decorators.<locals>.remove  s    	 	fr@   c                &   >^  U 4S jnT" U5        U$ )Nc                P   > [        U 5        T" U 5      n[        XS [        5        U$ r:   )rd  rb  r   r  s     r=   r   )_set_decorators.<locals>.pop.<locals>.pop  s'    d8D $dF+Kr@   r;   r  s   ` r=   r   _set_decorators.<locals>.pop  s    	 	c

r@   c                   > S nT" U5        U$ )Nc                J    [        U 5       H  nU R                  U5        M     g r:   )r   rs  r   s     r=   r  -_set_decorators.<locals>.clear.<locals>.clear  s    T
D! #r@   r;   r  s     r=   r  _set_decorators.<locals>.clear  s    	" 	er@   c                   > S nT" U5        U$ )Nc                8    U H  nU R                  U5        M     g r:   )r  r<   rP  r   s      r=   r  /_set_decorators.<locals>.update.<locals>.update  s     r@   r;   r  s     r=   r  _set_decorators.<locals>.update  s    	 	fr@   c                   > S nT" U5        U$ )Nc                f    [        X5      (       d  [        $ U H  nU R                  U5        M     U $ r:   )r  NotImplementedr  r  s      r=   __ior__1_set_decorators.<locals>.__ior__.<locals>.__ior__  s-    +D88%% Kr@   r;   )rW   r
  rg  s     r=   r
   _set_decorators.<locals>.__ior__  s    	 	gr@   c                   > S nT" U5        U$ )Nc                8    U H  nU R                  U5        M     g r:   )r  r  s      r=   difference_updateE_set_decorators.<locals>.difference_update.<locals>.difference_update  s    T" r@   r;   )rW   r  rg  s     r=   r  *_set_decorators.<locals>.difference_update  s    	# 	   r@   c                   > S nT" U5        U$ )Nc                f    [        X5      (       d  [        $ U H  nU R                  U5        M     U $ r:   )r  r	  r  r  s      r=   __isub__3_set_decorators.<locals>.__isub__.<locals>.__isub__  s.    +D88%%T" Kr@   r;   )rW   r  rg  s     r=   r  !_set_decorators.<locals>.__isub__  r  r@   c                   > S nT" U5        U$ )Nc                    U R                  U5      [        U 5      p2X2-
  X#-
  pTU H  nU R                  U5        M     U H  nU R                  U5        M     g r:   )r  r  rs  r  r<   otherwanthavers  r  r   s          r=   intersection_updateI_set_decorators.<locals>.intersection_update.<locals>.intersection_update  sN    **513t9$+t{CD!  r@   r;   )rW   r  rg  s     r=   r  ,_set_decorators.<locals>.intersection_update  s    	 	!"""r@   c                   > S nT" U5        U$ )Nc                    [        X5      (       d  [        $ U R                  U5      [        U 5      p2X2-
  X#-
  pTU H  nU R	                  U5        M     U H  nU R                  U5        M     U $ r:   )r  r	  r  r  rs  r  r  s          r=   __iand__3_set_decorators.<locals>.__iand__.<locals>.__iand__  sd    +D88%%**513t9$+t{CD!  Kr@   r;   )rW   r"  rg  s     r=   r"  !_set_decorators.<locals>.__iand__      
	 	hr@   c                   > S nT" U5        U$ )Nc                    U R                  U5      [        U 5      p2X2-
  X#-
  pTU H  nU R                  U5        M     U H  nU R                  U5        M     g r:   )symmetric_differencer  rs  r  r  s          r=   symmetric_difference_updateY_set_decorators.<locals>.symmetric_difference_update.<locals>.symmetric_difference_update  sN    22593t9$+t{CD!  r@   r;   )rW   r)  rg  s     r=   r)  4_set_decorators.<locals>.symmetric_difference_update  s    	 	)***r@   c                   > S nT" U5        U$ )Nc                    [        X5      (       d  [        $ U R                  U5      [        U 5      p2X2-
  X#-
  pTU H  nU R	                  U5        M     U H  nU R                  U5        M     U $ r:   )r  r	  r(  r  rs  r  r  s          r=   __ixor__3_set_decorators.<locals>.__ixor__.<locals>.__ixor__  sd    +D88%%22593t9$+t{CD!  Kr@   r;   )rW   r.  rg  s     r=   r.  !_set_decorators.<locals>.__ixor__  r%  r@   rg  r  )r  r  rs  r   r  r  r
  r  r  r  r"  r)  r.  r  rg  s                 @r=   _set_decoratorsr1  o  sh    7
		
	!	# +  	AEE'NHr@   c                      \ rS rSrSrSrg)InstrumentedListi  z-An instrumented version of the built-in list.r;   NrB   rC   rD   rE   r   rF   r;   r@   r=   r3  r3        7r@   r3  c                      \ rS rSrSrSrg)InstrumentedSeti  z,An instrumented version of the built-in set.r;   Nr4  r;   r@   r=   r7  r7    s    6r@   r7  c                      \ rS rSrSrSrg)InstrumentedDicti  z-An instrumented version of the built-in dict.r;   Nr4  r;   r@   r=   r9  r9    r5  r@   r9  z/util.immutabledict[Any, _CollectionFactoryType]r  rl  rs  r   )rS   rZ   r]   r  r]   r  zMutil.immutabledict[Any, Tuple[Dict[str, str], Dict[str, Callable[..., Any]]]]rC  c                    SSK Jq  SSK Jq  SSK Jq  SSK Jq  SSK J q   SSK Jq  SSK Jq  SS	K Jq  [        [        5        [        [        5        [        [        5        g )
Nr   r"   r    r   r$   )r)   )r*   )r+   )r,   )r)   r#   r!   r   r%   r*   r+   r,   r#  r3  r7  )lclss    r=   __gor<  A  s7     347.4;>3 &'o&k"r@   )r'   r3   rA   rI   r:   )r%  z4Union[Type[Collection[Any]], _CollectionFactoryType]rA   r  )rA   zDict[str, Callable[[_FN], _FN]])r<   r   r  r   rA   r   )Zr   
__future__r   operator	threadingtypingr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   baser    r   r   r   sql.baser   util.compatr   util.typingr   
attributesr   r   r)   r   r!   r#   r%   stater&   __all__Lockr   r  r.   r0   r1   r2   r4   r7   r-   r'   r(   
attrgetterrI   r  r(  r#  r,  r-  r.  r/  rJ  r]  r`  rb  rd  r  r  r  	frozensetr  r  r  r1  r3  r7  r9  immutabledictr   r   r  rO   rC  r<  r  r;   r@   r=   <module>rM     s  bF #                         0 "	/3742.$ $..*  ""&B"BC Te3e3v./e/068 60 0J JZ F ",,];z+ z+z	'PT-A--`4**Z42
@#0;|E6JZeP # A_D8tBx 87c"g 78tCH~ 8
 	""	
 I   	$#&
 
 	8L

 	
H%'7'9:   4#4 VXr@   