Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/demandimport.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��@s�dZddlZeZe�Zyeejiidd�Wnek
rZd�Z	nXeZ	defd��YZ
ddddd�Zddd	d
ddd
dddddddgZd�Z
d�ZdS(sU
demandimport - automatic demandloading of modules

To enable this module, do:

  import demandimport; demandimport.enable()

Imports of the following forms will be demand-loaded:

  import a, b.c
  import a.b as c
  from a import b,c # a will be loaded immediately

These imports will not be delayed:

  from a import *
  b = __import__(a)
i�NcCst||||�S(s'call _origimport with no level argument(t_origimport(tnametglobalstlocalstfromlisttlevel((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt_import#st
_demandmodcBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(smodule demand-loader and proxycCsrd|kr0|jdd�\}}|g}n|}g}tj|d||||f�tj|dd�dS(Nt.it_datat_module(tsplittobjectt__setattr__tNone(tselfRRRtheadtresttafter((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt__init__+scCs|jdj|�dS(s%add to the list of submodules to loadiN(R	tappend(RR((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt_extend4scs�|js�|j\}}}}t|||�}�fd��x|D]}�||�qFW|r�|j|�|kr�|||<ntj|d|�ndS(Ncs�|d}}d|kr4|jdd�\}}nt||t�tkrqt||t||j|j��n|r��t||�|�ndS(NRi(RRtgetattrtnothingtsetattrRt__dict__(tmodtpthtt(tsubload(s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR<s
%R
(R
R	RtgetRR
(RRRRRRtx((Rs:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt_load7s		

cCs'|jrd|jdSd|jdS(Ns<proxied module '%s'>is<unloaded module '%s'>(R
R	(R((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt__repr__Ms	cOstdt|���dS(Ns%s object is not callable(t	TypeErrortrepr(Rtargstkwargs((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt__call__QscCs6|dkrtj||�S|j�t|j|�S(NR	RR!R
(s_datas_extends_loads_module(Rt__getattribute__R!RR
(Rtattr((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR(Ss
cCs!|j�t|j||�dS(N(R!RR
(RR)tval((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR
Xs
(
t__name__t
__module__t__doc__RRR!R"R'R(R
(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR)s							c

Cs�|s|tks|dkr5t|||||�S|s�|kr�|jdd�\}}|r�|jdd�|kr�t|||||�S||kr�t||t�r�||j|�n||Snt|||�S|dkrt|||||�St|||�}xg|jd�dD]R}t	||t
�t
krlt||t||j|j��nt	||�}q)WxH|D]@}	t	||	t
�t
kr�t||	t|	|j|��q�q�W|SdS(Nt*RiR+i�(R.(
tignoreRRRRt
isinstanceRRRRRRR(
RRRRRtbaseRRtcompR ((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt
_demandimport\s.%
&t_hashlibt_xmlplustfcntlswin32com.gen_pyt_winregt	pythoncomtpwdtgrptresourcetgtkt__main__t_ssltrfc822t	mimetoolscCs
tt_dS(s'enable global demand-loading of modulesN(R3t__builtin__t
__import__(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pytenable�scCs
tt_dS(s(disable global demand-loading of modulesN(RRARB(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pytdisable�s(R-RARBRRRR+RR#RRR3R/RCRD(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt<module>s4	

3#		

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.