| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/hgdemandimport/__pycache__/ |
Upload File : |
a
�+�b� � @ s� d Z ddlmZ ddlZddlZddlZddlmZ da ej
dd� dkZG d d
� d
ejj
�ZG dd� de�Ze� ad
d� Zdd� Zdd� Zdd� Zejdd� �ZdS )a� Lazy loading for Python 3.6 and above.
This uses the new importlib finder/loader functionality available in Python 3.5
and up. The code reuses most of the mechanics implemented inside importlib.util,
but with a few additions:
* Allow excluding certain modules from lazy imports.
* Expose an interface that's substantially the same as demandimport for
Python 2.
This also has some limitations compared to the Python 2 implementation:
* Much of the logic is per-package, not per-module, so any packages loaded
before demandimport is enabled will not be lazily imported in the future. In
practice, we only expect builtins to be loaded before demandimport is
enabled.
� )�absolute_importN� )�tracingF� )� � c s e Zd ZdZ� fdd�Z� ZS )�
_lazyloaderexzaThis is a LazyLoader except it also follows the _deactivated global and
the ignore list.
c sX t �d|��8 ts|jtv r*| j�|� nt� �|� W d � n1 sJ0 Y dS )zMake the module load lazily.zdemandimport %sN)r �log�_deactivated�__name__�ignores�loader�exec_module�super)�self�module�� __class__� �D/usr/lib64/python3.9/site-packages/hgdemandimport/demandimportpy3.pyr 1 s z_lazyloaderex.exec_module)r �
__module__�__qualname__�__doc__r �
__classcell__r r r r r , s r c @ sR e Zd ZdZdZdd� Zdd� Zdd� ZeZd d
� Z dd� Z
d
d� Zddd�ZdS )�
LazyFindera2 A wrapper around a ``MetaPathFinder`` that makes loaders lazy.
``sys.meta_path`` finders have their ``find_spec()`` called to locate a
module. This returns a ``ModuleSpec`` if found or ``None``. The
``ModuleSpec`` has a ``loader`` attribute, which is called to actually
load a module.
Our class wraps an existing finder and overloads its ``find_spec()`` to
replace the ``loader`` with our lazy loader proxy.
We have to use __getattribute__ to proxy the instance because some meta
path finders don't support monkeypatching.
)�_finderc C s t �| d|� d S �Nr )�object�__setattr__)r �finderr r r �__init__K s zLazyFinder.__init__c C s dt �| d� S )Nz<LazyFinder for %r>r )r �__getattribute__�r r r r �__repr__N s zLazyFinder.__repr__c C s t t�| d��S r )�boolr r! r"