Edit File: weakref.cpython-311.pyc
� �����f T�����������������������<����d�Z�ddlmZmZmZmZmZmZmZm Z �ddl mZmZ�ddl Z ddlZddlZeefZg�d�Ze j�����������������������������e��������������G�d��de������������Z�G�d��d e j��������������������Z�G�d ��de������������Z�G�d��d e j��������������������Z�G�d��d������������ZdS�)ztWeak reference support for Python. This module is an implementation of PEP 205: https://peps.python.org/pep-0205/ �����)�getweakrefcount�getweakrefs�ref�proxy�CallableProxyType� ProxyType� ReferenceType�_remove_dead_weakref)�WeakSet�_IterationGuardN) r���r���r���r����WeakKeyDictionaryr ���r���r���� ProxyTypes�WeakValueDictionaryr���� WeakMethod�finalizec��������������������H�������e�Zd�ZdZdZdd�Z��fd�Zd��Zd��Ze j ��������Z ��xZS�) r���z� A custom `weakref.ref` subclass which simulates a weak reference to a bound method, working around the lifetime problem of bound methods. )� _func_ref� _meth_type�_alive�__weakref__Nc������������������\������ �|j���������}|j��������}n>#�t����������$�r1�t����������d���������������������t����������|������������������������������������d��w�xY�w��fd�}t ����������j��������|�||������������}t ����������||������������|_��������t����������|������������|_ ��������d|_ ��������t ����������|�������������|S�)Nz)argument should be a bound method, not {}c������������������Z����������������������}|j���������rd|_�������������|�������������d�S�d�S�d�S��NF)r���)�arg�self�callback�self_wrs��� ���./opt/alt/python311/lib64/python3.11/weakref.py�_cbzWeakMethod.__new__.<locals>._cb5���sH���������7�9�9�D��{�� #�#����'��H�T�N�N�N�N�N� #�� #�'�'�����T)�__self__�__func__�AttributeError� TypeError�format�typer����__new__r���r���r���)�cls�methr����obj�funcr���r���r���s��� ` @r���r'���zWeakMethod.__new__.���s��������� ;��-�C��=�D�D���� ;�� ;�� ;��G�#�V�D��J�J�/�/�1��1�6:� ;� ;���� #�� #�� #�� #�� #�� #���{�3��S�)�)���T�3������t�*�*�������d�)�)���s ������;Ac������������������������t�����������������������������������������������������������}|������������������������������������}|�|�d�S�|����������������������||������������S��N)�super�__call__r���r���)r���r*���r+���� __class__s��� �r���r/���zWeakMethod.__call__D���sI��������g�g��� � ���~�~�����;�$�,��4����t�S�)�)�)r ���c�����������������������t����������|t����������������������r7|�j��������r|j��������s|�|u�S�t����������j��������|�|������������o|�j��������|j��������k����S�t����������S�r-���)� isinstancer���r���r����__eq__r����NotImplemented�r����others��� r���r3���zWeakMethod.__eq__K���sX�������e�Z�(�(�� Q��;�� %�e�l�� %��u�}�$��:�d�E�*�*�P�t�~���/P�P��r ���c�����������������������t����������|t����������������������r7|�j��������r|j��������s|�|uS�t����������j��������|�|������������p|�j��������|j��������k����S�t����������S�r-���)r2���r���r���r����__ne__r���r4���r5���s��� r���r8���zWeakMethod.__ne__R���sY�������e�Z�(�(�� P��;�� )�e�l�� )��5�(�(��:�d�E�*�*�O�d�n���.O�O��r ���r-���)�__name__� __module__�__qualname__�__doc__� __slots__r'���r/���r3���r8���r����__hash__� __classcell__�r0���s���@r���r���r���&���sy������������������ �C�I��������,*��*��*��*��*�������������|�H�H�H�H�Hr ���r���c�������������������������e�Zd�ZdZdd�Zefd�Zd��Zd��Zd��Z d��Z d ��Zd ��Zd��Z e Zd��Zdd�Zd��Zd��ZeZd��Zd��Zd��Zd��Zdd�Zdd�Zd��Zd��Zd��Zd��Zd S�)r���z�Mapping class that references values weakly. Entries in the dictionary will be discarded when no strong reference to the value exists anymore ��c����������������������t����������|�������������t����������fd�}||�_��������g�|�_��������t ������������������������|�_��������i�|�_���������|�j��������|fi�|���d�S�)Nc������������������������|��������������}|�@|j���������r!|j�����������������������������|�j���������������������d�S��||j��������|�j���������������������d�S�d�S�r-���)� _iterating�_pending_removals�append�key�data)�wr�selfref�_atomic_removalr���s��� r����removez,WeakValueDictionary.__init__.<locals>.removei���sb�������7�9�9�D����?��7��*�1�1�"�&�9�9�9�9�9��$�O�D�I�r�v�6�6�6�6�6� � �r ���)r���r ����_removerF����setrE���rI����update)r���r6����kwrM���s��� r����__init__zWeakValueDictionary.__init__h���se������"�4�y�y�:N�� 7�� 7�� 7�� 7�����!#����%�%����� ����E� � �R� � � � � r ���c������������������~�����|�j���������j��������}|�j��������} � ��|��������������}n#�t����������$�r�Y�d�S�w�xY�w�|||��������������*r-���)rF����poprI���� IndexError)r���rL���rT����drH���s��� r����_commit_removalsz$WeakValueDictionary._commit_removalsy���sd�������$�(���I�� $� ��c�e�e������ �� �� ���� �����O�A�s�#�#�#� $s���� !�� /�/c�����������������������|�j���������r|��������������������������������������|�j��������|�����������������������}|�t����������|�������������|S�r-����rF���rW���rI����KeyError�r���rH����os��� r����__getitem__zWeakValueDictionary.__getitem__����sH�������!�� $��!�!�#�#�#��D�I�c�N�����9��3�-�-���Hr ���c������������������L�����|�j���������r|�������������������������������������|�j��������|=�d�S�r-���)rF���rW���rI����r���rH���s��� r����__delitem__zWeakValueDictionary.__delitem__����s,�������!�� $��!�!�#�#�#��I�c�N�N�Nr ���c������������������`�����|�j���������r|�������������������������������������t����������|�j��������������������S�r-���)rF���rW����lenrI����r���s��� r����__len__zWeakValueDictionary.__len__����s-�������!�� $��!�!�#�#�#��4�9�~�~�r ���c�����������������������|�j���������r|������������������������������������� ��|�j��������|�����������������������}n#�t����������$�r�Y�dS�w�xY�w|d�uS�r���rY���r[���s��� r����__contains__z WeakValueDictionary.__contains__����se�������!�� $��!�!�#�#�#� ��� �#�� � �A�A���� �� �� ��5�5� ������}�s����3�� A��Ac������������������>�����d|�j���������j��������t����������|�������������fz��S��Nz<%s at %#x>�r0���r9����idrc���s��� r����__repr__zWeakValueDictionary.__repr__�������������� 7��D���B�B�Br ���c������������������x�����|�j���������r|�������������������������������������t����������||�j��������|������������|�j��������|<���d�S�r-���)rF���rW����KeyedRefrN���rI����r���rH����values��� r����__setitem__zWeakValueDictionary.__setitem__����s<�������!�� $��!�!�#�#�#�!�%���s�;�;�� �#���r ���c����������������������|�j���������r|�������������������������������������t������������������������}t����������|�������������5��|�j�������������������������������������������D�]\��}}�|��������������}|�|||<���� �d�d�d��������������n#�1�swxY�w�Y���|S�r-���)rF���rW���r���r���rI����items)r����newrH���rJ���r\���s��� r����copyzWeakValueDictionary.copy����s��������!�� $��!�!�#�#�#�!�#�#�� �T� "� "�� !�� !��9�?�?�,�,�� !�� !���R��B�D�D���=� �C��H�� !� !�� !�� !�� !�� !�� !�� !�� !�� !�� !�� !����� !�� !�� !�� !� �� s����1A7�7A;�>A;c������������������4����ddl�m}�|�j��������r|�������������������������������������|������������������������������������}t����������|�������������5��|�j�������������������������������������������D�] \��}}�|��������������}|�||�|||������������<����! �d�d�d��������������n#�1�swxY�w�Y���|S��Nr���)�deepcopy)ru���rx���rF���rW���r0���r���rI���rs���)r����memorx���rt���rH���rJ���r\���s��� r����__deepcopy__z WeakValueDictionary.__deepcopy__����s�������!�!�!�!�!�!��!�� $��!�!�#�#�#��n�n���� �T� "� "�� 1�� 1��9�?�?�,�,�� 1�� 1���R��B�D�D���=�/0�C����d�+�+�,�� 1� 1�� 1�� 1�� 1�� 1�� 1�� 1�� 1�� 1�� 1�� 1����� 1�� 1�� 1�� 1� �� s����;B � B�BNc�����������������������|�j���������r|������������������������������������� �|�j��������|���������}�|��������������}|�|S�|S�#�t����������$�r�|cY�S�w�xY�wr-���rY���)r���rH����defaultrJ���r\���s��� r����getzWeakValueDictionary.get����sq�������!�� $��!�!�#�#�#� ���3��B������A��y��������� �� �� ��N�N�N� ���s���� :��A �A c��������������#��������K����|�j���������r|�������������������������������������t����������|�������������5��|�j�������������������������������������������D�]\��}}�|��������������}|�||fV���� �d�d�d��������������d�S�#�1�swxY�w�Y���d�S�r-����rF���rW���r���rI���rs���)r����krJ����vs��� r���rs���zWeakValueDictionary.items����s������������!�� $��!�!�#�#�#� �T� "� "�� �� �����*�*�� �� ���2��B�D�D���=��Q�$�J�J�J�� � �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����2A-�-A1�4A1c��������������#��������K����|�j���������r|�������������������������������������t����������|�������������5��|�j�������������������������������������������D�]\��}}�|���������������|V���� �d�d�d��������������d�S�#�1�swxY�w�Y���d�S�r-���r���)r���r����rJ���s��� r����keyszWeakValueDictionary.keys����s������������!�� $��!�!�#�#�#� �T� "� "�� �� �����*�*�� �� ���2��2�4�4�#��G�G�G�� � �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����.A)�)A-�0A-c��������������#��������K����|�j���������r|�������������������������������������t����������|�������������5��|�j�������������������������������������������E�d{V����ddd�������������dS�#�1�swxY�w�Y���dS�)a���Return an iterator that yields the weak references to the values. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating references that will cause the garbage collector to keep the values around longer than needed. N�rF���rW���r���rI����valuesrc���s��� r���� itervaluerefsz!WeakValueDictionary.itervaluerefs����s�������������!�� $��!�!�#�#�#� �T� "� "�� *�� *��y�'�'�)�)�)�)�)�)�)�)�)� *�� *�� *�� *�� *�� *�� *�� *�� *�� *�� *�� *����� *�� *�� *�� *�� *�� *s���� A�A�!Ac��������������#��������K����|�j���������r|�������������������������������������t����������|�������������5��|�j�������������������������������������������D�]}�|��������������}|�|V���� �d�d�d��������������d�S�#�1�swxY�w�Y���d�S�r-���r�����r���rJ���r*���s��� r���r����zWeakValueDictionary.values����s������������!�� $��!�!�#�#�#� �T� "� "�� �� ��i�&�&�(�(�� �� ���b�d�d���?��I�I�I�� � �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����-A(�(A,�/A,c�����������������������|�j���������r|������������������������������������� �|�j�������������������������������������������\��}}�|��������������}|�||fS��-r-���)rF���rW���rI����popitem)r���rH���rJ���r\���s��� r���r����zWeakValueDictionary.popitem����sY�������!�� $��!�!�#�#�#� ��i�'�'�)�)�G�C������A��}��A�v� � r ���c������������������������|�j���������r|������������������������������������� ��|�j�����������������������������|��������������������������}n#�t����������$�r�d�}Y�nw�xY�w|�|r|d���������S�t ����������|�������������|S�)Nr���)rF���rW���rI���rT���rZ���)r���rH����argsr\���s��� r���rT���zWeakValueDictionary.pop��s��������!�� $��!�!�#�#�#� �"�� � � �c�"�"�$�$�A�A���� �� �� ��A�A�A� �����9��� $��A�w���s�m�m�#��Hs����"A����A�Ac������������������������ ��|�j���������|�����������������������}n#�t����������$�r�d�}Y�nw�xY�w|�;|�j��������r|�������������������������������������t ����������||�j��������|������������|�j���������|<���|S�|S�r-���)rI���rZ���rF���rW���rn���rN���)r���rH���r|���r\���s��� r���� setdefaultzWeakValueDictionary.setdefault��s������� ��� �#�� � �A�A���� �� �� ��A�A�A� �����9��%�� (��%�%�'�'�'�%�g�t�|�S�A�A�D�I�c�N��N��Hs������'�'c�����������������X����|�j���������r|�������������������������������������|�j��������}|�Rt����������|d������������st ����������|������������}|�����������������������������������D�]\��}}t ����������||�j��������|������������||<����|�����������������������������������D�]\��}}t ����������||�j��������|������������||<����d�S��Nrs���)rF���rW���rI����hasattr�dictrs���rn���rN���)r���r6����kwargsrV���rH���r\���s��� r���rP���zWeakValueDictionary.update!��s��������!�� $��!�!�#�#�#��I�����5�'�*�*�� $��U�����+�+�-�-�� 8�� 8���Q�!�!�T�\�3�7�7��#����l�l�n�n�� 4�� 4�F�C���a���s�3�3�A�c�F�F� 4�� 4r ���c�����������������������|�j���������r|�������������������������������������t����������|�j�������������������������������������������������������S�)a~��Return a list of weak references to the values. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating references that will cause the garbage collector to keep the values around longer than needed. )rF���rW����listrI���r����rc���s��� r���� valuerefszWeakValueDictionary.valuerefs-��s=��������!�� $��!�!�#�#�#��D�I�$�$�&�&�'�'�'r ���c������������������0�����|�����������������������|�������������|�S�r-����rP���r5���s��� r����__ior__zWeakValueDictionary.__ior__;������������E�����r ���c�����������������������t����������|t����������j��������������������r+|������������������������������������}|���������������������|�������������|S�t ����������S�r-����r2����_collections_abc�Mappingru���rP���r4����r���r6����cs��� r����__or__zWeakValueDictionary.__or__?���?�������e�-�5�6�6�� �� � ���A� �H�H�U�O�O�O��H��r ���c������������������������t����������|t����������j��������������������r@|������������������������������������}|���������������������|�������������|���������������������|��������������|S�t ����������S�r-����r2���r����r����r0���rP���r4���r����s��� r����__ror__zWeakValueDictionary.__ror__F���P�������e�-�5�6�6�� ���� � �A� �H�H�U�O�O�O� �H�H�T�N�N�N��H��r ���)rB���r-���)r9���r:���r;���r<���rR���r ���rW���r]���r`���rd���rf���rk���rq���ru����__copy__rz���r}���rs���r�����__iter__r����r����r����rT���r����rP���r����r����r����r����rB���r ���r���r���r���\���s�����������������!��!��!��!�"�0D�� $�� $�� $�� $����������� ����� �����C��C��C�<��<��<� �� �� ���H� �� �� � �� �� �� �������������H� *�� *�� *����������� �� �� �������� 4�� 4�� 4�� 4�(��(��(�������������������r ���r���c��������������������,�������e�Zd�ZdZdZd��Z��fd�Z��xZS�)rn���a[��Specialized reference that includes a key corresponding to the value. This is used in the WeakValueDictionary to avoid having to create a function object for each key stored in the mapping. A shared callback object can use the 'key' attribute of a KeyedRef instead of getting a reference to the key from an enclosing scope. �rH���c������������������@�����t����������j��������|�||������������}||_��������|S�r-���)r���r'���rH���)r&����obr���rH���r���s��� r���r'���zKeyedRef.__new__[��s!�������{�4��X�.�.������r ���c������������������L������t���������������������������������������������||�������������d�S�r-���)r.���rR���)r���r����r���rH���r0���s��� �r���rR���zKeyedRef.__init__`��s#������� ������X�&�&�&�&�&r ���)r9���r:���r;���r<���r=���r'���rR���r?���r@���s���@r���rn���rn���O��sX��������������������I������ '��'��'��'��'��'��'��'��'r ���rn���c�������������������������e�Zd�ZdZdd�Zd��Zd��Zd��Zd��Zd��Z d ��Z d ��Zd��ZeZ d��Zdd �Zd��Zd��Zd��ZeZd��Zd��Zd��Zd��Zdd�Zdd�Zd��Zd��Zd��ZdS�)r ���a��� Mapping class that references keys weakly. Entries in the dictionary will be discarded when there is no longer a strong reference to the key. This can be used to associate additional data with an object owned by other parts of an application without adding attributes to those objects. This can be especially useful with objects that override attribute accesses. Nc�����������������������i�|�_���������t����������|�������������fd�}||�_��������g�|�_��������t ������������������������|�_��������d|�_��������|�|����������������������|�������������d�S�d�S�)Nc������������������������|��������������}|�?|j���������r|j�����������������������������|��������������d�S� �|j��������|�=�d�S�#�t����������$�r�Y�d�S�w�xY�wd�S�r-���)rE���rF���rG���rI���rZ���)r����rK���r���s��� r���rM���z*WeakKeyDictionary.__init__.<locals>.removeq��sv�������7�9�9�D����?����*�1�1�!�4�4�4�4�4�� �I�a�L�L�L��#�������������� � �s����;�� A �A F)rI���r���rN���rF���rO���rE���� _dirty_lenrP���)r���r����rM���s��� r���rR���zWeakKeyDictionary.__init__o��so�������� �!�$�i�i�� �� �� �� �����!#����%�%���������K�K���������r ���c�����������������������|�j���������j��������}|�j��������} � ��|��������������}n#�t����������$�r�Y�d�S�w�xY�w �||=�n#�t����������$�r�Y�nw�xY�w�3r-���)rF���rT���rI���rU���rZ���)r���rT���rV���rH���s��� r���rW���z"WeakKeyDictionary._commit_removals���s������� ��$�(���I�� � ��c�e�e������ �� �� ���� ���� ��c�F�F���� �� �� ��� ���� s���� !�� /�/�7�� A�Ac������������������T������|�j�����������fd�|�j��������D���������������|�_��������d|�_��������d�S�)Nc������������������������g�|�]}|�v��|�� S�rB���rB���)�.0r����rV���s��� �r���� <listcomp>z5WeakKeyDictionary._scrub_removals.<locals>.<listcomp>���s�������!N�!N�!N��q�A�v�v�!�v�v�vr ���F)rI���rF���r����)r���rV���s��� @r����_scrub_removalsz!WeakKeyDictionary._scrub_removals���s4��������I��!N�!N�!N�!N�T�-C�!N�!N�!N�������r ���c������������������>�����d|�_���������|�j��������t����������|������������=�d�S��NT)r����rI���r���r_���s��� r���r`���zWeakKeyDictionary.__delitem__���s����������I�c�#�h�h���r ���c������������������6�����|�j���������t����������|���������������������S�r-���)rI���r���r_���s��� r���r]���zWeakKeyDictionary.__getitem__���s�������y��S���"�"r ���c�����������������������|�j���������r|�j��������r|�������������������������������������t����������|�j��������������������t����������|�j��������������������z ��S�r-���)r����rF���r����rb���rI���rc���s��� r���rd���zWeakKeyDictionary.__len__���sH�������?�� #�t�5�� #�� � � �"�"�"��4�9�~�~��D�$:� ;� ;�;�;r ���c������������������>�����d|�j���������j��������t����������|�������������fz��S�rh���ri���rc���s��� r���rk���zWeakKeyDictionary.__repr__���rl���r ���c������������������@�����||�j���������t����������||�j��������������������<���d�S�r-���)rI���r���rN���ro���s��� r���rq���zWeakKeyDictionary.__setitem__���s ������,1�� �#�c�4�<�(�(�)�)�)r ���c������������������������t������������������������}t����������|�������������5��|�j�������������������������������������������D�]\��}}�|��������������}|�|||<���� �d�d�d��������������n#�1�swxY�w�Y���|S�r-���)r ���r���rI���rs���)r���rt���rH���rp���r\���s��� r���ru���zWeakKeyDictionary.copy���s��������!�!�� �T� "� "�� #�� #�"�i�o�o�/�/�� #�� #� ��U��C�E�E���=�"�C��F�� #� #�� #�� #�� #�� #�� #�� #�� #�� #�� #�� #����� #�� #�� #�� #� �� s����1A�A �#A c�����������������������ddl�m}�|������������������������������������}t����������|�������������5��|�j�������������������������������������������D�] \��}}�|��������������}|��|||������������||<����! �d�d�d��������������n#�1�swxY�w�Y���|S�rw���)ru���rx���r0���r���rI���rs���)r���ry���rx���rt���rH���rp���r\���s��� r���rz���zWeakKeyDictionary.__deepcopy__���s�������!�!�!�!�!�!��n�n���� �T� "� "�� 3�� 3�"�i�o�o�/�/�� 3�� 3� ��U��C�E�E���=�%�X�e�T�2�2�C��F�� 3� 3�� 3�� 3�� 3�� 3�� 3�� 3�� 3�� 3�� 3�� 3����� 3�� 3�� 3�� 3� �� s����;A2�2A6�9A6c������������������R�����|�j������������������������������t����������|������������|������������S�r-���)rI���r}���r����r���rH���r|���s��� r���r}���zWeakKeyDictionary.get���s�������y�}�}�S��X�X�g�.�.�.r ���c������������������X����� �t����������|������������}n#�t����������$�r�Y�dS�w�xY�w||�j��������v�S�r���)r���r$���rI���)r���rH���rJ���s��� r���rf���zWeakKeyDictionary.__contains__���sB������ ��S���B�B���� �� �� ��5�5� �����T�Y��s������ � c��������������#�������K����t����������|�������������5��|�j�������������������������������������������D�]\��}}�|��������������}|�||fV���� �d�d�d��������������d�S�#�1�swxY�w�Y���d�S�r-����r���rI���rs���)r���rJ���rp���rH���s��� r���rs���zWeakKeyDictionary.items���s����������� �T� "� "�� %�� %�!�Y�_�_�.�.�� %�� %� ��E��b�d�d���?��u�*�$�$�$�� %� %�� %�� %�� %�� %�� %�� %�� %�� %�� %�� %�� %����� %�� %�� %�� %�� %�� %s����2A�A�Ac��������������#�������K����t����������|�������������5��|�j��������D�]}�|��������������}|�|V���� �d�d�d��������������d�S�#�1�swxY�w�Y���d�S�r-���)r���rI���r����s��� r���r����zWeakKeyDictionary.keys���s����������� �T� "� "�� �� ��i�� �� ���b�d�d���?��I�I�I�� � �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s ����;�?�?c��������������#�������K����t����������|�������������5��|�j�������������������������������������������D�]\��}}�|���������������|V���� �d�d�d��������������d�S�#�1�swxY�w�Y���d�S�r-���r����)r���rJ���rp���s��� r���r����zWeakKeyDictionary.values���s����������� �T� "� "�� �� �!�Y�_�_�.�.�� �� � ��E��2�4�4�#��K�K�K�� � �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����.A�A�Ac������������������*�����t����������|�j��������������������S�)az��Return a list of weak references to the keys. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating references that will cause the garbage collector to keep the keys around longer than needed. )r����rI���rc���s��� r����keyrefszWeakKeyDictionary.keyrefs���s��������D�I���r ���c������������������l�����d|�_��������� �|�j�������������������������������������������\��}}�|��������������}|�||fS��-r����)r����rI���r����)r���rH���rp���r\���s��� r���r����zWeakKeyDictionary.popitem���sC��������� ���*�*�,�,�J�C������A��}��%�x�� r ���c������������������P�����d|�_����������|�j��������j��������t����������|������������g|�R���S�r����)r����rI���rT���r���)r���rH���r����s��� r���rT���zWeakKeyDictionary.pop���s+����������t�y�}�S��X�X�-��-�-�-�-r ���c������������������^�����|�j������������������������������t����������||�j��������������������|������������S�r-���)rI���r����r���rN���r����s��� r���r����zWeakKeyDictionary.setdefault���s&�������y�#�#�C��T�\�$:�$:�7�C�C�Cr ���c���������������������|�j���������}|�Zt����������|d������������s�t����������i�������������|������������}|�����������������������������������D�]\��}}||t ����������||�j��������������������<����t ����������|������������r|����������������������|�������������d�S�d�S�r����)rI���r����r&���rs���r���rN���rb���rP���)r���r����r����rV���rH���rp���s��� r���rP���zWeakKeyDictionary.update���s��������I�����4��)�)�� &��t�B�x�x��~�~��"�j�j�l�l�� 2�� 2� ��U�,1��#�c�4�<�(�(�)�)��v�;�;�� ��K�K������� �� r ���c������������������0�����|�����������������������|�������������|�S�r-���r����r5���s��� r���r����zWeakKeyDictionary.__ior__��r����r ���c�����������������������t����������|t����������j��������������������r+|������������������������������������}|���������������������|�������������|S�t ����������S�r-���r����r����s��� r���r����zWeakKeyDictionary.__or__��r����r ���c������������������������t����������|t����������j��������������������r@|������������������������������������}|���������������������|�������������|���������������������|��������������|S�t ����������S�r-���r����r����s��� r���r����zWeakKeyDictionary.__ror__��r����r ���r-���)r9���r:���r;���r<���rR���rW���r����r`���r]���rd���rk���rq���ru���r����rz���r}���rf���rs���r����r����r����r����r����rT���r����rP���r����r����r����rB���r ���r���r ���r ���d��s������������������������(�����$ �� �� � �� �� �#��#��#�<��<��<�C��C��C�2��2��2��������H������/��/��/��/������%��%��%��������H� �� �� � �� �� � �� �� �.��.��.�D��D��D��D� �� �� �� �������������������r ���r ���c�������������������������e�Zd�ZdZdZi�ZdZ�ej����������������������Z dZ dZ�G�d��d������������Zd��Z dd�Zd ��Zd ��Zed����������������Zed����������������Zej��������d ����������������Zd��Zed����������������Zed����������������ZdS�)r���a��Class for finalization of weakrefable objects finalize(obj, func, *args, **kwargs) returns a callable finalizer object which will be called when obj is garbage collected. The first time the finalizer is called it evaluates func(*arg, **kwargs) and returns the result. After this the finalizer is dead, and calling it just returns None. When the program exits any remaining finalizers for which the atexit attribute is true will be run in reverse order of creation. By default atexit is true. rB���Fc�������������������������e�Zd�ZdZdS�)�finalize._Info)�weakrefr+���r����r�����atexit�indexN)r9���r:���r;���r=���rB���r ���r����_Infor����5��s��������������L� � � r ���r����c�����������������T����|�j���������s*dd�l}|���������������������|�j���������������������dt����������_���������|������������������������������������}t ����������||�������������|_��������||_��������||_ ��������|pd�|_ ��������d|_��������t����������|�j��������������������|_ ��������||�j��������|�<���dt����������_��������d�S�)Nr���T)�_registered_with_atexitr�����register� _exitfuncr���r����r���r����r+���r����r�����next�_index_iterr����� _registry�_dirty)r���r*���r+���r����r����r�����infos��� r���rR���zfinalize.__init__8��s��������+�� 4�� �M�M�M��O�O�D�N�+�+�+�/3�H�,��z�z�|�|���3��~�~����� ��� ��n��������$�*�+�+�� �#���t������r ���Nc�����������������������|�j������������������������������|�d������������}|r |�j��������s�|j��������|j��������i�|j��������pi���S�dS�dS�)zZIf alive then mark as dead and return func(*args, **kwargs); otherwise return NoneN)r����rT���� _shutdownr+���r����r����)r����_r����s��� r���r/���zfinalize.__call__I��sf��������~�!�!�$��-�-���� @���� @��4�9�d�i�?�D�K�,=�2�?�?�?� @�� @�� @�� @r ���c������������������������|�j������������������������������|�������������}|o|�����������������������������������}|�2|�j������������������������������|�d������������r||j��������|j��������|j��������pi�fS�dS�dS�)z^If alive then mark as dead and return (obj, func, args, kwargs); otherwise return NoneN)r����r}���r����rT���r+���r����r�����r���r����r*���s��� r����detachzfinalize.detachP��sk��������~�!�!�$�'�'���%�t�|�|�~�~���?�t�~�1�1�$��=�=�?����D�I�t�{�/@�b�A�A���?�?�?r ���c�����������������������|�j������������������������������|�������������}|o|�����������������������������������}|�||j��������|j��������|j��������pi�fS�dS�)zMIf alive then return (obj, func, args, kwargs); otherwise return NoneN)r����r}���r����r+���r����r����r����s��� r����peekz finalize.peekX��sQ��������~�!�!�$�'�'���%�t�|�|�~�~���?����D�I�t�{�/@�b�A�A���?r ���c�����������������������|�|�j���������v�S�)zWhether finalizer is alive)r����rc���s��� r����alivezfinalize.alive`��s��������t�~�%�%r ���c������������������b�����|�j������������������������������|�������������}t����������|������������o|j��������S�)z*Whether finalizer should be called at exit�r����r}����boolr����)r���r����s��� r���r����zfinalize.atexite��s,��������~�!�!�$�'�'���D�z�z�)�d�k�)r ���c������������������j�����|�j������������������������������|�������������}|rt����������|������������|_��������d�S�d�S�r-���r����)r���rp���r����s��� r���r����zfinalize.atexitk��s:�������~�!�!�$�'�'���� &��u�+�+�D�K�K�K� &�� &r ���c������������������@����|�j������������������������������|�������������}|o|�����������������������������������}|�&dt����������|�������������j��������t����������|�������������fz��S�dt����������|�������������j��������t����������|�������������t����������|������������j��������t����������|������������fz��S�)Nz<%s object at %#x; dead>z!<%s object at %#x; for %r at %#x>)r����r}���r����r&���r9���rj���r����s��� r���rk���zfinalize.__repr__q��s��������~�!�!�$�'�'���%�t�|�|�~�~���;�-��d���1D�b��h�h�0O�O�O�6��d���$�b��h�h��S� � �0B�B�s�G�G�L�M�� Mr ���c�����������������������d��|�j��������������������������������������������D���������������}|���������������������d����������������d��|D���������������S�)Nc������������������*�����g�|�]\��}}|j����������||f��S�rB���)r�����r�����f�is��� r���r����z-finalize._select_for_exit.<locals>.<listcomp>}��s'������B�B�B�u��!���B�a��U�B�B�Br ���c�����������������������|�d���������j���������S�)N����)r����)�items��� r����<lambda>z+finalize._select_for_exit.<locals>.<lambda>~��s������t�A�w�}��r ���r����c�����������������������g�|�]\��}}|��S�rB���rB���r����s��� r���r����z-finalize._select_for_exit.<locals>.<listcomp>��s������!�!�!�e�q���!�!�!r ���)r����rs����sort)r(����Ls��� r����_select_for_exitzfinalize._select_for_exitz��sR������� C�B�� � 3� 3� 5� 5�B�B�B�� ���,�,��-�-�-�!�!�q�!�!�!�!r ���c������������������,����d} �|�j���������r�dd�l}|�����������������������������������rd}|������������������������������������d�} �|�t����������j��������r |������������������������������������}dt����������_��������|sn[|�����������������������������������} ��|���������������n/#�t����������$�r"�t����������j ��������t����������j�������������������������Y�nw�xY�w||�j���������vsJ����dt����������_��������|r|� �����������������������������������d�S�d�S�#�dt����������_��������|r|� �����������������������������������w�w�xY�w)NFr���T)r�����gc� isenabled�disabler���r����r����rT���� Exception�sys� excepthook�exc_infor�����enable)r(����reenable_gcr�����pendingr����s��� r���r����zfinalize._exitfunc���s?����� ��� ��}�� 2�� � � ��<�<�>�>��!�"&�K��J�J�L�L�L���2���(�/��"%�"6�"6�"8�"8��*/���"������� � �A�8� ��������$��8��8��8�������7�7�7�7�8�����C�M�1�1�1�1�2�$�"&�H���� �� � ������ �� ���"&�H���� �� � ����� ���s0����A=C.�� B ��C.�� )B9�6C.��8B9�9C.��.%Dr-���)r9���r:���r;���r<���r=���r����r����� itertools�countr����r����r����r����rR���r/���r����r�����propertyr����r�����setterrk����classmethodr����r����rB���r ���r���r���r�����s_����������������"��I��I��I�!�)�/�#�#�K� �F�#��M��M��M��M��M��M��M��M������"@��@��@��@�B��B��B�B��B��B���&��&���X�&���*��*���X�*� ��]�&��&���]�&� M��M��M���"��"���[�"��� �� ���[� �� �� r ���r���)r<����_weakrefr���r���r���r���r���r���r ���r ����_weakrefsetr���r���r����r��r��r����__all__� MutableSetr����r����MutableMappingr���rn���r ���r���rB���r ���r����<module>r�����s������������������������������������������������1��0��0��0��0��0��0��0���������� � � � ����������*� +� �0��0��0�������$��$�W��-��-��-�3��3��3��3��3���3��3��3�lp��p��p��p��p�*�9��p��p��p�f'��'��'��'��'�s��'��'��'�*u��u��u��u��u�(�7��u��u��u�pF��F��F��F��F��F��F��F��F��Fr ���