403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pluggy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pluggy/__pycache__/_manager.cpython-311.pyc
�

y]&a�9����ddlZddlZddlZddlmZddlmZmZddlm	Z	m
Z
mZmZej
dkrddlmZnddlZd�ZGd	�d
e��ZGd�d��ZGd
�d��Zd�ZdS)�N�)�_tracing)�_Result�
_multicall)�HookImpl�
_HookRelay�_HookCaller�normalize_hookimpl_opts)����metadatac�x�tj|t|��|jj|jj���dS)N)�lineno�filename)�warnings�
warn_explicit�type�__code__�co_firstlineno�co_filename)�warning�functions  �1/usr/lib/python3/dist-packages/pluggy/_manager.py�_warn_for_functionrsD������W�
�
�� �/��"�.�	������c�"��eZdZdZ�fd�Z�xZS)�PluginValidationErrorz�plugin failed validation.

    :param object plugin: the plugin which failed validation,
        may be a module or an arbitrary object.
    c�f��||_tt|���|��dS�N)�plugin�super�	Exception�__init__)�selfr!�message�	__class__s   �rr$zPluginValidationError.__init__s.������
�i����'�'��0�0�0�0�0r)�__name__�
__module__�__qualname__�__doc__r$�
__classcell__)r's@rrrsB���������1�1�1�1�1�1�1�1�1rrc�<�eZdZdZd�Zed���Zdd�Zd�ZdS)�
DistFacadez$Emulate a pkg_resources Distributionc��||_dSr )�_dist)r%�dists  rr$zDistFacade.__init__'s
����
�
�
rc��|jdS)N�namer
�r%s r�project_namezDistFacade.project_name*s���}�V�$�$rNc�.�t|j||��Sr )�getattrr0)r%�attr�defaults   r�__getattr__zDistFacade.__getattr__.s���t�z�4��1�1�1rc�N�tt|j��ddgz��S)Nr0r5)�sorted�dirr0r4s r�__dir__zDistFacade.__dir__1s"���c�$�*�o�o��.�(A�A�B�B�Brr )	r(r)r*r+r$�propertyr5r:r>�rrr.r.$sl������.�.�����%�%��X�%�2�2�2�2�C�C�C�C�Crr.c��eZdZdZd�Zd�Zdd�Zd�Zdd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�
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.
    c���||_i|_i|_g|_t	j���d��|_t��|_	t|_dS)N�pluginmanage)r5�_name2plugin�_plugin2hookcallers�_plugin_distinfor�	TagTracer�get�tracer�hookr�_inner_hookexec)r%r5s  rr$zPluginManager.__init__DsY��(������#%�� � "����'�)�)�-�-�n�=�=��
��L�L��	�)����rc�2�|�||||��Sr �rL)r%�	hook_name�methods�kwargs�firstresults     r�	_hookexeczPluginManager._hookexecMs���#�#�I�w���L�L�LrNc�:�|p|�|��}||jvs	||jvr:|j�|d���dSt	d|�d|�d|j�����||j|<gx|j|<}t|��D�]}|�||��}|��t|��t||��}t||||��}|�d��p|}t|j
|d��}|�,t||j��}t|j
||��n?|���r+|�||��|�|��|�|��|�|����|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.���NzPlugin already registered: �=�
�specname)�get_canonical_namerErFrI�
ValueErrorr=�parse_hookimpl_optsr
r7rrKr	rS�setattr�has_spec�_verify_hook�_maybe_apply_history�
_add_hookimpl�append)	r%r!r3�plugin_name�hookcallers�
hookimpl_opts�method�hookimplrKs	         r�registerzPluginManager.registerRs����=�d�5�5�f�=�=���$�+�+�+�v��9Q�/Q�/Q�� �$�$�[�"�5�5�=����*��;�;�����(9�(9�;���
�*0���+�&�:<�;�� ��(�;���K�K�	)�	)�D� �4�4�V�T�B�B�M��(�'�
�6�6�6� ���.�.��#�F�K���O�O��$�(�(��4�4�<����t�y�$��5�5���<�&�t�T�^�<�<�D��D�I�t�T�2�2�2�2��]�]�_�_�8��%�%�d�H�5�5�5��-�-�h�7�7�7��"�"�8�,�,�,��"�"�4�(�(�(���rc���t||��}tj|��sdS	t||jdzd��}n#t$ri}YnwxYw|�t|t��sd}|S)N�_impl)r7�inspect�	isroutiner5r#�
isinstance�dict)r%r!r3re�ress     rr[z!PluginManager.parse_hookimpl_optsxs������&�&��� ��(�(�	��F�	��&�$�"3�g�"=�t�D�D�C�C���	�	�	��C�C�C�	�����?�:�c�4�#8�#8�?��C��
s�A�A�Ac�$�|�!|�
Jd���|�|��}|�|�|��}|j�|��r|j|=|j�|g��D]}|�|���|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_pluginrErIrF�pop�_remove_plugin)r%r!r3�
hookcallers    r�
unregisterzPluginManager.unregister�s����<��%�%�'T�%�%�%��=�=��(�(�D��>��_�_�T�*�*�F��� � ��&�&�	(��!�$�'��2�6�6�v�r�B�B�	.�	.�J��%�%�f�-�-�-�-��
rc�F�|�|���d|j|<dS)zHblock registrations of the given name, unregister if already registered.�r3N)rurE�r%r3s  r�set_blockedzPluginManager.set_blocked�s)�����T��"�"�"�"&���$���rc�2�||jvo|j|duS)z4return ``True`` if the given plugin name is blocked.N)rErxs  r�
is_blockedzPluginManager.is_blocked�s"���t�(�(�L�T�->�t�-D��-L�Lrc���g}t|��D]�}|�||��}|��t|j|d��}|�.t	||j||��}t
|j||��nC|�||��|���D]}|�	||���|�
|����|std|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 )
r=�parse_hookspec_optsr7rKr	rSr\�set_specification�
get_hookimplsr^rarZr5)r%�module_or_class�namesr3�	spec_opts�hc�hookfunctions       r�
add_hookspecszPluginManager.add_hookspecs�s������(�(�	#�	#�D��0�0��$�G�G�I��$��T�Y��d�3�3���:�$�T�4�>�?�I�V�V�B��D�I�t�R�0�0�0�0��(�(��)�D�D�D�(*�(8�(8�(:�(:�<�<���)�)�"�l�;�;�;�;����T�"�"�"���	��V�D�$5�V�V�?�V�V���
�	�	rc�T�t||��}t||jdzd��S)N�_spec)r7r5)r%r�r3res    rr}z!PluginManager.parse_hookspec_opts�s+����$�/�/���v�t�0�7�:�D�A�A�Arc�*�t|j��S)z%return the set of registered plugins.)�setrFr4s r�get_pluginszPluginManager.get_plugins�s���4�+�,�,�,rc��||jvS)z4Return ``True`` if the plugin is already registered.)rF�r%r!s  r�
is_registeredzPluginManager.is_registered�s����1�1�1rc�\�t|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)r7�str�idr�s  rrYz PluginManager.get_canonical_name�s'���v�z�4�0�0�C�C��6�
�
�O�O�Crc�6�|j�|��S)z/Return a plugin or ``None`` for the given name.)rErIrxs  rrqzPluginManager.get_plugin�s��� �$�$�T�*�*�*rc�0�|�|��duS)z>Return ``True`` if a plugin with the given name is registered.N)rqrxs  r�
has_pluginzPluginManager.has_plugin�s�����t�$�$�D�0�0rc�X�|j���D]\}}||kr|cS�dS)z@Return name for registered plugin or ``None`` if not registered.N)rE�items)r%r!r3�vals    rrpzPluginManager.get_name�sE���*�0�0�2�2�	�	�I�D�#���}�}������	�	rc�t�|���r-|jr&t|jd|j�d|j�d����|jjrt|jj|j	��t|j��t|jj��z
}|r>t|jd|j�d|j�dt|j	���d|�d�	���|jrTtj|j	��s=t|jd|j�d|j�dt|j	���d����dSdS)	NzPlugin z
hook z%
historic incompatible to hookwrapperz
 for hook z
