403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/pluggy/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/pluggy/__pycache__/_manager.cpython-39.pyc
a

Pi�a�9�@s�ddlZddlZddlZddlmZddlmZmZddlm	Z	m
Z
mZmZej
dkrdddlmZnddlZdd	�ZGd
d�de�ZGdd
�d
�ZGdd�d�Zdd�ZdS)�N�)�_tracing)�_Result�
_multicall)�HookImpl�
_HookRelay�_HookCaller�normalize_hookimpl_opts)����metadatacCs"tj|t|�|jj|jjd�dS)N)�lineno�filename)�warnings�
warn_explicit�type�__code__�co_firstlineno�co_filename)Zwarning�function�r�3/usr/lib/python3.9/site-packages/pluggy/_manager.py�_warn_for_functions�rcs eZdZdZ�fdd�Z�ZS)�PluginValidationErrorz�plugin failed validation.

    :param object plugin: the plugin which failed validation,
        may be a module or an arbitrary object.
    cs||_tt|��|�dS�N)�plugin�super�	Exception�__init__)�selfr�message��	__class__rrrszPluginValidationError.__init__)�__name__�
__module__�__qualname__�__doc__r�
__classcell__rrr"rrsrc@s6eZdZdZdd�Zedd��Zddd�Zd	d
�ZdS)�
DistFacadez$Emulate a pkg_resources DistributioncCs
||_dSr)�_dist)r �distrrrr'szDistFacade.__init__cCs
|jdS)N�namer�r rrr�project_name*szDistFacade.project_nameNcCst|j||�Sr)�getattrr*)r �attr�defaultrrr�__getattr__.szDistFacade.__getattr__cCstt|j�ddg�S)Nr*r.)�sorted�dirr*r-rrr�__dir__1szDistFacade.__dir__)N)	r$r%r&r'r�propertyr.r2r5rrrrr)$s

r)c@s�eZdZdZdd�Zdd�Zd3dd�Zd	d
�Zd4dd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd5d%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�ZdS)6�
PluginManagera�Core :py:class:`.PluginManager` class which manages registration
    of plugin objects and 1:N hook calling.

    You can register new hooks by calling :py:meth:`add_hookspecs(module_or_class)
    <.PluginManager.add_hookspecs>`.
    You can register plugin objects (which contain hooks) by calling
    :py:meth:`register(plugin) <.PluginManager.register>`.  The :py:class:`.PluginManager`
    is initialized with a prefix that is searched for in the names of the dict
    of registered plugin objects.

    For debugging purposes you can call :py:meth:`.PluginManager.enable_tracing`
    which will subsequently send debug information to the trace helper.
    cCs:||_i|_i|_g|_t���d�|_t�|_	t
|_dS)NZpluginmanage)r.�_name2plugin�_plugin2hookcallers�_plugin_distinforZ	TagTracer�get�tracer�hookr�_inner_hookexec)r r.rrrrDszPluginManager.__init__cCs|�||||�Sr�r>)r �	hook_name�methods�kwargs�firstresultrrr�	_hookexecMszPluginManager._hookexecNc	Cs|p|�|�}||jvs"||jvrL|j�|d�dur8dStd|||jf��||j|<g|j|<}t|�D]�}|�||�}|durlt|�t||�}t	||||�}|�d�p�|}t|j
|d�}|dur�t||j�}t
|j
||�n |���r|�||�|�|�|�|�|�|�ql|S)z�Register a plugin and return its canonical name or ``None`` if the name
        is blocked from registering.  Raise a :py:class:`ValueError` if the plugin
        is already registered.���Nz#Plugin already registered: %s=%s
%sZspecname)�get_canonical_namer8r9r;�
ValueErrorr4�parse_hookimpl_optsr	r/rr=rrD�setattr�has_spec�_verify_hookZ_maybe_apply_history�
_add_hookimpl�append)	r rr,�plugin_nameZhookcallersZ
hookimpl_opts�method�hookimplr=rrr�registerRs8
��




