Ë
    çôfº1  ã                   ó  — d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm	Z	 d dl
mZmZ d dlmZ  eee«      Zi Z G d„ dej$                  «      Z G d„ d	e«      Zd
„ Zd„ ZeZ	 d„ Zd„ Z e«       i i edfd„Zdd„Zd„ Zy)é    N)ÚPyGIDeprecationWarning)ÚCallableInfoÚpygobject_new_full)Ú	TYPE_NONEÚTYPE_INVALID)Úextend_pathc                   ó4   ‡ — e Zd ZdZˆ fd„Zd„ Zd„ Zd„ Zˆ xZS )ÚOverridesProxyModulez7Wraps a introspection module and contains all overridesc                 óN   •— t         t        | �  |j                  «       || _        y ©N)Úsuperr
   Ú__init__Ú__name__Ú_introspection_module)ÚselfÚintrospection_moduleÚ	__class__s     €ú7/usr/lib/python3/dist-packages/gi/overrides/__init__.pyr   zOverridesProxyModule.__init__   s$   ø€ ÜÔ" DÑ2Ø ×)Ñ)ô	+à%9ˆÕ"ó    c                 ó.   — t        | j                  |«      S r   )Úgetattrr   )r   Únames     r   Ú__getattr__z OverridesProxyModule.__getattr__   s   € Ü�t×1Ñ1°4Ó8Ð8r   c                 óî   — t        t        | j                  «      «      }|j                  | j                  j                  «       «       |j                  t        | j                  «      «       t        |«      S r   )ÚsetÚdirr   ÚupdateÚ__dict__Úkeysr   Úsorted)r   Úresults     r   Ú__dir__zOverridesProxyModule.__dir__!   sO   € Ü”S˜Ÿ™Ó(Ó)ˆØ�‰�d—m‘m×(Ñ(Ó*Ô+Ø�‰”c˜$×4Ñ4Ó5Ô6Ü�f‹~Ðr   c                 óN   — dt        | «      j                  ›d| j                  ›d�S )Nú<ú ú>)Útyper   r   )r   s    r   Ú__repr__zOverridesProxyModule.__repr__'   s   � Ü  ›J×/Ó/°×1KÓ1KÐLÐLr   )	r   Ú
__module__Ú__qualname__Ú__doc__r   r   r"   r(   Ú__classcell__)r   s   @r   r
   r
      s   ø„ ÙAô:ò
9òöMr   r
   c                   ó(   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zy)Ú_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        r   r   z_DeprecatedAttribute.__init__2   s(   € ØˆŒ
ØˆŒÜ.âš4¢ð.ó/ˆ�r   c                 óŠ   — |€t        | j                  «      ‚t        j                  | j                  d¬«       | j
                  S )Né   ©Ú
