File "_bootstrap.cpython-35.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python35/lib64/python3.5/importlib/__pycache__/_bootstrap.cpython-35.pyc
File size: 31 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit



Yf@sdZdaddZddZGdddZiZiZGdd	d	eZGd
ddZ	Gdd
d
Z
GdddZddZddZ
ddZddddZddZddZddZd d!ZGd"d#d#ZGd$d%d%Zd&dd'dd(d)ZeZddd*d+Zd,d-d.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Z Gd<d=d=Z!Gd>d?d?Z"Gd@dAdAZ#dBdCZ$dDdEZ%ddFdGZ&dHdIZ'dJZ(e(dKZ)dLdMZ*dNdOZ+ddPdQdRZ,dSdTZ-dUdVZ.ddfdPdWdXZ/dYdZZ0d[d\Z1d]d^Z2dS)_aSCore implementation of import.

This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing version of this module.

NcCs\xBddddgD].}t||rt||t||qW|jj|jdS)z/Simple substitute for functools.update_wrapper.
__module____name____qualname____doc__N)hasattrsetattrgetattr__dict__update)newoldreplacer
9/opt/alt/python35/lib64/python3.5/importlib/_bootstrap.py_wrapsrcCstt|S)N)typesys)namer
r
r_new_module#src@s:eZdZdZddZddZddZdS)	
_ManageReloadz?Manages the possible clean-up of sys.modules for load_module().cCs
||_dS)N)_name)selfrr
r
r__init__+sz_ManageReload.__init__cCs|jtjk|_dS)N)rrmodules
_is_reload)rr
r
r	__enter__.sz_ManageReload.__enter__cGsMtdd|DrI|jrIytj|j=Wntk
rHYnXdS)Ncss|]}|dk	VqdS)Nr
).0argr
r
r	<genexpr>2sz)_ManageReload.__exit__.<locals>.<genexpr>)anyrrrrKeyError)rargsr
r
r__exit__1s
#
z_ManageReload.__exit__N)rrrrrrr!r
r
r
rr'src@seZdZdS)_DeadlockErrorN)rrrr
r
r
rr"@sr"c@sReZdZdZddZddZddZdd	Zd
dZdS)
_ModuleLockzA recursive lock implementation which is able to detect deadlocks
    (e.g. thread 1 trying to take locks A then B, and thread 2 trying to
    take locks B then A).
    cCsFtj|_tj|_||_d|_d|_d|_dS)N)_thread