zPluginManager.registercCs`t||�}t�|�sdSzt||jdd�}WntyDi}Yn0|dur\t|t�s\d}|S)NZ_impl)r/�inspectZ	isroutiner.r�
isinstance�dict)r rr,rO�resrrrrHxs


z!PluginManager.parse_hookimpl_optscCsj|dur"|dusJd��|�|�}|dur4|�|�}|j�|�rH|j|=|j�|g�D]}|�|�qV|S)zlunregister a plugin object and all its contained hook implementations
        from internal data structures.Nz+one of name or plugin needs to be specified)�get_name�
get_pluginr8r;r9�popZ_remove_plugin)r rr,Z
hookcallerrrr�
unregister�s

zPluginManager.unregistercCs|j|d�d|j|<dS)zHblock registrations of the given name, unregister if already registered.�r,N)rYr8�r r,rrr�set_blocked�szPluginManager.set_blockedcCs||jvo|j|duS)z4return ``True`` if the given plugin name is blocked.N)r8r[rrr�
is_blocked�szPluginManager.is_blockedcCs�g}t|�D]~}|�||�}|durt|j|d�}|durZt||j||�}t|j||�n&|�||�|��D]}|�	||�qn|�
|�q|s�td|j�d|����dS)z�add new hook specifications defined in the given ``module_or_class``.
        Functions are recognized if they have been decorated accordingly.Nzdid not find any z
 hooks in )
r4�parse_hookspec_optsr/r=rrDrIZset_specification�
get_hookimplsrKrMrGr.)r �module_or_class�namesr,Z	spec_opts�hcZhookfunctionrrr�
add_hookspecs�s �zPluginManager.add_hookspecscCst||�}t||jdd�S)NZ_spec)r/r.)r r`r,rOrrrr^�s
z!PluginManager.parse_hookspec_optscCs
t|j�S)z%return the set of registered plugins.)�setr9r-rrr�get_plugins�szPluginManager.get_pluginscCs
||jvS)z4Return ``True`` if the plugin is already registered.)r9�r rrrr�
is_registered�szPluginManager.is_registeredcCst|dd�ptt|��S)aVReturn canonical name for a plugin object. Note that a plugin
        may be registered under a different name which was specified
        by the caller of :py:meth:`register(plugin, name) <.PluginManager.register>`.
        To obtain the name of an registered plugin use :py:meth:`get_name(plugin)
        <.PluginManager.get_name>` instead.r$N)r/�str�idrfrrrrF�sz PluginManager.get_canonical_namecCs|j�|�S)z/Return a plugin or ``None`` for the given name.)r8r;r[rrrrW�szPluginManager.get_plugincCs|�|�duS)z>Return ``True`` if a plugin with the given name is registered.N)rWr[rrr�
has_plugin�szPluginManager.has_plugincCs(|j��D]\}}||kr
|Sq
dS)z@Return name for registered plugin or ``None`` if not registered.N)r8�items)r rr,�valrrrrV�szPluginManager.get_namecCs�|��r&|jr&t|jd|j|jf��|jjr>t|jj|j	�t
|j�t
|jj�}|rzt|jd|j|jt|j	�|f��|jr�t
�|j	�s�t|jd|j|jt|j	�f��dS)Nz6Plugin %r
hook %r
historic incompatible to hookwrapperz~Plugin %r for hook %r
hookimpl definition: %s
Argument(s) %s are declared in the hookimpl but can not be found in the hookspeczsPlugin %r for hook %r
hookimpl definition: %s
Declared as hookwrapper=True but function is not a generator function)Zis_historicZhookwrapperrrrNr,�specZwarn_on_implrrrdZargnames�
_formatdefrRZisgeneratorfunction)r r=rPZ	notinspecrrrrK�s8
�����
��zPluginManager._verify_hookcCs\|jjD]N}|ddkrt|j|�}|��s|��D] }|js4t|jd||jf��q4qdS)z�Verify that all hooks which have not been verified against
        a hook specification are optional, otherwise raise :py:class:`.PluginValidationError`.r�_zunknown hook %r in plugin %rN)r=�__dict__r/rJr_Zoptionalhookrr)r r,r=rPrrr�
