PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  pY@sdZdaddZddZGdddZiZiZGdd d eZGd d d Z Gd d d Z GdddZ ddZ 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 )/opt/python35/lib/python3.5/_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__c GsMtdd|DrI|j rIytj|j=Wntk rHYnXdS)Ncss|]}|dk VqdS)Nr ).0argr r r 2sz)_ManageReload.__exit__..)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 d Zd 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|.cb)rArr%r:r#_weakrefref)rr'rCr )rrr=s    r=c CsGt|}tjy|jWntk r8Yn X|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_names ImportErrorr7)rfullname)fxnr r_requires_builtin_wrappers z4_requires_builtin.._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.._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 zz) 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.zimport {!r} # {!r}F) rqrrrrrrTrlrr)rr rar r rr!As  z_installed_safely.__exit__N)rrrrrr!r r r rro4s   roc@seZdZdZddddddddZdd Zd d Zed d Zej dd ZeddZ eddZ e j ddZ dS) 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}z loader={!r}z origin={!r}zsubmodule_search_locations={}z{}({})z, ) r7rrlrtappendrw __class__rjoin)rr r r rr9s  zModuleSpec.__repr__c Cs|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_module exec_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 zzz)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.r7rVrlrwrr load_moduler)rarbrmsgr r rr_]s    r_cCs|jj|jtj|j}t|dddkr`y|j|_Wntk r_YnXt|dddkry8|j|_ t |ds|jj dd|_ Wntk rYnXt|dddkry ||_ Wntk rYnX|S)Nrdrrrr$rh) rlrrrrrrdrirrrrrh)rarbr r r_load_backward_compatiblevs(     rc Cs|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 ed d Z ee d dZ ee ddZ ee ddZeeZdS)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)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 r find_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 staticmethodre classmethodrrrrrZrrrvrcrr r r rrs   rc@seZdZdZeddZeddddZedddZed d Z ed d Z ed dZ ee 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)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)zr?)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 t r|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 ``). 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_module module_typerrbrlra self_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 rs`  D     $e -<      IM (     #  /