allocate_locklockwakeuprownercountwaiters)rrr
r
rrJs			z_ModuleLock.__init__cCsXtj}|j}x<tj|}|dkr7dS|j}||krdSqWdS)NFT)r%	get_identr)_blocking_onget)rmetidr'r
r
rhas_deadlockRs		z_ModuleLock.has_deadlockcCstj}|t|<zx|j||jdksD|j|kr`||_|jd7_dS|jr|td||jj	dr|j
d7_
WdQRX|jj	|jjqWWdt|=XdS)z
        Acquire the module lock.  If a potential deadlock is detected,
        a _DeadlockError is raised.
        Otherwise, the lock is always acquired and True is returned.
        r$Tzdeadlock detected by %rFN)r%r,r-r'r*r)r1r"r(acquirer+release)rr0r
r
rr3^s 

	
z_ModuleLock.acquirec
Cstj}|j|j|kr1td|jdksFt|jd8_|jdkrd|_|jr|jd8_|jj	WdQRXdS)Nzcannot release un-acquired lockr$r2)
r%r,r'r)RuntimeErrorr*AssertionErrorr+r(r4)rr0r
r
rr4ws
		z_ModuleLock.releasecCsdj|jt|S)Nz_ModuleLock({!r}) at {})formatrid)rr
r
r__repr__sz_ModuleLock.__repr__N)	rrrrrr1r3r4r9r
r
r
rr#Ds
r#c@sFeZdZdZddZddZddZdd	Zd
S)_DummyModuleLockzVA simple _ModuleLock equivalent for Python builds without
    multi-threading support.cCs||_d|_dS)Nr$)rr*)rrr
r
rrs	z_DummyModuleLock.__init__cCs|jd7_dS)Nr2T)r*)rr
r
rr3sz_DummyModuleLock.acquirecCs.|jdkrtd|jd8_dS)Nr$zcannot release un-acquired lockr2)r*r5)rr
r
rr4sz_DummyModuleLock.releasecCsdj|jt|S)Nz_DummyModuleLock({!r}) at {})r7rr8)rr
r
rr9sz_DummyModuleLock.__repr__N)rrrrrr3r4r9r
r
r
rr:s
r:c@s4eZdZddZddZddZdS)_ModuleLockManagercCs||_d|_dS)N)r_lock)rrr
r
rrs	z_ModuleLockManager.__init__c
Cs5zt|j|_WdtjX|jjdS)N)_get_module_lockrr<_imprelease_lockr3)rr
r
rrsz_ModuleLockManager.__enter__cOs|jjdS)N)r<r4)rr kwargsr
r
rr!sz_ModuleLockManager.__exit__N)rrrrrr!r
r
r
rr;sr;csd}yt}Wntk
r+YnX|dkrtdkrSt}nt}fdd}tj||t<|S)zmGet or create the module lock for a given module name.

    Should only be called with the import lock taken.Ncst=dS)N)
_module_locks)_)rr
rcbsz_get_module_lock.<locals>.cb)rArr%r:r#_weakrefref)rr'rCr
)rrr=s
r=cCsGt|}tjy|jWntk
r8YnX|jdS)aRelease the global import lock, and acquires then release the
    module lock for a given module name.
    This is used to ensure a module is completely initialized, in the
    event it is being imported by another thread.

    Should only be called with the import lock taken.N)r=r>r?r3r"r4)rr'r
r
r_lock_unlock_modules

rFcOs
|||S)a.remove_importlib_frames in import.c will always remove sequences
    of importlib frames that end with a call to this function

    Use it instead of a normal call in places where including the importlib
    frames introduces unwanted noise into the traceback (e.g. when executing
    module code)
    r
)fr kwdsr
r
r_call_with_frames_removedsrI	verbosityr2cGsKtjj|krG|jds+d|}t|j|dtjdS)z=Print the message to stderr if -v/PYTHONVERBOSE is turned on.#import z# fileN)rKrL)rflagsverbose
startswithprintr7stderr)messagerJr r
r
r_verbose_messages
rTcs#fdd}t||S)z1Decorator to verify the named module is built-in.cs7|tjkr*tdj|d|||S)Nz{!r} is not a built-in moduler)rbuiltin_module_namesImportErrorr7)rfullname)fxnr
r_requires_builtin_wrappers	z4_requires_builtin.<locals>._requires_builtin_wrapper)r)rXrYr
)rXr_requires_builtins
rZcs#fdd}t||S)z/Decorator to verify the named module is frozen.cs7tj|s*tdj|d|||S)Nz{!r} is not a frozen moduler)r>	is_frozenrVr7)rrW)rXr
r_requires_frozen_wrappers	z2_requires_frozen.<locals>._requires_frozen_wrapper)r)rXr\r
)rXr_requires_frozens
r]cCsQt||}|tjkrCtj|}t||tj|St|SdS)zLoad the specified module into sys.modules and return it.

    This method is deprecated.  Use loader.exec_module instead.

    N)spec_from_loaderrr_exec_load)rrWspecmoduler
r
r_load_module_shims

rcc#Cst|dd}t|drGy|j|SWntk
rFYnXy
|j}Wntk
rhYnX|dk	rt|Sy
|j}Wntk
rd}YnXy
|j}Wn;tk
r|dkrdj	|Sdj	||SYnXdj	||SdS)N
__loader__module_repr?z
<module {!r}>z<module {!r} ({!r})>z<module {!r} from {!r}>)
rrre	Exception__spec__AttributeError_module_repr_from_specr__file__r7)rbloaderrarfilenamer
r
r_module_reprs.








rnc@s4eZdZddZddZddZdS)_installed_safelycCs||_|j|_dS)N)_modulerh_spec)rrbr
r
rr6s	z_installed_safely.__init__cCs&d|j_|jtj|jj<dS)NT)rq
_initializingrprrr)rr
r
rr:sz_installed_safely.__enter__cGsyze|j}tdd|DrNytj|j=Wqdtk
rJYqdXntd|j|jWdd|j_XdS)Ncss|]}|dk	VqdS)Nr
)rrr
r
rrDsz-_installed_safely.__exit__.<locals>.<genexpr>zimport {!r} # {!r}F)	rqrrrrrrTrlrr)rr rar
r
rr!As	
z_installed_safely.__exit__N)rrrrrr!r
r
r
rro4sroc@seZdZdZddddddddZdd	Zd
dZedd
Zej	dd
ZeddZ
eddZej	ddZdS)
ModuleSpecaThe specification for a module, used for loading.

    A module's spec is the source for information about the module.  For
    data associated with the module, including source, use the spec's
    loader.

    `name` is the absolute name of the module.  `loader` is the loader
    to use when loading the module.  `parent` is the name of the
    package the module is in.  The parent is derived from the name.

    `is_package` determines if the module is considered a package or
    not.  On modules this is reflected by the `__path__` attribute.

    `origin` is the specific location used by the loader from which to
    load the module, if that information is available.  When filename is
    set, origin will match.

    `has_location` indicates that a spec's "origin" reflects a location.
    When this is True, `__file__` attribute of the module is set.

    `cached` is the location of the cached bytecode file, if any.  It
    corresponds to the `__cached__` attribute.

    `submodule_search_locations` is the sequence of path entries to
    search when importing submodules.  If set, is_package should be
    True--and False otherwise.

    Packages are simply modules that (may) have submodules.  If a spec
    has a non-None value in `submodule_search_locations`, the import
    system will consider modules loaded from the spec as packages.

    Only finders (see importlib.abc.MetaPathFinder and
    importlib.abc.PathEntryFinder) should modify ModuleSpec instances.

    originNloader_state
is_packagecCsO||_||_||_||_|r0gnd|_d|_d|_dS)NF)rrlrtrusubmodule_search_locations
_set_fileattr_cached)rrrlrtrurvr
r
rrts					zModuleSpec.__init__cCsdj|jdj|jg}|jdk	rL|jdj|j|jdk	rt|jdj|jdj|jjdj|S)Nz	name={!r}zloader={!r}zorigin={!r}zsubmodule_search_locations={}z{}({})z, )	r7rrlrtappendrw	__class__rjoin)rr r
r
rr9s
zModuleSpec.__repr__cCs|j}yk|j|jkor|j|jkor|j|jkor||jkor|j|jkor|j|jkSWntk
rdSYnXdS)NF)rwrrlrtcachedhas_locationri)rothersmslr
r
r__eq__s	
zModuleSpec.__eq__cCsU|jdkrN|jdk	rN|jrNtdkr9ttj|j|_|jS)N)ryrtrx_bootstrap_externalNotImplementedError_get_cached)rr
r
rr}szModuleSpec.cachedcCs
||_dS)N)ry)rr}r
r
rr}scCs.|jdkr#|jjddS|jSdS)z The name of the module's parent.N.r$)rwr
rpartition)rr
r
rparentszModuleSpec.parentcCs|jS)N)rx)rr
r
rr~szModuleSpec.has_locationcCst||_dS)N)boolrx)rvaluer
r
rr~s)rrrrrr9rpropertyr}setterrr~r
r
r
rrsOs#
	rsrtrvcCst|drntdkr!ttj}|dkrF||d|S|rRgnd}||d|d|S|dkrt|dry|j|}Wqtk
rd}YqXnd}t||d|d|S)z5Return a module spec based on various loader methods.get_filenameNrlrwrvFrt)rrrspec_from_file_locationrvrVrs)rrlrtrvrsearchr
r
rr^s"	
r^c5Csvy
|j}Wntk
r!YnX|dk	r2|S|j}|dkriy
|j}Wntk
rhYnXy
|j}Wntk
rd}YnX|dkr|dkry
|j}Wqtk
rd}YqXn|}y
|j}Wntk
rd}YnXyt|j}Wntk
r/d}YnXt	||d|}|dkrWdnd|_
||_||_|S)NrtFT)
rhrirrdrk_ORIGIN
__cached__list__path__rsrxr}rw)rbrlrtrarlocationr}rwr
r
r_spec_from_modulesH

	








		roverrideFc;Cs6|st|dddkrCy|j|_Wntk
rBYnX|sat|dddkr|j}|dkr|jdk	rtdkrttj}|j	|}|j|_
y
||_Wntk
rYnX|st|dddkr y|j|_
Wntk
rYnXy
||_Wntk
rAYnX|s`t|dddkr|jdk	ry|j|_Wntk
rYnX|jr2|st|dddkry|j|_Wntk
rYnX|st|dddkr2|jdk	r2y|j|_Wntk
r1YnX|S)Nrrd__package__rrkr)rrrrirlrwrr_NamespaceLoader__new___pathrdrrrhrr~rtrkr}r)rarbrrlrr
r
r_init_module_attrss\
		





	