hookimpl definition: z
Argument(s) zB are declared in the hookimpl but can not be found in the hookspeczF
Declared as hookwrapper=True but function is not a generator function)�is_historic�hookwrapperrr!rbr3�spec�warn_on_implrrr��argnames�
_formatdefrj�isgeneratorfunction)r%rKrf�	notinspecs    rr^zPluginManager._verify_hook�st�������	�(�"6�	�'�����'�'�'�����4���
��9�!�	J��t�y�5�x�7H�I�I�I���)�*�*�S���1C�-D�-D�D�	��	�'����
�(�(�(��I�I�I��x�0�1�1�1�1��I�I����
���	��(C�H�DU�(V�(V�	�'�����'�'�'�����J�x�?P�4Q�4Q�4Q�4Q�S���
�	�	�	�	rc	�
�|jjD]u}|ddkrgt|j|��}|���s>|���D])}|js t
|jd|�d|j������*�vdS)z�Verify that all hooks which have not been verified against
        a hook specification are optional, otherwise raise :py:class:`.PluginValidationError`.r�_z
unknown hook z in plugin N)rK�__dict__r7r]r�optionalhookrr!)r%r3rKrfs    r�
check_pendingzPluginManager.check_pending�s����I�&�
	�
	�D��A�w�#�~�~��t�y�$�/�/���}�}����$(�$6�$6�$8�$8����'�4��"7� (���#'�4�4����!:�#�#����
	�
	rc��d}ttj����D]�}|jD]�}|j|ksA|�|j|ks4|�|j��s|�|j��r�O|���}|�	||j���|j
�|t|��f��|dz
}����|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.
        rNrwr)
�list�importlib_metadata�
distributions�entry_points�groupr3rqr{�loadrgrGrar.)r%r�r3�countr1�epr!s       r�load_setuptools_entrypointsz)PluginManager.load_setuptools_entrypointss������+�9�;�;�<�<�
	�
	�D��'�
