%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/gi/overrides/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/gi/overrides/__pycache__/__init__.cpython-312.pyc

�

��f�1���ddlZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZddl
mZeee�ZiZGd�dej$�ZGd�d	e�Zd
�Zd�ZeZ	d�Zd
�Ze�iiedfd�Zdd�Zd�Zy)�N)�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�N��tt|�|j�||_y�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� �)�)�	+�%9��"�c�.�t|j|�Sr)�getattrr)r�names  r�__getattr__z OverridesProxyModule.__getattr__s���t�1�1�4�8�8rc���tt|j��}|j|jj��|jt|j��t|�Sr)�set�dirr�update�__dict__�keysr�sorted)r�results  r�__dir__zOverridesProxyModule.__dir__!sO���S����(�)���
�
�d�m�m�(�(�*�+��
�
�c�$�4�4�5�6��f�~�rc�N�dt|�j�d|j�d�S)N�<� �>)�typerr)rs r�__repr__zOverridesProxyModule.__repr__'s�� ��J�/�/��1K�1K�L�Lr)	r�
__module__�__qualname__�__doc__rrr"r(�
__classcell__)rs@rr
r
s���A�:�
9��Mrr
c�(�eZdZdZd�Zd�Zd�Zd�Zy)�_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�R�||_||_t|�d|�d|�d��|_y)N�.� is deprecated; use � instead)�_attr�_valuer�_warning)r�	namespace�attr�value�replacements     rrz_DeprecatedAttribute.__init__2s(����
����.��4��
.�/��
rc��|�t|j��tj|jd��|j
S)N���
stacklevel)�AttributeErrorr3�warnings�warnr5r4)r�instance�owners   r�__get__z_DeprecatedAttribute.__get__9s3���� ����,�,��
�
�d�m�m��2��{�{�rc�`�|j}tt|�|�t|||�yr)r3�delattrr'�setattr)rrAr8r7s    r�__set__z_DeprecatedAttribute.__set__?s%���z�z����X���%���$��&rc�B�tt|�|j�yr)rEr'r3)rrAs  r�
__delete__z_DeprecatedAttribute.__delete__Es����X���
�
�+rN)rr)r*r+rrCrGrI�rrr.r.+s���/��'�,rr.c�l�|jjdd�d}d|z}|tjv}tjj	|�}t|dztfi�}||�}|tj|<ddlm}t|d�sJ�|||<	d	|z}tjj|�}	|	�|	jnd
}
|
�,|||=tj|=|r|tj|<SStj|�}||=tj|=|r|tj|<	||_g}t|d�r|j}|D]}
	t!||
�}t'||
|��t(j+|g�D]9\}}	t!||�}t/||�t1||||�}t'|||��;|S#||=tj|=|r|tj|<wwxYw#t"t$f$rY��wxYw#t"$rt-d|z��wxYw)
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.
    r0�����gi.repository.�ProxyModuler;)�modulesrz
gi.overrides.N�__all__z1%s was set deprecated but wasn't added to __all__)r�rsplit�sysrP�getr'r
�importer�hasattr�	importlib�util�	find_spec�loader�
import_module�_overrides_modulerQrr>�	TypeErrorrF�_deprecated_attrs�pop�AssertionErrorrEr.)rr6�
module_key�has_old�
old_module�
proxy_type�proxyrP�override_package_name�spec�override_loader�override_mod�override_all�var�itemr7r9r8�deprecated_attrs                   r�load_overridesrnJsn��%�-�-�4�4�S�!�<�R�@�I�!�I�-�J��C�K�K�'�G�������,�J��i�-�/�2F�1I�2�N�J��+�,�E�#�C�K�K�
��#��5�1�2�2�2��G�I��1� /�)� ;���~�~�'�'�(=�>��)-�)9�$�+�+�t���"�'�

�I���K�K�
�#��&0�C�K�K�
�#��!�.�.�/D�E��
�I���K�K�
�#��&0�C�K�K�
�#�$�E���L��|�Y�'�#�+�+���"��	��<��-�D�	��s�D�!�
"�/�2�2�9�b�A�	3���k�	L��E�4�(�E�	��t��.��t�U�K�1���
�D�/�2�	3��L��K
�I���K�K�
�#��&0�C�K�K�
�#���"�	�*�	��	���	L� �C�d�J�L�
L�	L�s0� 7G�G�(H� H�,H�H�H�H3c���t|t�r>|}|jjdd�d}tj
d|z��fd�}|St|tj�rtd|z��	t|d�}|jjd	�std
|�d|j�d���|j�}|tk7sJ�|t k7r||_|jjdd�d}tj
d|z�t%�|j|�|S#t$rtd|jz��wxYw)
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.
    r0rLrMrNc�6��t�|j|�|Sr)rFr)�func�modules �r�wrapperzoverride.<locals>.wrapper�s����F�D�M�M�4�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)rRrSrP�types�FunctionTyper]rr>r�
startswith�KeyError�
get_g_typerr�pytyperF)�type_rqr6rs�info�g_typerrs      @r�overrider��sW����%��&����O�O�*�*�3��2�2�6�	����-�	�9�:��	���	�E�5�-�-�	.��<�u�D�E�E�	:��5�*�-�D����*�*�>�:��27��9I�9I�K�L�
L����"����"�"�"��\�!�!�F�M��$�$�+�+�C��3�B�7�	����-�	�9�:��������.����'�	:��(�*/�.�.�9�:�
:�	:�s�9D5�5"Ec�F���tj����fd��}|S)z7Decorator for marking methods and classes as deprecatedc�l��tj�j�d��d�td���|i|��S)Nr1r2r;r<)r?r@rr)�args�kwargs�fnr9s  ��r�wrappedzdeprecated.<locals>.wrapped�s/����
�
�B�K�K��U�,��	<��4�"�6�"�"r��	functools�wraps)r�r9r�s`` r�
deprecatedr��s%����_�_�R��#��#��Nrc�R�tj|g�j||f�y)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)r6r7r9s   rrmrm�s$��"� � ��B�/�6�6��k�7J�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
�:��|rLtjddj�	dt|��z�
���t	t�	|��}ni}|j
|�g}�j�D]/\}}||vs�|j|�||<|j|��1|rXtjddj�fd�t|�D���ddjt|���d��
���g}�j�D]#\}}||vs��|||<|j|��%|r<tjd	dj�fd
�t|�D��z�
����
D]}||vs�|j|���|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/InitializerDeprecationsruNr<zThe keyword(s) "c3�(�K�|]	}�|���y�wrrJ)�.0�k�deprecated_aliasess  �r�	<genexpr>z4deprecated_init.<locals>.new_init.<locals>.<genexpr>"s�����$Y�q�%7��%:�$Y�s�z$" 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�|�����y�w)�=NrJ)r�r��deprecated_defaultss  �rr�z4deprecated_init.<locals>.new_init.<locals>.<genexpr>1s�����#i�a�q�2E�a�2H�$I�#i�s�)r?r@�join�len�dict�zipr�itemsr_r�r )rr�r��
new_kwargs�aliases_used�key�alias�
defaults_usedr8�	arg_names�categoryr�r��ignorer=�super_init_funcs         �������r�new_initz!deprecated_init.<locals>.new_inits����
��M�M�Z��)�)�I�j�s�4�y�$9�:�;�#�z�	
;�
�c�)�T�2�3�J��J����&�!���,�2�2�4�	)�J�C���
�"�",�.�.��"7�
�3���#�#�C�(�	)�
��M�M��9�9�$Y�F�<�DX�$Y�Y��9�9�V�L�%9�:�<�#�z�	
;��
�-�3�3�5�	*�J�C���*�$�"5�c�":�
�3���$�$�S�)�	*�
��M�M�Z��)�)�#i�SY�Zg�Sh�#i�i�j�#�z�	
;��	$�C��j� ����s�#�	$��t�2�z�2�2rrJ)r�r�r�r�r�r�r=r�s``````` r�deprecated_initr��s���<13�13�f�Orc�N�����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�n���|i|��}|drt|�dk(r|dS|ddS�r��xsd���S)Nrr;rLzcall failed)r�)r�r��ret�exc_str�exc_type�fail_ret�methods   ����rr�z%strip_boolean_result.<locals>.wrappedEsP����d�%�f�%���q�6��3�x�1�}��1�v�
��1�2�w����w�7�-�8�8��Orr�)r�r�r�r�r�s```` r�strip_boolean_resultr�>s'����_�_�V��
��
��Nrc����fd�}|S)Nc�H��t|d�}t|d�}�||g|���S)NF)r)�a�b�	user_datarqs   �r�wrapz'wrap_list_store_sort_func.<locals>.wrapVs-����q�%�(���q�%�(���A�q�%�9�%�%rrJ)rqr�s` r�wrap_list_store_sort_funcr�Ts���&�
�Kr)NNN)r�rxr?rWrS�gir�gi._girr�
gi._constantsrr�pkgutilr�__path__rr^�
ModuleTyper
�objectr.rnr��overridefuncr�rm�tupler�r�r�rJrr�<module>r�s�������
�%�3��
 ��x��*����M�5�+�+�M�*,�6�,�>N�b*�Z����L�(8=�w�')�r�3� �Q�h�,r

Zerion Mini Shell 1.0