rcCsd}t|jdr-|jj|}n(t|jdrUtjdtdd|dkrpt|j}t|||S)z+Create a module based on the provided spec.N
create_moduleexec_modulezWstarting in Python 3.6, loaders defining exec_module() must also define create_module()
stacklevel)	rrlr	_warningswarnDeprecationWarningrrr)rarbr
r
rmodule_from_spec:s	

rcCs|jdkrdn|j}|jdkr_|jdkrIdj|Sdj||jSn2|jr{dj||jSdj|j|jSdS)z&Return the repr to use for the module.Nrfz
<module {!r}>z<module {!r} ({!r})>z<module {!r} from {!r}>z<module {!r} ({})>)rrtrlr7r~)rarr
r
rrjLs
	rjcCs|j}tjt|tjj||k	rYdj|}t|d||j	dkr|j
dkrtdd|jt||dd|St||ddt|j	ds|j	j
|n|j	j|WdQRXtj|S)z3Execute the spec in an existing module's namespace.zmodule {!r} not in sys.modulesrNzmissing loaderrTr)rr>acquire_lockr;rrr.r7rVrlrwrrload_moduler)rarbrmsgr
r
rr_]s 	

r_cCs|jj|jtj|j}t|dddkr`y|j|_Wntk
r_YnXt|dddkry8|j|_	t
|ds|jjdd|_	Wntk
rYnXt|dddkry
||_Wntk
rYnX|S)Nrdrrrr$rh)
rlrrrrrrdrirrrrrh)rarbr
r
r_load_backward_compatiblevs(



rcCs|jdk	r+t|jds+t|St|}t|K|jdkrz|jdkrtdd|jn|jj|WdQRXt	j
|jS)Nrzmissing loaderr)rlrrrrorwrVrrrr)rarbr
r
r_load_unlockeds

rc	Cs/tjt|jt|SWdQRXdS)zReturn a new module object, loaded by the spec's loader.

    The module is not added to its parent.

    If a module is already in sys.modules, that existing module gets
    clobbered.

    N)r>rr;rr)rar
r
rr`s	
r`c@seZdZdZeddZeddddZedddZed	d
Z	eddZ
eed
dZeeddZ
eeddZeeZdS)BuiltinImporterzMeta path import for built-in modules.

    All methods are either class or static methods to avoid the need to
    instantiate the class.

    cCsdj|jS)zsReturn repr for the module.

        The method is deprecated.  The import machinery does the job itself.

        z<module {!r} (built-in)>)r7r)rbr
r
rreszBuiltinImporter.module_reprNcCs:|dk	rdStj|r2t||ddSdSdS)Nrtzbuilt-in)r>
is_builtinr^)clsrWpathtargetr
r
r	find_specs
zBuiltinImporter.find_speccCs)|j||}|dk	r%|jSdS)zFind the built-in module.

        If 'path' is ever specified then the search is considered a failure.

        This method is deprecated.  Use find_spec() instead.

        N)rrl)rrWrrar
r
rfind_modules	zBuiltinImporter.find_modulecCsC|jtjkr3tdj|jd|jttj|S)zCreate a built-in modulez{!r} is not a built-in moduler)rrrUrVr7rIr>create_builtin)rrar
r
rrszBuiltinImporter.create_modulecCsttj|dS)zExec a built-in moduleN)rIr>exec_builtin)rrbr
r
rrszBuiltinImporter.exec_modulecCsdS)z9Return None as built-in modules do not have code objects.Nr
)rrWr
r
rget_codeszBuiltinImporter.get_codecCsdS)z8Return None as built-in modules do not have source code.Nr
)rrWr
r
r
get_sourceszBuiltinImporter.get_sourcecCsdS)z4Return False as built-in modules are never packages.Fr
)rrWr
r
rrvszBuiltinImporter.is_package)rrrrstaticmethodreclassmethodrrrrrZrrrvrcrr
r
r
rrs	rc@seZdZdZeddZeddddZedddZed	d
Z	eddZ
ed
dZeeddZ
eeddZeeddZdS)FrozenImporterzMeta path import for frozen modules.

    All methods are either class or static methods to avoid the need to
    instantiate the class.

    cCsdj|jS)zsReturn repr for the module.

        The method is deprecated.  The import machinery does the job itself.

        z<module {!r} (frozen)>)r7r)mr
r
rreszFrozenImporter.module_reprNcCs*tj|r"t||ddSdSdS)Nrtfrozen)r>r[r^)rrWrrr
r
rrszFrozenImporter.find_speccCstj|r|SdS)z]Find a frozen module.

        This method is deprecated.  Use find_spec() instead.

        N)r>r[)rrWrr
r
rrszFrozenImporter.find_modulecCsdS)z*Use default semantics for module creation.Nr
)rrar
r
rr%szFrozenImporter.create_modulecCs\|jj}tj|s6tdj|d|ttj|}t||j	dS)Nz{!r} is not a frozen moduler)
rhrr>r[rVr7rIget_frozen_objectexecr)rbrcoder
r
rr)s	zFrozenImporter.exec_modulecCs
t||S)z_Load a frozen module.

        This method is deprecated.  Use exec_module() instead.

        )rc)rrWr
r
rr2szFrozenImporter.load_modulecCs
tj|S)z-Return the code object for the frozen module.)r>r)rrWr
r
rr;szFrozenImporter.get_codecCsdS)z6Return None as frozen modules do not have source code.Nr
)rrWr
r
rrAszFrozenImporter.get_sourcecCs
tj|S)z.Return True if the frozen module is a package.)r>is_frozen_package)rrWr
r
rrvGszFrozenImporter.is_package)rrrrrrerrrrrrr]rrrvr
r
r
rrs			rc@s.eZdZdZddZddZdS)_ImportLockContextz$Context manager for the import lock.cCstjdS)zAcquire the import lock.N)r>r)rr
r
rrTsz_ImportLockContext.__enter__cCstjdS)z<Release the import lock regardless of any raised exceptions.N)r>r?)rexc_type	exc_value
exc_tracebackr
r
rr!Xsz_ImportLockContext.__exit__N)rrrrrr!r
r
r
rrPsrcCsX|jd|d}t||kr4td|d}|rTdj||S|S)z2Resolve a relative module name to an absolute one.rr2z2attempted relative import beyond top-level packager$z{}.{})rsplitlen
ValueErrorr7)rpackagelevelbitsbaser
r
r
_resolve_name]s

rcCs/|j||}|dkr"dSt||S)N)rr^)finderrrrlr
r
r_find_spec_legacyfsrc	Cs*tjdk	r)tjr)tjdt|tjk}xtjD]}tZy
|j}Wn3tk
rt	|||}|dkrwBYnX||||}WdQRX|dk	rB|r|tjkrtj|}y
|j
}Wntk
r|SYqX|dkr|S|SqB|SqBWdSdS)zFind a module's loader.Nzsys.meta_path is empty)r	meta_pathrr
ImportWarningrrrrirrh)	rrr	is_reloadrrrarbrhr
r
r
_find_specos0





	rcCst|ts*tdjt||dkrBtd|dkr~t|tsltdn|s~td|r|dkrtddS)zVerify arguments are "sane".zmodule name must be str, not {}r$zlevel must be >= 0z__package__ not set to a stringz6attempted relative import with no known parent packagezEmpty module nameN)
isinstancestr	TypeErrorr7rrrV)rrrr
r
r
_sanity_checksrzNo module named z{!r}cCs(d}|jdd}|r|tjkr;t|||tjkrUtj|Stj|}y
|j}Wn=tk
rtdj||}t|d|dYnXt	||}|dkrttj|d|nt
|}|r$tj|}t||jdd||S)Nrr$z; {!r} is not a packagerr)rrrrIrri_ERR_MSGr7rVrrr)rimport_rr
parent_modulerrarbr
r
r_find_and_load_unlockeds*




rc
Cs%t|t||SWdQRXdS)z6Find and load the module, and release the import lock.N)r;r)rrr
r
r_find_and_loads
rr$cCst||||dkr.t|||}tj|tjkrTt|tStj|}|dkrtjdj	|}t
|d|t||S)a2Import and return the module based on its name, the package the call is
    being made from, and the level adjustment.

    This function represents the greatest common denominator of functionality
    between import_module and __import__. This includes setting __package__ if
    the loader did not.

    r$Nz(import of {} halted; None in sys.modulesr)rrr>rrrr_gcd_importr?r7rVrF)rrrrbrSr
r
rrs	



	
rcCst|drd|krSt|}|jdt|drS|j|jx|D]}t||sZdj|j|}yt||WqZtk
r}z/t	|j
tr|j|krwZWYdd}~XqZXqZW|S)zFigure out what __import__ should return.

    The import_ parameter is a callable which takes the name of module to
    import. It is required to decouple the function from assuming importlib's
    import implementation is desired.

    r*__all__z{}.{}N)
rrremoveextendrr7rrIrVrrP_ERR_MSG_PREFIXr)rbfromlistrx	from_nameexcr
r
r_handle_fromlists"


rcCsH|jd}|dkrD|d}d|krD|jdd}|S)zCalculate what __package__ should be.

    __package__ is not guaranteed to be defined or could be set to None
    to represent that its proper value is unknown.

    rNrrrr$)r.r)globalsrr
r
r_calc___package__s
rc	Cs|dkrt|}n6|dk	r-|ni}t|}t|||}|s|dkrzt|jddS|s|St|t|jdd}tj|jdt|j|Snt||tSdS)aImport a module.

    The 'globals' argument is used to infer where the import is occurring from
    to handle relative imports. The 'locals' argument is ignored. The
    'fromlist' argument specifies what should exist as attributes on the module
    being imported (e.g. ``from module import <fromlist>``).  The 'level'
    argument represents the package location to import from in a relative
    import (e.g. ``from ..pkg import mod`` would have a 'level' of 2).

    r$Nr)rr	partitionrrrrr)	rrlocalsrrrbglobals_rcut_offr
r
r
__import__s#(rcCs5tj|}|dkr+td|t|S)Nzno built-in module named )rrrVr)rrar
r
r_builtin_from_name5srcCsJ|a|att}x{tjjD]j\}}t||r(|tjkr[t}ntj|r(t	}nq(t
||}t||q(Wtjt}xIdD]A}|tjkrt
|}	n
tj|}	t|||	qWyt
d}
Wntk
rd}
YnXt|d|
t
d}t|d|dS)zSetup importlib by importing needed built-in modules and injecting them
    into the global namespace.

    As sys is needed for sys.modules access and _imp is needed to load built-in
    modules, those two modules must be explicitly passed in.

    rr%NrD)r)r>rrritemsrrUrr[rrrrrrrV)
sys_module_imp_modulemodule_typerrbrlraself_modulebuiltin_namebuiltin_module
thread_moduleweakref_moduler
r
r_setup<s2			



rcCsWt||tjjttjjtddl}|a|jtj	t
dS)z2Install importlib as the implementation of import.r$N)rrrrzrr_frozen_importlib_externalr_installrr)rrrr
r
rrks
r)3rrrrrrAr-r5r"r#r:r;r=rFrIrTrZr]rcrnrorsr^object	_POPULATErrrrjr_rrr`rrrrrrrrrrrrrrrrrrr
r
r
r<module>s`D$e	-<IM
		(
 #/