| Server IP : 217.160.0.135 / Your IP : 216.73.217.37 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/stevedore/__pycache__/ |
Upload File : |
�
��OcQ � �F � d dl mZ d dl mZ d dlmZ G d� de� � ZdS )� )�MultipleMatches)� NoMatches)�NamedExtensionManagerc � � � e Zd ZdZddi dddf� fd� Zed� � � Ze d
� fd � � � Z� fd
�Z d� Z
ed� � � Z� xZ
S )�
DriverManagera Load a single plugin with a given name from the namespace.
:param namespace: The namespace for the entry points.
:type namespace: str
:param name: The name of the driver to load.
:type name: str
:param invoke_on_load: Boolean controlling whether to invoke the
object returned by the entry point after the driver is loaded.
:type invoke_on_load: bool
:param invoke_args: Positional arguments to pass when invoking
the object returned by the entry point. Only used if invoke_on_load
is True.
:type invoke_args: tuple
:param invoke_kwds: Named arguments to pass when invoking
the object returned by the entry point. Only used if invoke_on_load
is True.
:type invoke_kwds: dict
:param on_load_failure_callback: Callback function that will be called when
an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
:param verify_requirements: Use setuptools to enforce the
dependencies of the plugin(s) being loaded. Defaults to False.
:type verify_requirements: bool
:type warn_on_missing_entrypoint: bool
F� NTc
�| �� |p| j }t t | � � � ||g||||||�� � d S )N)� namespace�names�invoke_on_load�invoke_args�invoke_kwds�on_load_failure_callback�verify_requirements�warn_on_missing_entrypoint)�_default_on_load_failure�superr �__init__)
�selfr
�namer r
r r r r � __class__s
��2/usr/lib/python3/dist-packages/stevedore/driver.pyr zDriverManager.__init__/ sc �� �
$<� $-��,� !�
�m�T�"�"�+�+���&�)�#�#�%=� 3�'A� ,�
�
�
�
�
� c � � � �Nr )�
drivermanager�ep�errs r r z&DriverManager._default_on_load_failureA s � �
r �TESTINGc �d �� t t | � � � |g||||�� � }|S )a� Construct a test DriverManager
Test instances are passed a list of extensions to work from rather
than loading them from entry points.
:param extension: Pre-configured Extension instance
:type extension: :class:`~stevedore.extension.Extension`
:param namespace: The namespace for the manager; used only for
identification since the extensions are passed in.
:type namespace: str
:param propagate_map_exceptions: Boolean controlling whether exceptions
are propagated up through the map call or whether they are logged
and then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will
be called when an entrypoint can not be loaded. The
arguments that will be provided when this is called (when
an entrypoint fails to load) are (manager, entrypoint,
exception)
:type on_load_failure_callback: function
:param verify_requirements: Use setuptools to enforce the
dependencies of the plugin(s) being loaded. Defaults to False.
:type verify_requirements: bool
:return: The manager instance, initialized for testing
)r
�propagate_map_exceptionsr r )r r �make_test_instance)�cls� extensionr
r! r r �or s �r r"