stacklevel)ÚAttributeErrorr3   ÚwarningsÚwarnr5   r4   )r   ÚinstanceÚowners      r   Ú__get__z_DeprecatedAttribute.__get__9   s3   € ØÐÜ  §¡Ó,Ð,Ü�‰�d—m‘m°Õ2Ø�{‰{Ðr   c                 ó`   — | j                   }t        t        |«      |«       t        |||«       y r   )r3   Údelattrr'   Úsetattr)r   rA   r8   r7   s       r   Ú__set__z_DeprecatedAttribute.__set__?   s%   € Ø�z‰zˆä”�X“ Ô%Ü�˜$ Õ&r   c                 óB   — t        t        |«      | j                  «       y r   )rE   r'   r3   )r   rA   s     r   Ú
__delete__z_DeprecatedAttribute.__delete__E   s   € ä”�X“ §
¡
Õ+r   N)r   r)   r*   r+   r   rC   rG   rI   © r   r   r.   r.   +   s   „ ñò/òò'ó,r   r.   c                 ól  — | j                   j                  dd«      d   }d|z   }|t        j                  v }t        j                  j	                  |«      }t        |dz   t        fi «      } || «      }|t        j                  |<   ddlm} t        |d«      sJ ‚|||<   	 d	|z   }t        j                  j                  |«      }	|	�|	j                  nd
}
|
€,| ||= t        j                  |= |r|t        j                  |<   S S t        j                  |«      }||= t        j                  |= |r|t        j                  |<   	 ||_        g }t        |d«      r|j                  }|D ]  }	 t!        ||«      }t'        |||«       Œ t(        j+                  |g «      D ]9  \  }}	 t!        ||«      }t/        ||«       t1        ||||«      }t'        |||«       Œ; |S # ||= t        j                  |= |r|t        j                  |<   w w xY w# t"        t$        f$ r Y Œ³w xY w# t"        $ r t-        d|z  «      ‚w xY w)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;   )Úmodulesr   z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_modulerQ   r   r>   Ú	TypeErrorrF   Ú_deprecated_attrsÚpopÚAssertionErrorrE   r.   )r   r6   Ú
module_keyÚhas_oldÚ
old_moduleÚ
proxy_typeÚproxyrP   Úoverride_package_nameÚspecÚoverride_loaderÚoverride_modÚoverride_allÚvarÚitemr7   r9   r8   Údeprecated_attrs                      r   Úload_overridesrn   J   sn  € ð %×-Ñ-×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ÈH3c                 ó´  ‡— t        | t        «      r>| }|j                  j                  dd«      d   }t        j
                  d|z      Šˆfd„}|S t        | t        j                  «      rt        d| z  «      ‚	 t        | d«      }| j                  j                  d	«      st        d
| ›d| j                  ›d�«      ‚|j                  «       }|t        k7  sJ ‚|t         k7  r| |_        | j                  j                  dd«      d   }t        j
                  d|z      Št%        ‰| j                  | «       | S # t        $ r t        d| j                  z  «      ‚w xY w)a  Decorator 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.
    r0   rL   rM   rN   c                 ó6   •— t        ‰| j                  | «       | S r   )rF   r   )ÚfuncÚmodules    €r   Úwrapperzoverride.<locals>.wrapper¨   s   ø€ Ü�F˜DŸM™M¨4Ô0ØˆKr   z"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 (ú, ú))Ú
isinstancer   r)   rR   rS   rP   ÚtypesÚFunctionTyper]   r   r>   r   Ú
startswithÚKeyErrorÚ
get_g_typer   r   ÚpytyperF   )Útype_rq   r6   rs   ÚinfoÚg_typerr   s         @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"Ec                 óF   ‡ ‡— t        j                  ‰ «      ˆ ˆfd„«       }|S )z7Decorator for marking methods and classes as deprecatedc                  ól   •— t        j                  ‰j                  ›d‰›d�t        d¬«        ‰| i |¤ŽS )Nr1   r2   r;   r<   )r?   r@   r   r   )ÚargsÚkwargsÚfnr9   s     €€r   Úwrappedzdeprecated.<locals>.wrappedÎ   s/   ø€ ä�‰¸B¿K»KÊÐUÜ,¸õ	<á�4Ð"˜6Ñ"Ð"r   ©Ú	functoolsÚwraps)r†   r9   r‡   s   `` r   Ú
deprecatedr‹   Ì   s%   ù€ ä‡_�_�RÓô#ó ð#ð €Nr   c                 óR   — t         j                  | 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)r6   r7   r9   s      r   rm   rm   Ö   s$   € ô" × Ñ  ¨BÓ/×6Ñ6¸¸kÐ7JÕKr   r;   c                 ó*   ‡ ‡‡‡‡‡‡— ˆˆˆˆˆˆˆ fd„}|S )a  Wrapper 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           
      ó:  •— |rLt        j                  ddj                  ‰	dt        |«       «      z  ‰
‰¬«       t	        t        ‰	|«      «      }ni }|j                  |«       g }‰j                  «       D ]/  \  }}||v sŒ|j                  |«      ||<   |j                  |«       Œ1 |rXt        j                  ddj                  ˆfd„t        |«      D «       «      ›ddj                  t        |«      «      ›d�‰
‰¬«       g }‰j                  «       D ]#  \  }}||vsŒ‰|   ||<   |j                  |«       Œ% |r<t        j                  d	dj                  ˆfd
„t        |«      D «       «      z  ‰
‰¬«       ‰D ]  }||v sŒ|j                  |«       Œ  ‰| fi |¤Ž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/InitializerDeprecationsru   Nr<   zThe keyword(s) "c              3   ó(   •K  — | ]	  }‰|   –— Œ y ­wr   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/InitializerDeprecationsc              3   ó2   •K  — | ]  }|›d ‰|   ›�–— Œ y­w)ú=NrJ   )r’   r“   Údeprecated_defaultss     €r   r•   z4deprecated_init.<locals>.new_init.<locals>.<genexpr>1  s   øè ø€ Ò#iÈaªqÐ2EÀaÒ2HÔ$IÑ#iùs   ƒ)r?   r@   ÚjoinÚlenÚdictÚzipr   Úitemsr_   rŽ   r    )r   r„   r…   Ú
new_kwargsÚaliases_usedÚkeyÚaliasÚdefaults_usedr8   Ú	arg_namesÚcategoryr”   r˜   Úignorer=   Úsuper_init_funcs            €€€€€€€r   Únew_initz!deprecated_init.<locals>.new_init  s²  ø€ ñ
 Ü�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Ð2r   rJ   )r¦   r£   r¥   r”   r˜   r¤   r=   r§   s   ``````` r   Údeprecated_initr¨   ê   s   þ€ ÷<13ò 13ðf €Or   c                 óN   ‡ ‡‡‡— t        j                  ‰ «      ˆˆˆˆ fd„«       }|S )a  Translate 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 |¤Ž}|d   rt        |«      dk(  r|d   S |dd  S ‰r ‰‰xs d«      ‚‰S )Nr   r;   rL   zcall failed)rš   )r„   r…   ÚretÚexc_strÚexc_typeÚfail_retÚmethods      €€€€r   r‡   z%strip_boolean_result.<locals>.wrappedE  sP   ø€ á�dÐ%˜fÑ%ˆØˆqŠ6Ü�3‹x˜1Š}Ø˜1‘v�à˜1˜2�w�áÙ˜wÒ7¨-Ó8Ð8ØˆOr   rˆ   )r¯   r­   r¬   r®   r‡   s   ```` r   Ústrip_boolean_resultr°   >  s'   û€ ô ‡_�_�VÓö
ó ð
ð €Nr   c                 ó   ‡ — ˆ fd„}|S )Nc                 óH   •— t        | d«      } t        |d«      } ‰| |g|¢­Ž S )NF)r   )ÚaÚbÚ	user_datarq   s      €r   Úwrapz'wrap_list_store_sort_func.<locals>.wrapV  s-   ø€ Ü˜q %Ó(ˆÜ˜q %Ó(ˆÙ�A�qÐ%˜9Ò%Ð%r   rJ   )rq   r¶   s   ` r   Úwrap_list_store_sort_funcr·   T  s   ø€ ô&ð
 €Kr   )NNN)r‰   rx   r?   rW   rS   Úgir   Úgi._gir   r   Úgi._constantsr   r   Úpkgutilr   Ú__path__r   r^   Ú
ModuleTyper
   Úobjectr.   rn   r�   Úoverridefuncr‹   rm   Útupler¨   r°   r·   rJ   r   r   ú<module>rÁ      s�   ðÛ Û Û Û Û 
å %ß 3÷õ
  Ù�x Ó*€ð Ð ôM˜5×+Ñ+ô Mô*,˜6ô ,ò>Nòb*ðZ €Ø òòLñ( 8=³wØ')¸rØ3Ø óQóhó,r   