AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/gi/overrides/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/gi/overrides/__pycache__/__init__.cpython-310.pyc
o

��T`2�@s�ddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZddlm
Z
mZddlmZeee�ZiZGdd�dej�ZGd	d
�d
e�Zdd�Zd
d�ZeZ	dd�Zdd�Ze�iiedfdd�Zddd�Zdd�ZdS)�N)�
get_loader)�PyGIDeprecationWarning)�CallableInfo�pygobject_new_full)�	TYPE_NONE�TYPE_INVALID)�extend_pathcs8eZdZdZ�fdd�Zdd�Zdd�Zdd	�Z�ZS)
�OverridesProxyModulez7Wraps a introspection module and contains all overridescstt|��|j�||_dS�N)�superr	�__init__�__name__�_introspection_module)�self�introspection_module��	__class__��7/usr/lib/python3/dist-packages/gi/overrides/__init__.pyrs
�
zOverridesProxyModule.__init__cCst|j|�Sr
)�getattrr)r�namerrr�__getattr__sz OverridesProxyModule.__getattr__cCs6tt|j��}|�|j���|�t|j��t|�Sr
)�set�dirr�update�__dict__�keysr�sorted)r�resultrrr�__dir__"szOverridesProxyModule.__dir__cCsdt|�j|jfS)Nz<%s %r>)�typer
r)rrrr�__repr__(szOverridesProxyModule.__repr__)	r
�
__module__�__qualname__�__doc__rrrr!�
__classcell__rrrrr	sr	c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�_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).
    cCs$||_||_td|||f�|_dS)Nz#%s.%s is deprecated; use %s instead)�_attr�_valuer�_warning)r�	namespace�attr�value�replacementrrrr3s�
�z_DeprecatedAttribute.__init__cCs(|dur	t|j��tj|jdd�|jS)N���
stacklevel)�AttributeErrorr'�warnings�warnr)r()r�instance�ownerrrr�__get__:s
z_DeprecatedAttribute.__get__cCs$|j}tt|�|�t|||�dSr
)r'�delattrr �setattr)rr4r,r+rrr�__set__@sz_DeprecatedAttribute.__set__cCstt|�|j�dSr
)r7r r')rr4rrr�
__delete__Fsz_DeprecatedAttribute.__delete__N)r
r"r#r$rr6r9r:rrrrr&,sr&c
Cs�|j�dd�d}d|}|tjv}tj�|�}t|dtfi�}||�}|tj|<ddlm}t|d�s7J�|||<zAd	|}zt	|�}	Wnt
yQd
}	Ynw|	d
urh|W||=tj|=|rg|tj|<SSt�|�}
W||=tj|=|r||tj|<n||=tj|=|r�|tj|<w||_
g}t|
d�r�|
j}|D]}zt|
|�}
Wnt
tfy�Yq�wt|||
�q�t�|g�D]+\}}zt||�}Wn
t
y�td|��wt||�t||||�}t|||�q�|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.
    �.�����gi.repository.�ProxyModuler.)�modulesrz
gi.overrides.N�__all__z1%s was set deprecated but wasn't added to __all__)r
�rsplit�sysr@�getr r	�importer�hasattrrr1�	importlib�
import_module�_overrides_modulerAr�	TypeErrorr8�_deprecated_attrs�pop�AssertionErrorr7r&)rr*�
module_key�has_old�
old_module�
proxy_type�proxyr@�override_package_name�override_loader�override_mod�override_all�var�itemr+r-r,�deprecated_attrrrr�load_overridesKsv

���
��
���
�rZcs�t|t�r|}|j�dd�d}tjd|��fdd�}|St|tj�r+td|��zt	|d�}Wnt
y@td	|j��w|j�d
�sPt
d||jf��|��}|tksZJ�|tkra||_|j�dd�d}tjd|�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.
    r;r<r=r>cst�|j|�|Sr
)r8r
��func��modulerr�wrapper�szoverride.<locals>.wrapperz"func must be a gi function, got %s�__info__zKCan not override a type %s, which is not in a gobject introspection typelibzgi.overrideszUYou have tried override outside of the overrides module. This is not allowed (%s, %s))�
isinstancerr"rBrCr@�types�FunctionTyperJrr1r
�
startswith�KeyError�
get_g_typerr�pytyper8)�type_r\r*r_�info�g_typerr]r�override�s>
�����rkcst�����fdd��}|S)z7Decorator for marking methods and classes as deprecatedcs(tjd�j�ftdd��|i|��S)Nz %s is deprecated; use %s insteadr.r/)r2r3r
r)�args�kwargs��fnr-rr�wrapped�s�zdeprecated.<locals>.wrapped��	functools�wraps)ror-rprrnr�
deprecated�srtcCst�|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)rK�
setdefault�append)r*r+r-rrrrY�srYr.cs�������fdd�}|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	sL|rtjdd��dt|�����d�tt�|��}ni}|�|�g}���D]\}}||vr>|�|�||<|�	|�q*|r^tjdd��fdd�t
|�D��d�t
|��f��d�g}���D]\}}||vrw�|||<|�	|�qd|r�tjdd��fd	d�t
|�D����d��D]}||vr�|�|�q��|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/InitializerDeprecationsz, Nr/z�The keyword(s) "%s" have been deprecated in favor of "%s" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecationsc3s�|]}�|VqdSr
r��.0�k)�deprecated_aliasesrr�	<genexpr>(s�z4deprecated_init.<locals>.new_init.<locals>.<genexpr>z�Initializer is relying on deprecated non-standard defaults. Please update to explicitly use: %s See: https://wiki.gnome.org/PyGObject/InitializerDeprecationsc3s �|]}d|�|fVqdS)z%s=%sNrrw)�deprecated_defaultsrrr{7s�)r2r3�join�len�dict�zipr�itemsrLrvr)	rrlrm�
new_kwargs�aliases_used�key�alias�
defaults_usedr,��	arg_names�categoryrzr|�ignorer0�super_init_funcrr�new_initsP��

����
���
�z!deprecated_init.<locals>.new_initr)r�r�r�rzr|r�r0r�rr�r�deprecated_init�s3r�cs t�������fdd��}|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.
    csJ�|i|��}|drt|�dkr|dS|dd�S�r#��p!d���S)Nrr.r<zcall failed)r~)rlrm�ret��exc_str�exc_type�fail_ret�methodrrrpKsz%strip_boolean_result.<locals>.wrappedrq)r�r�r�r�rprr�r�strip_boolean_resultDsr�cs�fdd�}|S)Ncs&t|d�}t|d�}�||g|�R�S)NF)r)�a�b�	user_datar[rr�wrap\s

z'wrap_list_store_sort_func.<locals>.wrapr)r\r�rr[r�wrap_list_store_sort_funcZsr�)NNN) rrrbr2rGrC�pkgutilr�gir�gi._girr�
gi._constantsrrr�__path__r
rK�
ModuleTyper	�objectr&rZrk�overridefuncrtrY�tupler�r�r�rrrr�<module>s6
V-

�
T

Anon7 - 2022
AnonSec Team