Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib64/python2.7/site-packages/gi/overrides/ |
| [Home] [System Details] [Kill Me] |
�
�Zc@s>ddlZddlZddlZddlZddlmZddlmZddlm Z ddl
mZmZddlm
Z
e
ee�ZiZd�Zdejfd ��YZd
efd��YZd�Zd
efd��YZd�Zd�Zd�Ze�iiedd�Zdddd�ZdS(i����N(t
get_loader(tPyGIDeprecationWarning(tCallableInfo(t TYPE_NONEtTYPE_INVALID(textend_pathcs�fd�}|S(Ncs�j|_�j|_|S(N(t__name__t
__module__(twrapper(twrapped(s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytassigns((R R
((R s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytwrapsstOverridesProxyModulecBs2eZdZd�Zd�Zd�Zd�ZRS(s7Wraps
a introspection module and contains all
overridescCs&tt|�j|j�||_dS(N(tsuperRt__init__Rt_introspection_module(tselftintrospection_module((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyR!s
cCst|j|�S(N(tgetattrR(Rtname((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt__getattr__&scCsKtt|j��}|j|jj��|jt|j��t|�S(N(tsettdirt __class__tupdatet__dict__tkeysRtsorted(Rtresult((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt__dir__)scCsdt|�j|jfS(Ns<%s
%r>(ttypeRR(R((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt__repr__/s(RRt__doc__RRRR(((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyRs
t_DeprecatedAttributecBs2eZdZd�Zd�Zd�Zd�ZRS(s�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).
cCs2||_||_td|||f�|_dS(Ns#%s.%s is deprecated; use %s
instead(t_attrt_valueRt_warning(Rt namespacetattrtvaluetreplacement((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyR:s
cCs;|dkrt|j��ntj|jdd�|jS(Nt
stackleveli(tNonetAttributeErrorR"twarningstwarnR$R#(Rtinstancetowner((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt__get__AscCs0|j}tt|�|�t|||�dS(N(R"tdelattrRtsetattr(RR.R'R&((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt__set__Gs cCstt|�|j�dS(N(R1RR"(RR.((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt
__delete__Ms(RRR
RR0R3R4(((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyR!3s
cCs2|jjdd�d}d|}|tjk}tjj|�}t|dtfi�}||�}|tj|<ddlm}t|d�s�t �|||<zWd |}yt
|�} Wntk
r�d
} nX| d
kr�|St
j|�}
Wd
||=tj|=|r&|tj|<nX||_g}t|
d�rQ|
j}nxN|D]F}yt|
|�}
Wnttfk
r�qXnXt|||
�qXWx�tj|g�D]u\}}yt||�}Wn!tk
r�t d|��nXt||�t||||�}t|||�q�W|S(
s�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.
t.ii����sgi.repository.tProxyModulei(tmodulesRs
gi.overrides.Nt__all__s1%s
was set deprecated but wasn't added to
__all__(RtrsplittsysR7tgetRRtimporterthasattrtAssertionErrorRR+R*t importlibt
import_modulet_overrides_moduleR8Rt TypeErrorR2t_deprecated_attrstpopR1R!(RR%t
module_keythas_oldt
old_modulet
proxy_typetproxyR7toverride_package_nametoverride_loadertoverride_modtoverride_alltvartitemR&R(R'tdeprecated_attr((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytload_overridesRsX
toverridefunccBs
eZdZd�Zd�ZRS(s#decorator for overriding a
functioncCsSt|t�s"td|��n|jjdd�d}tjd||_dS(Ns"func
must be a gi function, got %sR5ii����sgi.repository.(t
isinstanceRRBRR9R:R7tmodule(Rtfunctmodule_name((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyR�scCst|j|j|�|S(N(R2RTR(RRU((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt__call__�s(RRR
RRW(((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyRR�s cCst|tjtf�r"t|�Syt|d�}Wn$tk
r[td|j��nX|j j
d�s�td||j f��n|j�}|t
ks�t�|tkr�||_n|j jdd�d}tjd|}t||j|�|Sd S(
sDecorator 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.
t__info__sKCan not override a type %s, which is not in a gobject
introspection typelibsgi.overridessUYou have tried override outside of the
overrides module. This is not allowed (%s,
%s)R5ii����sgi.repository.N(RSttypestFunctionTypeRRRRR+RBRRt
startswithtKeyErrort
get_g_typeRR>RtpytypeR9R:R7R2(ttype_tinfotg_typeR%RT((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytoverride�s(
cs"t����fd��}|S(s7Decorator
for marking methods and classes as
deprecatedcs0tjd�j�ftdd��||�S(Ns %s is
deprecated; use %s
insteadR)i(R,R-RR(targstkwargs(tfnR((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyR �s
(R(ReR(R ((ReR(s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt
deprecated�scCs#tj|g�j||f�dS(s: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(RCt
setdefaulttappend(R%R&R(((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyRP�sics%�������fd�}|S(sWrapper
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 s�|rKtjddj�t|�
��d��tt�|��}ni}|j|�g}xI�j�D];\}}||krq|j|�||<|j |�qqqqW|rtjddj�fd�t
|�D��djt
|��f�d��ng}xD�j�D]6\}}||kr�|||<|j |�qqW|r�tjddj�fd�t
|�D���d��nx*�D]"}||kr�|j|�q�q�W�||�S(s�Initializer
for a GObject based classes with support for property
sets through the use of explicit keyword arguments.
s�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/InitializerDeprecationss, R)s�The
keyword(s) "%s" have been deprecated in favor of "%s"
respectively. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecationsc3s|]}�|VqdS(N((t.0tk(tdeprecated_aliases(s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pys <genexpr>/ss�Initializer
is relying on deprecated non-standard defaults. Please update to explicitly
use: %s See:
https://wiki.gnome.org/PyGObject/InitializerDeprecationsc3s#|]}d|�|fVqdS(s%s=%sN((RiRj(tdeprecated_defaults(s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pys <genexpr>>s(R,R-tjointlentdicttzipRtitemsRDRhR( RRcRdt
new_kwargstaliases_usedtkeytaliast
defaults_usedR'(t arg_namestcategoryRkRltignoreR)tsuper_init_func(s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytnew_inits<
" #
((RzRwRyRkRlRxR)R{((RwRxRkRlRyR)Rzs;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytdeprecated_init�s!3cs(t������fd��}|S(sTranslate
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.
csa�||�}|dr>t|�dkr3|dS|dSn�rY��pPd��n�SdS(Niiiscall
failed(Rn(RcRdtret(texc_strtexc_typetfail_rettmethod(s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyR Rs
(R(R�RR~R�R ((R~RR�R�s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pytstrip_boolean_resultKs$(RYR,R?R:tpkgutilRtgiRtgi._giRt
gi._constantsRRRt__path__RRCRt
ModuleTypeRtobjectR!RQRRRbRfRPttupleR|R*R�(((s;/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyt<module>s. V #
Q