HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/gi/overrides/__pycache__/__init__.cpython-311.pyc
�

��T`2���ddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZddlm
Z
mZddlmZeee��ZiZGd�dej��ZGd	�d
e��Zd�Zd�ZeZ	d
�Zd�Ze��iiedfd�Zdd�Zd�ZdS)�N)�
get_loader)�PyGIDeprecationWarning)�CallableInfo�pygobject_new_full)�	TYPE_NONE�TYPE_INVALID)�extend_pathc�4��eZdZdZ�fd�Zd�Zd�Zd�Z�xZS)�OverridesProxyModulez7Wraps a introspection module and contains all overridesc�p��tt|���|j��||_dS�N)�superr�__init__�__name__�_introspection_module)�self�introspection_module�	__class__s  ��7/usr/lib/python3/dist-packages/gi/overrides/__init__.pyrzOverridesProxyModule.__init__s:���
�"�D�)�)�2�2� �)�	+�	+�	+�%9��"�"�"�c�,�t|j|��Sr
)�getattrr)r�names  r�__getattr__z OverridesProxyModule.__getattr__s���t�1�4�8�8�8rc��tt|j����}|�|j�����|�t|j����t|��Sr
)�set�dirr�update�__dict__�keysr�sorted)r�results  r�__dir__zOverridesProxyModule.__dir__"sb���S���(�(�)�)���
�
�d�m�(�(�*�*�+�+�+��
�
�c�$�4�5�5�6�6�6��f�~�~�rc�B�dt|��j�d|j�d�S)N�<� �>)�typerr)rs r�__repr__zOverridesProxyModule.__repr__(s'��� ��J�J�/�/�/��1K�1K�1K�L�Lr)	r�
__module__�__qualname__�__doc__rrr#r)�
__classcell__)rs@rrrsr�������A�A�:�:�:�:�:�
9�9�9����M�M�M�M�M�M�Mrrc�*�eZdZdZd�Zd�Zd�Zd�ZdS)�_DeprecatedAttributez�A deprecation descriptor for OverridesProxyModule subclasses.

    Emits a PyGIDeprecationWarning on every access and tries to act as a
    normal instance attribute (can be replaced and deleted).
    c�\�||_||_t|�d|�d|�d���|_dS)N�.� is deprecated; use � instead)�_attr�_valuer�_warning)r�	namespace�attr�value�replacements     rrz_DeprecatedAttribute.__init__3s=����
����.��	�	�4�4�4����
.�/�/��
�
�
rc�r�|�t|j���tj|jd���|jS)N���
stacklevel)�AttributeErrorr4�warnings�warnr6r5)r�instance�owners   r�__get__z_DeprecatedAttribute.__get__:s7���� ���,�,�,��
�d�m��2�2�2�2��{�rc�p�|j}tt|��|��t|||��dSr
)r4�delattrr(�setattr)rrBr9r8s    r�__set__z_DeprecatedAttribute.__set__@s7���z����X����%�%�%���$��&�&�&�&�&rc�J�tt|��|j��dSr
)rFr(r4)rrBs  r�
__delete__z_DeprecatedAttribute.__delete__Fs ����X����
�+�+�+�+�+rN)rr*r+r,rrDrHrJ�rrr/r/,sZ��������/�/�/����'�'�'�,�,�,�,�,rr/c�n�|j�dd��d}d|z}|tjv}tj�|��}t|dztfi��}||��}|tj|<ddlm}t|d��sJ�|||<	d	|z}	t|��}	n#t$rd
}	YnwxYw|	�$|||=tj|=|r|tj|<SStj|��}
||=tj|=|r|tj|<n&#||=tj|=|r|tj|<wxYw||_
g}t|
d��r|
j}|D]<}	t|
|��}
n#tt f$rY�'wxYwt#|||
���=t$�|g��D]j\}}	t||��}n #t$rt)d|z���wxYwt+||��t-||||��}t#|||���k|S)
z�Loads overrides for an introspection module.

    Either returns the same module again in case there are no overrides or a
    proxy module including overrides. Doesn't cache the result.
    r1�����gi.repository.�ProxyModuler<)�modulesrz
gi.overrides.N�__all__z1%s was set deprecated but wasn't added to __all__)r�rsplit�sysrQ�getr(r�importer�hasattrrr?�	importlib�
import_module�_overrides_modulerRr�	TypeErrorrG�_deprecated_attrs�pop�AssertionErrorrFr/)rr7�
module_key�has_old�
old_module�
proxy_type�proxyrQ�override_package_name�override_loader�override_mod�override_all�var�itemr8r:r9�deprecated_attrs                  r�load_overridesrkKs���%�-�4�4�S�!�<�<�R�@�I�!�I�-�J��C�K�'�G������,�,�J��i�-�/�2F�1I�2�N�N�J��J�+�,�,�E�#�C�K�
��#�"�"�"�"�"��5�1�2�2�2�2�2��G�I��1� /�)� ;��	#�(�)>�?�?�O�O���	#�	#�	#�"�O�O�O�	#����
�"�'�

�I���K�
�#��	1�&0�C�K�
�#�#�	1�!�.�/D�E�E��
�I���K�
�#��	1�&0�C�K�
�#���
�I���K�
�#��	1�&0�C�K�
�#�0�0�0�0�$�E���L��|�Y�'�'�,�#�+���"�"��	��<��-�-�D�D���	�*�	�	�	��H�	����	��s�D�!�!�!�!�/�2�2�9�b�A�A�	3�	3���k�	L��E�4�(�(�E�E���	L�	L�	L� �C�d�J�L�L�
L�	L����	��t����.��t�U�K�1�1���
�D�/�2�2�2�2��LsT�&D*�,B<�;D*�<C�D*�
C�D*�4D*�*#E
�5F�F�F�G!�!G>c����t|t��r?|}|j�dd��d}tjd|z��fd�}|St|tj��rtd|z���	t|d��}n%#t$rtd|jz���wxYw|j�d	��std
|�d|j�d����|���}|tksJ�|t kr||_|j�dd��d}tjd|z�t%�|j|��|S)
aDecorator for registering an override.

    Other than objects added to __all__, these can get referenced in the same
    override module via the gi.repository module (get_parent_for_object() does
    for example), so they have to be added to the module immediately.
    r1rMrNrOc�4��t�|j|��|Sr
)rGr)�func�modules �r�wrapperzoverride.<locals>.wrapper�s����F�D�M�4�0�0�0��Krz"func must be a gi function, got %s�__info__zKCan not override a type %s, which is not in a gobject introspection typelibzgi.overrideszNYou have tried override outside of the overrides module. This is not allowed (�, �))�
isinstancerr*rSrTrQ�types�FunctionTyper[rr?r�
startswith�KeyError�
get_g_typerr�pytyperG)�type_rnr7rp�info�g_typeros      @r�overrider~�s�����%��&�&�"����O�*�*�3��2�2�2�6�	���-�	�9�:��	�	�	�	�	���	�E�5�-�	.�	.���<�u�D�E�E�E�	:��5�*�-�-�D�D���	:�	:�	:��(�*/�.�9�:�:�
:�	:����
��*�*�>�:�:�	L��(�27�%�%��9I�9I�9I�K�L�L�
L����"�"����"�"�"�"��\�!�!�!�F�M��$�+�+�C��3�3�B�7�	���-�	�9�:�������.�.�.��s�B�"B6c�J���tj�����fd���}|S)z7Decorator for marking methods and classes as deprecatedc�b��tj�j�d��d�td����|i|��S)Nr2r3r<r=)r@rArr)�args�kwargs�fnr:s  ��r�wrappedzdeprecated.<locals>.wrapped�sG����
�B�K�K�K����U�,��	<�	<�	<�	<��r�4�"�6�"�"�"r��	functools�wraps)r�r:r�s`` r�
deprecatedr��s>�����_�R���#�#�#�#�#���#��Nrc�f�t�|g���||f��dS)a:Marks a module level attribute as deprecated. Accessing it will emit
    a PyGIDeprecationWarning warning.

    e.g. for ``deprecated_attr("GObject", "STATUS_FOO", "GLib.Status.FOO")``
    accessing GObject.STATUS_FOO will emit:

        "GObject.STATUS_FOO is deprecated; use GLib.Status.FOO instead"

    :param str namespace:
        The namespace of the override this is called in.
    :param str namespace:
        The attribute name (which gets added to __all__).
    :param str replacement:
        The replacement text which will be included in the warning.
    N)r\�
setdefault�append)r7r8r:s   rrjrj�s3��"� � ��B�/�/�6�6��k�7J�K�K�K�K�Krr<c�*���������������fd�}|S)aWrapper for deprecating GObject based __init__ methods which specify
    defaults already available or non-standard defaults.

    :param callable super_init_func:
        Initializer to wrap.
    :param list arg_names:
        Ordered argument name list.
    :param list ignore:
        List of argument names to ignore when calling the wrapped function.
        This is useful for function which take a non-standard keyword that is munged elsewhere.
    :param dict deprecated_aliases:
        Dictionary mapping a keyword alias to the actual g_object_newv keyword.
    :param dict deprecated_defaults:
        Dictionary of non-standard defaults that will be used when the
        keyword is not explicitly passed.
    :param Exception category:
        Exception category of the error.
    :param int stacklevel:
        Stack level for the deprecation passed on to warnings.warn
    :returns: Wrapped version of ``super_init_func`` which gives a deprecation
        warning when non-keyword args or aliases are used.
    :rtype: callable
    c
����|r`tjdd��	dt|�����z�
����t	t�	|����}ni}|�|��g}����D]6\}}||vr-|�|��||<|�	|���7|rjtjdd��fd�t|��D�����dd�t|�����d��
����g}����D])\}}||vr �|||<|�	|���*|rFtjd	d��fd
�t|��D����z�
�����
D]}||vr|�|����|fi|��S)z�Initializer for a GObject based classes with support for property
        sets through the use of explicit keyword arguments.
        z�Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "%s" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecationsrrNr=zThe keyword(s) "c3�(�K�|]}�|V��
dSr
rK)�.0�k�deprecated_aliasess  �r�	<genexpr>z4deprecated_init.<locals>.new_init.<locals>.<genexpr>(s)�����$Y�$Y�q�%7��%:�$Y�$Y�$Y�$Y�$Y�$Yrz$" have been deprecated in favor of "zM" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecationsz�Initializer is relying on deprecated non-standard defaults. Please update to explicitly use: %s See: https://wiki.gnome.org/PyGObject/InitializerDeprecationsc3�2�K�|]}|�d�|��V��dS)�=NrK)r�r��deprecated_defaultss  �rr�z4deprecated_init.<locals>.new_init.<locals>.<genexpr>7s5�����#i�#i�a�q�q�q�2E�a�2H�2H�$I�#i�#i�#i�#i�#i�#ir)r@rA�join�len�dict�zipr�itemsr]r�r!)rr�r��
new_kwargs�aliases_used�key�alias�
defaults_usedr9�	arg_names�categoryr�r��ignorer>�super_init_funcs         �������r�new_initz!deprecated_init.<locals>.new_initsd���
�	��M�Z��)�)�I�j�s�4�y�y�j�$9�:�:�;�#�z�	
;�
;�
;�
;�
�c�)�T�2�2�3�3�J�J��J����&�!�!�!���,�2�2�4�4�	)�	)�J�C���
�"�"�",�.�.��"7�"7�
�3���#�#�C�(�(�(���	;��M�M��9�9�$Y�$Y�$Y�$Y�F�<�DX�DX�$Y�$Y�$Y�Y�Y�Y�Y��9�9�V�L�%9�%9�:�:�:�:�<�#�z�	
;�
;�
;�
;��
�-�3�3�5�5�	*�	*�J�C���*�$�$�"5�c�":�
�3���$�$�S�)�)�)���	;��M�Z��)�)�#i�#i�#i�#i�SY�Zg�Sh�Sh�#i�#i�#i�i�i�j�#�z�	
;�
;�
;�
;��	$�	$�C��j� � ����s�#�#�#����t�2�2�z�2�2�2rrK)r�r�r�r�r�r�r>r�s``````` r�deprecated_initr��sH���������<13�13�13�13�13�13�13�13�13�13�13�f�Orc�R�����tj�������fd���}|S)aTranslate method's return value for stripping off success flag.

    There are a lot of methods which return a "success" boolean and have
    several out arguments. Translate such a method to return the out arguments
    on success and None on failure.
    c����|i|��}|dr%t|��dkr|dS|dd�S�r