check_pending�s��zPluginManager.check_pendingcCs�d}tt���D]z}|jD]n}|j|ks|dur:|j|ks|�|j�s|�|j�rTq|��}|j	||jd�|j
�|t|�f�|d7}qq|S)a*Load modules from querying the specified setuptools ``group``.

        :param str group: entry point group to load plugins
        :param str name: if given, loads only plugins with the given ``name``.
        :rtype: int
        :return: return the number of loaded plugins by this call.
        rNrZr)
�list�importlib_metadataZ
distributionsZentry_points�groupr,rWr]�loadrQr:rMr))r rtr,�countr+Zeprrrr�load_setuptools_entrypointss&
���
�
�z)PluginManager.load_setuptools_entrypointscCs
t|j�S)zTreturn list of distinfo/plugin tuples for all setuptools registered
        plugins.)rrr:r-rrr�list_plugin_distinfo%sz"PluginManager.list_plugin_distinfocCst|j���S)z!return list of name/plugin pairs.)rrr8rkr-rrr�list_name_plugin*szPluginManager.list_name_plugincCs|j�|�S)z.get all hook callers for the specified plugin.)r9r;rfrrr�get_hookcallers.szPluginManager.get_hookcallerscs.�j����fdd�}|�_��fdd�}|S)aPadd before/after tracing functions for all hooks
        and return an undo function which, when called,
        will remove the added tracers.

        ``before(hook_name, hook_impls, kwargs)`` will be called ahead
        of all hook calls and receive a hookcaller instance, a list
        of HookImpl instances and the keyword arguments for the hook call.

        ``after(outcome, hook_name, hook_impls, kwargs)`` receives the
        same arguments as ``before`` but also a :py:class:`pluggy._callers._Result` object
        which represents the result of the overall hook call.
        cs<�����t������fdd��}�|����|��S)Ncs������Srrr)rC�
hook_implsr@rB�oldcallrr�<lambda>D�zPPluginManager.add_hookcall_monitoring.<locals>.traced_hookexec.<locals>.<lambda>)rZ	from_call�
get_result)r@r{rBrC�outcome)�after�beforer|)rCr{r@rBr�traced_hookexecAs�z>PluginManager.add_hookcall_monitoring.<locals>.traced_hookexeccs
��_dSrr?r)r|r rr�undoKsz3PluginManager.add_hookcall_monitoring.<locals>.undor?)r r�r�r�r�r)r�r�r|r r�add_hookcall_monitoring2s

z%PluginManager.add_hookcall_monitoringcs2|jj�d���fdd�}�fdd�}|�||�S)z9enable tracing of hook calls and return an undo function.r=cs�jjd7_�||�dS)Nr)�root�indent)r@rArB�Z	hooktracerrr�Tsz,PluginManager.enable_tracing.<locals>.beforecs0|jdur�d|d|����jjd8_dS)NZfinishz-->r)�excinforr�r�)r�r@rArBr�rrr�Xs
z+PluginManager.enable_tracing.<locals>.after)r<r�r;r�)r r�r�rr�r�enable_tracingPszPluginManager.enable_tracingcs~t|j��}�fdd�|D�}|rzt|j|j|jj|jj�}|��D]0}|j	}||vrD|�
|�|j�|g��
|�qD|S|S)z�Return a new :py:class:`._hooks._HookCaller` instance for the named method
        which manages calls to all registered plugins except the
        ones from remove_plugins.csg|]}t|��r|�qSr)�hasattr)�.0ZplugrZrr�
<listcomp>dr~z4PluginManager.subset_hook_caller.<locals>.<listcomp>)r/r=rr,rDrm�	namespaceZoptsr_rrLr9�
setdefaultrM)r r,Zremove_pluginsZorigZplugins_to_removerbrPrrrZr�subset_hook_caller_s�
z PluginManager.subset_hook_caller)N)NN)N)r$r%r&r'rrDrQrHrYr\r]rcr^rergrFrWrjrVrKrqrwrxryrzr�r�r�rrrrr75s2	
&
#
r7cCs|j�t�|���Sr)r$rRZ	signature)�funcrrrrntsrn)rR�sysr�rZ_callersrrZ_hooksrrrr	�version_info�	importlibr
rsrrrr)r7rnrrrr�<module>s
	A

Youez - 2016 - github.com/yon3zu
LinuXploit