U &.e@sddladdlZddladdlZddlZtjdkZerHddlZddl Z nddl Zer^ddgZ ndgZ e dZ e e Zde Z dde DZdZd ZeeZd d Zd d ZddZddZerddZnddZddZddZddZddZddZer dd Znd!d Zdd#d$Ze ej!Z"d%#d&d'd(Z$e%&e$d'Z'd)Z(d*Z)d+gZ*d,gZ+e+Z,Z-ddd-d.d/Z.d0d1Z/d2d3Z0d4d5Z1d6d7Z2d8d9Z3d:d;Z4dd?Z6d@dAZ7ddBdCZ8ddDdEZ9ddGdHZ:dIdJZ;e<Z=dde=dKdLdMZ>GdNdOdOZ?GdPdQdQZ@GdRdSdSe@ZAGdTdUdUZBGdVdWdWeBeAZCGdXdYdYeBe@ZDgZEGdZd[d[eBe@ZFGd\d]d]ZGGd^d_d_ZHGd`dadaZIGdbdcdcZJddddeZKdfdgZLdhdiZMdjdkZNdldmdndodpdqdrdsdtdudvdwdxdydzd{d|ZOd}d~ZPdS)NZwin32\/cCsh|]}d|qS:.0srr5/usr/lib64/python3.8/importlib/_bootstrap_external.py /sr )win)cygwindarwincs<tjtr0tjtrdndfdd}ndd}|S)N PYTHONCASEOKs PYTHONCASEOKcs tjkSN)_osenvironrkeyrr _relax_case@sz%_make_relax_case.._relax_casecSsdS)NFrrrrr rDs)sysplatform startswith_CASE_INSENSITIVE_PLATFORMS#_CASE_INSENSITIVE_PLATFORMS_STR_KEY)rrrr _make_relax_case9s  rcCst|d@ddS)Nlittle)intto_bytes)xrrr _pack_uint32Jsr#cCs t|dSNrr from_bytesdatarrr _unpack_uint32Osr)cCs t|dSr$r%r'rrr _unpack_uint16Tsr*cGs|sdSt|dkr|dSd}g}ttj|D]z\}}|tsL|trf|tpX|}t |g}q0|dr| | kr|}|g}q| |q0|p|}| |q0dd|D}t|dkr|ds|t S|t |S)NrrrcSsg|]}|r|tqSrrstrippath_separatorsr prrr rs_path_join..) lenmapr_path_splitrootrpath_sep_tupleendswithr-r.path_sepcasefoldappendjoin) path_partsrootpathZnew_roottailrrr _path_join[s*     r@cGstdd|DS)NcSsg|]}|r|tqSrr,)r partrrr r1{sr2)r8r;)r<rrr r@ys csBtfddtD}|dkr&dfSd||ddfS)Nc3s|]}|VqdSr)rfindr/r>rr sz_path_split..rrr+)maxr.)r>irrCr _path_splitsrGcCs t|Sr)rstatrCrrr _path_statsrIcCs2z t|}Wntk r"YdSX|jd@|kS)NFi)rIOSErrorst_mode)r>mode stat_inforrr _path_is_mode_types  rNcCs t|dS)Ni)rNrCrrr _path_isfilesrOcCs|s t}t|dS)Ni@)rgetcwdrNrCrrr _path_isdirsrQcCs>|sdSt|ddd}t|dko<|dp<|dS)NFrrrr+z\\)rr5replacer3rr7)r>r=rrr _path_isabssrScCs |tSr)rr.rCrrr rSsc Csd|t|}t|tjtjBtjB|d@}z2t|d}| |W5QRXt ||Wn:t k rzt |Wnt k rYnXYnXdS)N{}.{}rTwb) formatidropenO_EXCLO_CREATO_WRONLY_ioFileIOwriterRrJunlink)r>r(rLpath_tmpfdfilerrr _write_atomicsrdiU rs __pycache__zopt-z.pyz.pyc) optimizationc CsX|dk r4tdt|dk r(d}t||r0dnd}t|}t|\}}|d\}}}tj j } | dkrrt dd |r~|n||| g} |dkrtj jdkrd}ntj j}t|}|dkr|std|d | t|} | td} tjdk rLt|stt|}|dd kr8|dtkr8|d d}ttj|t| St|t| S) NzFthe debug_override parameter is deprecated; use 'optimization' insteadz2debug_override or optimization must be set to Nonerr+.$sys.implementation.cache_tag is Nonerz{!r} is not alphanumericz{}.{}{}rre) _warningswarnDeprecationWarning TypeErrorrfspathrG rpartitionrimplementation cache_tagNotImplementedErrorr;flagsoptimizestrisalnum ValueErrorrW_OPTBYTECODE_SUFFIXESpycache_prefixrSr@rPr.lstrip_PYCACHE) r>debug_overridergmessageheadr?basesepresttagalmost_filenamefilenamerrr cache_from_sourcebsH       rc Cs.tjjdkrtdt|}t|\}}d}tjdk rftjt }| |t rf|t |d}d}|st|\}}|t krtt d||d}|dkrtd|n\|dkr|dd d }| tstd t|t td}|std |d |dd} t|| tdS)NriFTz not bottom-level directory in rh>rezexpected only 2 or 3 dots in rrez5optimization portion of filename does not start with zoptimization level z is not an alphanumeric valuer)rrprqrrrrnrGrzr-r.rr8r3r|rwcountrsplitrxrv partitionr@SOURCE_SUFFIXES) r>rpycache_filenamefound_in_pycache_prefix stripped_pathpycache dot_countrg opt_level base_filenamerrr source_from_caches4          rc Cs~t|dkrdS|d\}}}|r8|dddkr<|Sz t|}Wn$ttfk rl|dd}YnXt|rz|S|S)Nrrhpy)r3rolowerrrrrwrO) bytecode_pathr_ extension source_pathrrr _get_sourcefiles  rcCsJ|ttr0z t|WStk r,YqFXn|ttrB|SdSdSr)r7tuplerrrrry)rrrr _get_cacheds rcCs4zt|j}Wntk r&d}YnX|dO}|S)NrT)rIrKrJ)r>rLrrr _calc_modes  rcsDdfdd }z tj}Wntk r4dd}YnX|||S)NcsB|dkr|j}n |j|kr0td|j|f|d||f||S)Nzloader for %s cannot handle %sname)r ImportError)selfrargskwargsmethodrr _check_name_wrappers z(_check_name.._check_name_wrappercSs8dD] }t||rt||t||q|j|jdS)N) __module____name__ __qualname____doc__)hasattrsetattrgetattr__dict__update)newoldrRrrr _wraps z_check_name.._wrap)N) _bootstrapr NameError)rrrrrr _check_names  rcCs<||\}}|dkr8t|r8d}t||dt|S)Nz,Not importing directory {}: missing __init__r) find_loaderr3rjrkrW ImportWarning)rfullnameloaderportionsmsgrrr _find_module_shims rcCs|dd}|tkr) marshalloads isinstance _code_typerr_imp_fix_co_filenamerrW)r(rrrcoderrr _compile_bytecode~s     rcCsFtt}|td|t||t||t||SNr bytearrayrextendr#rdumps)rmtimerr(rrr _code_to_timestamp_pycs rTcCs@tt}d|d>B}|t||||t||S)Nr+r)rrcheckedr(rsrrr _code_to_hash_pycs   rcCs>ddl}t|j}||}tdd}|||dS)NrT)tokenizer]BytesIOreadlinedetect_encodingIncrementalNewlineDecoderdecode) source_bytesrsource_bytes_readlineencodingnewline_decoderrrr decode_sources    rrsubmodule_search_locationsc Cs|dkr get_filenameoriginT is_packager)rrrrrnr ModuleSpec _set_fileattr_get_supported_file_loadersr7rr _POPULATErrrGr:) rlocationrrspec loader_classsuffixesrdirnamerrr spec_from_file_locations>        rc@sLeZdZdZdZdZeddZeddZed d d Z edd d Z dS)WindowsRegistryFinderz;Software\Python\PythonCore\{sys_version}\Modules\{fullname}zASoftware\Python\PythonCore\{sys_version}\Modules\{fullname}\DebugFcCs8zttj|WStk r2ttj|YSXdSr)_winregOpenKeyHKEY_CURRENT_USERrJHKEY_LOCAL_MACHINE)clsrrrr _open_registrysz$WindowsRegistryFinder._open_registryc Csr|jr|j}n|j}|j|dtjddd}z&||}t|d}W5QRXWnt k rlYdSX|S)Nz%d.%dre)r sys_versionr) DEBUG_BUILDREGISTRY_KEY_DEBUG REGISTRY_KEYrWr version_inforr QueryValuerJ)rr registry_keyrhkeyfilepathrrr _search_registrys z&WindowsRegistryFinder._search_registryNcCsz||}|dkrdSz t|Wntk r8YdSXtD]4\}}|t|r@tj|||||d}|Sq@dS)Nr)rrIrJrr7rrspec_from_loader)rrr>targetr rrrrrr find_specs  zWindowsRegistryFinder.find_speccCs"|||}|dk r|jSdSdSrrrrrr>rrrr find_module's z!WindowsRegistryFinder.find_module)NN)N) rrrrrr classmethodrrrrrrrr rs   rc@s,eZdZddZddZddZddZd S) _LoaderBasicscCs@t||d}|ddd}|dd}|dko>|dkS)Nr+rhrre__init__)rGrrro)rrr filename_base tail_namerrr r:sz_LoaderBasics.is_packagecCsdSrrrrrrr create_moduleBsz_LoaderBasics.create_modulecCs8||j}|dkr$td|jtt||jdS)Nz4cannot load module {!r} when get_code() returns None)get_coderrrWr_call_with_frames_removedexecr)rmodulerrrr exec_moduleEs  z_LoaderBasics.exec_modulecCs t||Sr)r_load_module_shimrrrrr load_moduleMsz_LoaderBasics.load_moduleN)rrrrrr r#rrrr r5src@sJeZdZddZddZddZddZd d Zd d d dZddZ dS) SourceLoadercCstdSr)rJrr>rrr path_mtimeTszSourceLoader.path_mtimecCsd||iS)Nr)r&r%rrr path_stats\s zSourceLoader.path_statscCs |||Sr)set_data)rr cache_pathr(rrr _cache_bytecodejszSourceLoader._cache_bytecodecCsdSrr)rr>r(rrr r(tszSourceLoader.set_datac CsR||}z||}Wn0tk rH}ztd|d|W5d}~XYnXt|S)Nz'source not available through get_data()r)rget_datarJrr)rrr>rexcrrr get_source{s zSourceLoader.get_sourcer) _optimizecCstjt||dd|dS)NrT) dont_inheritrt)rrcompile)rr(r>r.rrr source_to_codes zSourceLoader.source_to_codec Cs"||}d}d}d}d}d}z t|}Wntk rDd}Yn0Xz||} Wntk rjYn Xt| d}z||} Wntk rYnX||d} zt| || } t| dd} | d@dk}|r$| d@dk}t j d kr8|st j d kr8||}t t |}t | ||| nt| || d || Wnttfk rTYn Xtd ||t| |||d S|dkr||}|||}td|tjs|dk r|dk r|r|dkrt |}t|||} nt||t|} z|||| Wntk rYnX|S)NFTrrrr+rreneveralwayssizez {} matches {})rrrzcode object from {})rrrrr'rJr r+r memoryviewrcheck_hash_based_pycsr_RAW_MAGIC_NUMBERrrrrrrrr1rdont_write_bytecoderrr3r*)rrrrrr hash_based check_sourcerstr(rrs bytes_data code_objectrrr rs               zSourceLoader.get_codeN) rrrr&r'r*r(r-r1rrrrr r$Rs  r$csxeZdZddZddZddZefddZed d Zd d Z ed dZ ddZ ddZ ddZ ddZZS) FileLoadercCs||_||_dSrr)rrr>rrr rszFileLoader.__init__cCs|j|jko|j|jkSr __class__rrotherrrr __eq__s  zFileLoader.__eq__cCst|jt|jASrhashrr>rrrr __hash__szFileLoader.__hash__cstt||Sr)superr>r#r"r@rr r#s zFileLoader.load_modulecCs|jSrrCr"rrr rszFileLoader.get_filenamec Csft|ttfr:tt|}|W5QRSQRXn(t|d}|W5QRSQRXdS)Nr)rr$ExtensionFileLoaderr] open_coderureadr^)rr>rcrrr r+s zFileLoader.get_datacCs||r|SdSr)rrrrrr get_resource_readers zFileLoader.get_resource_readercCs tt|jd|}t|dS)NrrJ)r@rGr>r]r^rresourcer>rrr open_resourceszFileLoader.open_resourcecCs&||sttt|jd|}|Sr) is_resourceFileNotFoundErrorr@rGr>rPrrr resource_paths zFileLoader.resource_pathcCs(t|kr dStt|jd|}t|S)NFr)r8r@rGr>rOrrr>rrr rS szFileLoader.is_resourcecCsttt|jdSr)iterrlistdirrGr>rFrrr contents&szFileLoader.contents)rrrrrCrGrr#rr+rOrRrUrSrY __classcell__rrrIr r>s    r>c@s*eZdZddZddZddddZd S) SourceFileLoadercCst|}|j|jdS)N)rr4)rIst_mtimest_size)rr>r;rrr r'.szSourceFileLoader.path_statscCst|}|j|||dS)N_mode)rr()rrrr(rLrrr r*3sz SourceFileLoader._cache_bytecoderTr^c Cst|\}}g}|r4t|s4t|\}}||qt|D]l}t||}zt|Wq<tk rpYqr(r_parentrr<rAr,rrr r(8s0       zSourceFileLoader.set_dataN)rrrr'r*r(rrrr r[*sr[c@seZdZddZddZdS)SourcelessFileLoadercCsD||}||}||d}t|||tt|dd||dS)Nrr)rr)rr+rrr5)rrr>r(rrrr r[s   zSourcelessFileLoader.get_codecCsdSrrr"rrr r-kszSourcelessFileLoader.get_sourceN)rrrrr-rrrr rdWsrdc@sXeZdZddZddZddZddZd d Zd d Zd dZ ddZ e ddZ dS)rKcCs@||_t|s6ztt|}Wntk r4YnX||_dSr)rrSr@rrPrJr>rVrrr r|szExtensionFileLoader.__init__cCs|j|jko|j|jkSrr?rArrr rCs  zExtensionFileLoader.__eq__cCst|jt|jASrrDrFrrr rGszExtensionFileLoader.__hash__cCs$ttj|}td|j|j|S)Nz&extension module {!r} loaded from {!r})rrrcreate_dynamicrrr>)rrrrrr rsz!ExtensionFileLoader.create_modulecCs$ttj|td|j|jdS)Nz(extension module {!r} executed from {!r})rrr exec_dynamicrrr>rNrrr r s zExtensionFileLoader.exec_modulecs$t|jdtfddtDS)Nr+c3s|]}d|kVqdS)rNrr suffix file_namerr rDsz1ExtensionFileLoader.is_package..)rGr>anyEXTENSION_SUFFIXESr"rrir rs zExtensionFileLoader.is_packagecCsdSrrr"rrr rszExtensionFileLoader.get_codecCsdSrrr"rrr r-szExtensionFileLoader.get_sourcecCs|jSrrCr"rrr rsz ExtensionFileLoader.get_filenameN) rrrrrCrGrr rrr-rrrrrr rKts rKc@sdeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ dS)_NamespacePathcCs$||_||_t||_||_dSr)_name_pathr_get_parent_path_last_parent_path _path_finderrrr> path_finderrrr rsz_NamespacePath.__init__cCs&|jd\}}}|dkrdS|dfS)Nrhr)rr>__path__)rnro)rrcdotmerrr _find_parent_path_namessz&_NamespacePath._find_parent_path_namescCs|\}}ttj||Sr)rxrrmodules)rparent_module_namepath_attr_namerrr rps z_NamespacePath._get_parent_pathcCsPt|}||jkrJ||j|}|dk rD|jdkrD|jrD|j|_||_|jSr)rrprqrrrnrrro)r parent_pathrrrr _recalculates  z_NamespacePath._recalculatecCs t|Sr)rWr}rFrrr __iter__sz_NamespacePath.__iter__cCs ||Srr})rindexrrr __getitem__sz_NamespacePath.__getitem__cCs||j|<dSr)ro)rrr>rrr __setitem__sz_NamespacePath.__setitem__cCs t|Sr)r3r}rFrrr __len__sz_NamespacePath.__len__cCs d|jS)Nz_NamespacePath({!r}))rWrorFrrr __repr__sz_NamespacePath.__repr__cCs ||kSrrritemrrr __contains__sz_NamespacePath.__contains__cCs|j|dSr)ror:rrrr r:sz_NamespacePath.appendN)rrrrrxrpr}r~rrrrrr:rrrr rms  rmc@sPeZdZddZeddZddZddZd d Zd d Z d dZ ddZ dS)_NamespaceLoadercCst||||_dSr)rmrorsrrr rsz_NamespaceLoader.__init__cCs d|jS)Nz)rWr)rrrrr module_reprsz_NamespaceLoader.module_reprcCsdS)NTrr"rrr rsz_NamespaceLoader.is_packagecCsdSNrrr"rrr r-sz_NamespaceLoader.get_sourcecCstdddddS)NrzrT)r/)r0r"rrr rsz_NamespaceLoader.get_codecCsdSrrrrrr rsz_NamespaceLoader.create_modulecCsdSrrrNrrr r sz_NamespaceLoader.exec_modulecCstd|jt||S)Nz&namespace module loaded with path {!r})rrror!r"rrr r# sz_NamespaceLoader.load_moduleN) rrrrrrrr-rrr r#rrrr rs rc@sreZdZeddZeddZeddZeddZedd d Zedd d Z edddZ eddZ d S) PathFindercCs@ttjD],\}}|dkr(tj|=qt|dr|qdS)Ninvalidate_caches)listrpath_importer_cacheitemsrr)rrfinderrrr rs   zPathFinder.invalidate_cachesc CsTtjdk rtjstdttjD],}z||WStk rLYq"Yq"Xq"dS)Nzsys.path_hooks is empty)r path_hooksrjrkrr)rr>hookrrr _path_hooks%s   zPathFinder._path_hookscCsh|dkr,z t}Wntk r*YdSXztj|}Wn(tk rb||}|tj|<YnX|Sr)rrPrTrrKeyErrorr)rr>rrrr _path_importer_cache2s  zPathFinder._path_importer_cachecCsRt|dr||\}}n||}g}|dk rrnamespace_pathentryrrrrrr _get_specWs(      zPathFinder._get_speccCsd|dkrtj}||||}|dkr(dS|jdkr\|j}|rVd|_t|||j|_|SdSn|SdSr)rr>rrrrrm)rrr>rrrrrr rws zPathFinder.find_speccCs|||}|dkrdS|jSrrrrrr rs zPathFinder.find_modulecOsddlm}|j||S)Nr)MetadataPathFinder)importlib.metadatarfind_distributions)rrrrrrr rs zPathFinder.find_distributions)N)NN)N) rrrrrrrrrrrrrrrr rs        rc@sVeZdZddZddZeZddZddZdd d Z d d Z e ddZ ddZ d S) FileFindercspg}|D] \}|fdd|Dq||_|p6d|_t|jsVtt|j|_d|_t|_ t|_ dS)Nc3s|]}|fVqdSrrrgrrr rDsz&FileFinder.__init__..rhr) r_loadersr>rSr@rrP _path_mtimeset _path_cache_relaxed_path_cache)rr>loader_detailsloadersrrrr rs   zFileFinder.__init__cCs d|_dS)Nr)rrFrrr rszFileFinder.invalidate_cachescCs*||}|dkrdgfS|j|jp&gfSr)rrr)rrrrrr rs zFileFinder.find_loadercCs|||}t||||dS)Nr)r)rrrr>smslrrrrr rs zFileFinder._get_specNc Csd}|dd}zt|jp"tj}Wntk rBd}YnX||jkr\|||_t rr|j }| }n |j }|}||krt |j|}|jD]:\} } d| } t || } t| r|| || |g|Sqt|}|jD]r\} } zt |j|| } Wntk rYdSXtjd| dd|| |krt| r|| || d|Sq|r~td|t|d} |g| _| SdS) NFrhrerrz trying {}) verbosityzpossible namespace for {})rorIr>rrPr\rJr _fill_cacherrrrr@rrOrrQrwrrrr)rrr is_namespace tail_modulercache cache_module base_pathrhr init_filename full_pathrrrr rsP           zFileFinder.find_specc Cs|j}zt|pt}Wntttfk r:g}YnXtj dsTt ||_ nJt }|D]8}| d\}}}|rd ||}n|}||q^||_ tj trdd|D|_dS)Nr rhrUcSsh|] }|qSr)r)r fnrrr r *sz)FileFinder._fill_cache..)r>rrXrPrTPermissionErrorNotADirectoryErrorrrrrrrrWraddrr) rr>rYlower_suffix_contentsrrrvrhnew_namerrr r s"     zFileFinder._fill_cachecsfdd}|S)Ncs"t|std|d|fS)Nzonly directories are supportedrC)rQrrCrrrr path_hook_for_FileFinder6s z6FileFinder.path_hook..path_hook_for_FileFinderr)rrrrrr path_hook,s zFileFinder.path_hookcCs d|jS)NzFileFinder({!r}))rWr>rFrrr r>szFileFinder.__repr__)N)rrrrrrrrrrrrrrrrrr rs   3 rcCs|d}|d}|sB|r$|j}n||kr8t||}n t||}|sTt|||d}z$||d<||d<||d<||d<Wntk rYnXdS)N __loader____spec__r__file__ __cached__)getrrdr[r Exception)nsrpathname cpathnamerrrrr _fix_up_moduleDs"     rcCs*tttf}ttf}ttf}|||gSr)rK_alternative_architecturesrextension_suffixesr[rrdry) extensionssourcebytecoderrr r[src Cs|atjatjatjt}dD]0}|tjkr8t|}n tj|}t|||qddgfdddgff}|D]X\}}|d}|tjkrtj|}qqjzt|}WqWqjtk rYqjYqjXqjtdt|d|t|d |t|d d |t|d d d|Dtd} t|d| td} t|d| |dkrXtd} t|d| t|dt t t t |dkrtddt krdt_dS)N)r]rjbuiltinsrposixrntrrzimportlib requires posix or ntrr8r.r_pathseps_with_coloncSsh|]}d|qSrrrrrr r sz_setup.._thread_weakrefwinregrrz.pywz_d.pydT)rrrryr_builtin_from_namerrr;rrlrrrrr:rr) _bootstrap_module self_module builtin_namebuiltin_module os_details builtin_osr.r8 os_module thread_moduleweakref_module winreg_modulerrr _setupfsL                      rcCs2t|t}tjtj|gtjt dSr) rrrrrrr meta_pathr:r)rsupported_loadersrrr _installsr-arm-linux-gnueabihf.-armeb-linux-gnueabihf.-mips64-linux-gnuabi64.-mips64el-linux-gnuabi64.-powerpc-linux-gnu.-powerpc-linux-gnuspe.-powerpc64-linux-gnu.-powerpc64le-linux-gnu.-arm-linux-gnueabi.-armeb-linux-gnueabi.-mips64-linux-gnu.-mips64el-linux-gnu.-ppc-linux-gnu.-ppc-linux-gnuspe.-ppc64-linux-gnu.-ppc64le-linux-gnu.)rrrrrrrrrrrrrrrrcCsF|D]<}tD].\}}||kr|||||Sqq|Sr) _ARCH_MAPrr:rR)rrhoriginal alternativerrr rs r)rT)N)NNN)rr)T)N)N)Qrr]rrjrr _MS_WINDOWSrrrrr.r8rr6r;rr%_CASE_INSENSITIVE_PLATFORMS_BYTES_KEYrrr#r)r*r@rGrIrNrOrQrSrdtype__code__rr!rr r&r7r|rxrryDEBUG_BYTECODE_SUFFIXESOPTIMIZED_BYTECODE_SUFFIXESrrrrrrrrrrrrrrobjectrrrrr$r>r[rdrlrKrmrrrrrrrrrrrrr s            G(  !  D@H-:?*  A