��pd����S)Nrr<rMzcall failed)r�)r�r��ret�exc_str�exc_type�fail_ret�methods   ����rr�z%strip_boolean_result.<locals>.wrappedKsj����f�d�%�f�%�%���q�6�	��3�x�x�1�}�}��1�v�
��1�2�2�w���
9��h�w�7�-�8�8�8��Orr�)r�r�r�r�r�s```` r�strip_boolean_resultr�DsL�������_�V���
�
�
�
�
�
�
���
��Nrc����fd�}|S)Nc�X��t|d��}t|d��}�||g|�R�S)NF)r)�a�b�	user_datarns   �r�wrapz'wrap_list_store_sort_func.<locals>.wrap\s;����q�%�(�(���q�%�(�(���t�A�q�%�9�%�%�%�%rrK)rnr�s` r�wrap_list_store_sort_funcr�Zs#���&�&�&�&�&�
�Kr)NNN) r�rur@rXrT�pkgutilr�gir�gi._girr�
gi._constantsrrr	�__path__rr\�
ModuleTyper�objectr/rkr~�overridefuncr�rj�tupler�r�r�rKrr�<module>r�s�������������������
�
�
�
�������%�%�%�%�%�%�3�3�3�3�3�3�3�3���������
 �������;�x��*�*����M�M�M�M�M�5�+�M�M�M�*,�,�,�,�,�6�,�,�,�>S�S�S�l*�*�*�Z������L�L�L�(8=�u�w�w�')�r�3� �Q�Q�Q�Q�h����,����r