�
���H��%�%��(�R�W��_�_����r�w�/�/�.=����r�w�/�/�.=�
��������
�
�f�2�7�
�3�3�3��%�,�,�f�j��6F�6F�-G�H�H�H���
���
��rc�*�t|j��S)zTreturn list of distinfo/plugin tuples for all setuptools registered
        plugins.)r�rGr4s r�list_plugin_distinfoz"PluginManager.list_plugin_distinfo%s���D�)�*�*�*rc�N�t|j�����S)z!return list of name/plugin pairs.)r�rEr�r4s r�list_name_pluginzPluginManager.list_name_plugin*s���D�%�+�+�-�-�.�.�.rc�6�|j�|��S)z.get all hook callers for the specified plugin.)rFrIr�s  r�get_hookcallerszPluginManager.get_hookcallers.s���'�+�+�F�3�3�3rc�D������j����fd�}|�_��fd�}|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.
        c�������������tj�����fd���}�|�����|���S)Nc� ���������Sr r@)rR�
hook_implsrOrQ�oldcalls�����r�<lambda>zPPluginManager.add_hookcall_monitoring.<locals>.traced_hookexec.<locals>.<lambda>Ds�����	�:�v�{�K�K�r)r�	from_call�
get_result)rOr�rQrR�outcome�after�beforer�s```` ���r�traced_hookexecz>PluginManager.add_hookcall_monitoring.<locals>.traced_hookexecAso��������F�9�j�&�1�1�1��'�K�K�K�K�K�K�K�K���G�
�E�'�9�j�&�9�9�9��%�%�'�'�'rc�����_dSr rN)r�r%s��r�undoz3PluginManager.add_hookcall_monitoring.<locals>.undoKs���#*�D� � � rrN)r%r�r�r�r�r�s```  @r�add_hookcall_monitoringz%PluginManager.add_hookcall_monitoring2sb�������&��	(�	(�	(�	(�	(�	(�	(� /���	+�	+�	+�	+�	+�	+��rc���|jj�d����fd�}�fd�}|�||��S)z9enable tracing of hook calls and return an undo function.rKc�J���jxjdz
c_�||��dS)Nr)�root�indent)rOrPrQ�	hooktraces   �rr�z,PluginManager.enable_tracing.<locals>.beforeTs1����N�!�!�Q�&�!�!��I�i��(�(�(�(�(rc���|j� �d|d|������jxjdzc_dS)N�finishz-->r)�excinfor�r�r�)r�rOrPrQr�s    �rr�z+PluginManager.enable_tracing.<locals>.afterXsI�����&��	�(�I�u�g�6H�6H�6J�6J�K�K�K��N�!�!�Q�&�!�!�!�!r)rJr�rIr�)r%r�r�r�s   @r�enable_tracingzPluginManager.enable_tracingPsd����J�O�'�'��/�/�	�	)�	)�	)�	)�	)�	'�	'�	'�	'�	'�
�+�+�F�E�:�:�:rc���t|j���}�fd�|D��}|r�t|j|j|jj|jj��}|���D]P}|j	}||vrC|�
|��|j�|g���
|���Q|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.c�4��g|]}t|����|��Sr@)�hasattr)�.0�plugr3s  �r�
<listcomp>z4PluginManager.subset_hook_caller.<locals>.<listcomp>ds(���T�T�T�d���d�@S�@S�T�T�T�T�Tr)r7rKr	r3rSr��	namespace�optsrr!r`rF�
setdefaultra)r%r3�remove_plugins�orig�plugins_to_remover�rfr!s `      r�subset_hook_callerz PluginManager.subset_hook_caller_s�����t�y�$�'�'��T�T�T�T�n�T�T�T���	���	�4�>�4�9�+>��	����B�!�.�.�0�0�
O�
O��!����!2�2�2��$�$�X�.�.�.��,�7�7���C�C�J�J�2�N�N�N���I��rr )NN)r(r)r*r+r$rSrgr[ruryr{r�r}r�r�rYrqr�rpr^r�r�r�r�r�r�r�r�r@rrrBrB5s���������*�*�*�M�M�M�
$�$�$�$�L�������&'�'�'�
M�M�M����.B�B�B�-�-�-�2�2�2�D�D�D�+�+�+�1�1�1����!�!�!�F
�
�
�����2+�+�+�
/�/�/�4�4�4����<
;�
;�
;�����rrBc�<�|j�tj|����Sr )r(rj�	signature)�funcs rr�r�ts ���m�6�W�.�t�4�4�6�6�6r)rj�sysr�r�_callersrr�_hooksrrr	r
�version_info�	importlibrr�rr#rr.rBr�r@rr�<module>r�sP������
�
�
�
�����������)�)�)�)�)�)�)�)�N�N�N�N�N�N�N�N�N�N�N�N���v���8�8�8�8�8�8�8��������	1�	1�	1�	1�	1�I�	1�	1�	1�C�C�C�C�C�C�C�C�"|�|�|�|�|�|�|�|�~	7�7�7�7�7r

Youez - 2016 - github.com/yon3zu
LinuXploit