o ?OgR@s daddlZddlZddlZddlZddlZejdkZer'ddlZ ddl Z nddl Z er2ddgZ ndgZ e dZ ee Zde Z dde DZdZd ZeeZd d ZeZd d ZddZddZerkddZnddZddZddZddZddZddZerdd Z nd!d Z dmd#d$Z!e"e!j#Z$d%%d&d'd(Z&e'(e&d'Z)d)Z*d*Z+d+gZ,ere,-d,e.Z/d-gZ0e0Z1Z2dndd.d/d0Z3d1d2Z4d3d4Z5d5d6Z6d7d8Z7d9d:Z8d;d<Z9d=d>Z:d?d@Z;dAdBZdqdHdIZ?dJdKZ@eAZBdndeBdLdMdNZCGdOdPdPZDGdQdRdRZEGdSdTdTeEZFGdUdVdVZGGdWdXdXeGeFZHGdYdZdZeGeEZIGd[d\d\eGeEZJGd]d^d^ZKGd_d`d`ZLGdadbdbZMGdcddddZNdndedfZOdgdhZPdidjZQdkdlZRdS)rNZwin32\/cCsh|]}d|qS):).0srrD/opt/alt/python310/lib64/python3.10/importlib/_bootstrap_external.py 2sr )win)cygwindarwincs>tjtrtjtrdndfdd}|Sdd}|S)N PYTHONCASEOKs PYTHONCASEOKcs tjj o tjvSN)sysflagsignore_environment_osenvironrkeyrr _relax_caseCz%_make_relax_case.._relax_casecSs dS)NFrrrrr rG)rplatform startswith_CASE_INSENSITIVE_PLATFORMS#_CASE_INSENSITIVE_PLATFORMS_STR_KEY)rrrr _make_relax_case<s   rcCs t|d@ddS)Nlittle)intto_bytes)xrrr _pack_uint32Orr%cC t|dSNr!r" from_bytesdatarrr _unpack_uint32T r,cCr&r'r(r*rrr _unpack_uint16Yr-r.cGs |sdSt|dkr|dSd}g}ttj|D]=\}}|ts'|tr4|tp-|}t |g}q|drM| | krG|}|g}q| |q|pP|}| |qdd|D}t|dkrl|dsl|t S|t |S)NrrrcSg|] }|r|tqSrrstrippath_separatorsrprrr ws_path_join..) lenmapr_path_splitrootrpath_sep_tupleendswithr2r3path_sepcasefoldappendjoin) path_partsrootpathZnew_roottailrrr _path_join`s,     rEcGs tdd|DS)NcSr0rr1)rpartrrr r6sr7)r=r@)rArrr rE~s csD tfddtD}|dkrdfSd||ddfS)Nc3s|]}|VqdSr)rfindr4rCrr sz_path_split..rrr/)maxr3)rCirrHr _path_splits rLcCs t|Sr)rstatrHrrr _path_stats rNcCs2 zt|}Wn tyYdSw|jd@|kS)NFi)rNOSErrorst_mode)rCmode stat_inforrr _path_is_mode_types  rScCs t|dS)Ni)rSrHrrr _path_isfile rTcCs |st}t|dS)Ni@)rgetcwdrSrHrrr _path_isdirs rWcCs@ |sdSt|ddd}t|dko|dp|dS)NFrrrr/z\\)rr:replacer8rr<)rCrBrrr _path_isabss  rYcCs |tSr)rr3rHrrr rYrUc Cs d|t|}t|tjtjBtjB|d@}z$t|d }| |Wdn1s0wYt ||WdSt yUzt |Wt yTYww)N{}.{}rZwb) formatidropenO_EXCLO_CREATO_WRONLY_ioFileIOwriterXrOunlink)rCr+rQpath_tmpfdfilerrr _write_atomics&    rjio r!s __pycache__zopt-z.pyz.pywz.pyc) optimizationc CsR |durtdt|durd}t||rdnd}t|}t|\}}|d\}}}tj j } | dur:t dd |r@|n||| g} |durWtj jdkrSd}ntj j}t|}|dkrq|sjtd|d | t|} | td} tjdurt|stt|}|dd kr|dtvr|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{}.{}{}rrk) _warningswarnDeprecationWarning TypeErrorrfspathrL rpartitionrimplementation cache_tagNotImplementedErrorr@roptimizestrisalnum ValueErrorr]_OPTBYTECODE_SUFFIXESpycache_prefixrYrErVr3lstrip_PYCACHE) rCdebug_overridermmessageheadrDbasesepresttagalmost_filenamefilenamerrr cache_from_source|sJ         rc Cs* tjjdur tdt|}t|\}}d}tjdur4tjt }| |t r4|t |d}d}|sIt|\}}|t krItt d||d}|dvrYtd||dkr|dd d }| tsqtd t|t td}|std |d |dd} t|| tdS)NroFTz not bottom-level directory in rn>rkzexpected only 2 or 3 dots in rrkz5optimization portion of filename does not start with zoptimization level z is not an alphanumeric valuer)rrvrwrxrrtrLrr2r3rr=r8rr|countrsplitr}r{ partitionrESOURCE_SUFFIXES) rCrpycache_filenamefound_in_pycache_prefix stripped_pathpycache dot_countrm opt_level base_filenamerrr source_from_caches>        rc Cs~ t|dkr dS|d\}}}|r|dddkr|Szt|}Wnttfy6|dd}Ynwt|r=|S|S)Nrrnpy)r8rulowerrrxr|rT) bytecode_pathr_ extension source_pathrrr _get_sourcefiles  rcCsD|ttrzt|WStyYdSw|ttr |SdSr)r<tuplerrrxr~)rrrr _get_cacheds  rcCs4 zt|j}Wn tyd}Ynw|dO}|S)NrZ)rNrPrO)rCrQrrr _calc_mode s rcs6 dfdd }tdurtj}ndd}|||S)NcsH|dur|j}n|j|krtd|j|f|d||g|Ri|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)newoldrXrrr _wrap+s  z_check_name.._wrapr) _bootstrapr)rrrrrr _check_names  rcCsJ tdt||\}}|dur#t|r#d}t||dt|S)NzZfind_module() is deprecated and slated for removal in Python 3.12; use find_spec() insteadz,Not importing directory {}: missing __init__r)rprqrr find_loaderr8r] ImportWarning)rfullnameloaderportionsmsgrrr _find_module_shim5srcCs |dd}|tkr!d|d|}td|t|fi|t|dkr6d|}td|t|t|dd}|d@rRd |d |}t|fi||S) Nr zbad magic number in z: {}z(reached EOF while reading pyc header of zinvalid flags z in ) MAGIC_NUMBERr_verbose_messagerr8EOFErrorr,)r+r exc_detailsmagicrrrrr _classify_pycIs     rcCs~ t|dd|d@kr d|}td|t|fi||dur;t|dd|d@kr=td|fi|dSdS)Nr rzbytecode is stale for rr)r,rrr)r+ source_mtime source_sizerrrrrr _validate_timestamp_pycjs  rcCs, |dd|krtd|fi|dS)Nrrz.hash in bytecode doesn't match hash of source )r)r+ source_hashrrrrr _validate_hash_pycsrcCsN t|}t|trtd||durt|||Std |||d)Nzcode object from {!r}zNon-code object in {!r}rrC) marshalloads isinstance _code_typerr_imp_fix_co_filenamerr])r+rrrcoderrr _compile_bytecodes     rcCsH tt}|td|t||t||t||S)Nr bytearrayrextendr%rdumps)rmtimerr+rrr _code_to_timestamp_pycsrTcCsB tt}d|d>B}|t||||t||S)Nr/r)rrcheckedr+rrrr _code_to_hash_pycs  rcCs@ ddl}t|j}||}tdd}|||dS)NrT)tokenizercBytesIOreadlinedetect_encodingIncrementalNewlineDecoderdecode) source_bytesrsource_bytes_readlineencodingnewline_decoderrrr decode_sources    rrsubmodule_search_locationsc Cs8 |durd}t|drz||}Wn&tyYnwnt|}t|s:z tt|}Wn ty9Ynwt j |||d}d|_ |durdt D]\}}| t|ra|||}||_nqLdS|turt|drz||}Wn ty}Yn w|rg|_n||_|jgkr|rt|d}|j||S)Nz get_filenameoriginT is_packager)rrrrrtrYrErVrOr ModuleSpec _set_fileattr_get_supported_file_loadersr<rr _POPULATErrrLr?) rlocationrrspec loader_classsuffixesrdirnamerrr spec_from_file_locationsV            rc@sVeZdZ dZdZeodevZeddZ e ddZ e d d d Z e dd d Z dS)WindowsRegistryFinderz;Software\Python\PythonCore\{sys_version}\Modules\{fullname}zASoftware\Python\PythonCore\{sys_version}\Modules\{fullname}\Debugz_d.pydcCs2zttj|WStyttj|YSwr)winregOpenKeyHKEY_CURRENT_USERrOHKEY_LOCAL_MACHINErrrr _open_registry&s  z$WindowsRegistryFinder._open_registrycCs|jr|j}n|j}|j|dtjddd}z ||}t|d}WdW|S1s1wYW|St yBYdSw)Nz%d.%drk)r sys_versionr) DEBUG_BUILDREGISTRY_KEY_DEBUG REGISTRY_KEYr]r version_inforr QueryValuerO)clsr registry_keyrhkeyfilepathrrr _search_registry-s    z&WindowsRegistryFinder._search_registryNcCsx||}|dur dSzt|Wn tyYdSwtD]\}}|t|r9tj|||||d}|SqdS)Nr)rrNrOrr<rrspec_from_loader)r rrCtargetrrrrrrr find_spec<s"   zWindowsRegistryFinder.find_speccCs, tdt|||}|dur|jSdS)NzpWindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() insteadrprqrrrrr rrCrrrr find_moduleLs z!WindowsRegistryFinder.find_moduleNNr)rrrr r  _MS_WINDOWSEXTENSION_SUFFIXESr staticmethodr classmethodrrrrrrr rs    rc@s.eZdZ ddZddZddZddZd S) _LoaderBasicscCsB t||d}|ddd}|dd}|dko |dkS)Nr/rnrrk__init__)rLrrru)rrr filename_base tail_namerrr rbs z_LoaderBasics.is_packagecCdSrrrrrrr create_modulejz_LoaderBasics.create_modulecCs: ||j}|durtd|jtt||jdS)Nz4cannot load module {!r} when get_code() returns None)get_coderrr]r_call_with_frames_removedexecr)rmodulerrrr exec_modulems z_LoaderBasics.exec_modulecCs t||Sr)r_load_module_shimrrrrr load_moduleur-z_LoaderBasics.load_moduleN)rrrrr#r)r,rrrr r]s  rc@sJeZdZddZddZddZddZd d Zd d d dZddZ dS) SourceLoadercCs tr)rOrrCrrr path_mtime}szSourceLoader.path_mtimecCs d||iS)Nr)r/r.rrr path_statss zSourceLoader.path_statscCs |||Sr)set_data)rr cache_pathr+rrr _cache_bytecodes zSourceLoader._cache_bytecodecCr!rr)rrCr+rrr r1r$zSourceLoader.set_datac CsH ||}z ||}Wt|Sty#}ztd|d|d}~ww)Nz'source not available through get_data()r)rget_datarOrr)rrrCrexcrrr get_sources  zSourceLoader.get_sourcer) _optimizecCs tjt||dd|dS)Nr'T) dont_inheritry)rr&compile)rr+rCr7rrr source_to_codes zSourceLoader.source_to_codec Cs  ||}d}d}d}d}d}zt|}Wn ty!d}Ynwz||} Wn ty2Ynwt| d}z||} Wn tyIYnhw||d} zGt| || } t| dd} | d@dk}|r| d@dk}t j d kr|sxt j d kr||}t t |}t | ||| n t| || d || Wn ttfyYnwtd ||t| |||d S|dur||}|||}td|tjs|dur|dur|r|durt |}t|||} nt||t|} z |||| W|StyY|Sw|S)NFTrrrr/rrkneveralwayssizez {} matches {})rrrzcode object from {})rrrxr0rOr"r4r memoryviewrcheck_hash_based_pycsr_RAW_MAGIC_NUMBERrrrrrrrr:rdont_write_bytecoderrr8r3)rrrrrr hash_based check_sourcerstr+rr bytes_data code_objectrrr r%s                 zSourceLoader.get_codeN) rrrr/r0r3r1r6r:r%rrrr r-{s  r-csZeZdZ ddZddZddZefddZed d Zd d Z ed dZ Z S) FileLoadercCs ||_||_dSrr)rrrCrrr rs zFileLoader.__init__cC|j|jko |j|jkSr __class__rrotherrrr __eq__  zFileLoader.__eq__cCt|jt|jASrhashrrCrrrr __hash__zFileLoader.__hash__cs tt||Sr)superrGr,r+rJrr r,szFileLoader.load_modulecC |jSrrHr+rrr r)zFileLoader.get_filenamecCs t|ttfr%tt| }|WdS1swYdSt|d }|WdS1s:wYdS)Nr)rr-ExtensionFileLoaderrc open_coderzreadrd)rrCrirrr r4.s$$zFileLoader.get_datacCsddlm}||S)Nr) FileReader)importlib.readersr])rr(r]rrr get_resource_reader7s zFileLoader.get_resource_reader) rrrrrMrSrr,rr4r_ __classcell__rrrVr rG s  rGc@s,eZdZ ddZddZddddZd S) SourceFileLoadercCs t|}|j|jdS)N)rr=)rNst_mtimest_size)rrCrDrrr r0AszSourceFileLoader.path_statscCst|}|j|||dS)N_mode)rr1)rrrr+rQrrr r3Fsz SourceFileLoader._cache_bytecoderZrdc Cs t|\}}g}|r t|s t|\}}|||r t|rt|D]1}t||}zt|Wq$ty;Yq$tyU}zt d||WYd}~dSd}~wwzt |||t d|WdSty}zt d||WYd}~dSd}~ww)Nzcould not create {!r}: {!r}z created {!r}) rLrWr?reversedrErmkdirFileExistsErrorrOrrrj) rrCr+reparentrrArFr5rrr r1Ks:        zSourceFileLoader.set_dataN)rrrr0r3r1rrrr ra=s rac@seZdZ ddZddZdS)SourcelessFileLoadercCsD||}||}||d}t|||tt|dd||dS)Nrr)rr)rr4rrr>)rrrCr+rrrr r%ns   zSourcelessFileLoader.get_codecC dSrrr+rrr r6~rzSourcelessFileLoader.get_sourceN)rrrr%r6rrrr rjjs rjc@sZeZdZ ddZddZddZddZd d Zd d Zd dZ ddZ e ddZ dS)rZcCs||_||_dSrr)rrrCrrr rs zExtensionFileLoader.__init__cCrHrrIrKrrr rMrNzExtensionFileLoader.__eq__cCrOrrPrRrrr rSrTzExtensionFileLoader.__hash__cCs& ttj|}td|j|j|S)Nz&extension module {!r} loaded from {!r})rr&rcreate_dynamicrrrC)rrr(rrr r#sz!ExtensionFileLoader.create_modulecCs& ttj|td|j|jdS)Nz(extension module {!r} executed from {!r})rr&r exec_dynamicrrrCrr(rrr r)s zExtensionFileLoader.exec_modulecs& t|jdtfddtDS)Nr/c3s|] }d|kVqdS)rNrrsuffix file_namerr rIsz1ExtensionFileLoader.is_package..)rLrCanyrr+rrqr rs  zExtensionFileLoader.is_packagecCrkrrr+rrr r%rzExtensionFileLoader.get_codecCrkrrr+rrr r6rzExtensionFileLoader.get_sourcecCrWrrHr+rrr rrXz ExtensionFileLoader.get_filenameN) rrrrrMrSr#r)rr%r6rrrrrr rZsrZc@sjeZdZ dZddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZdS)_NamespacePathrcCs,||_||_t||_|j|_||_dSr)_name_pathr_get_parent_path_last_parent_path_epoch _last_epoch _path_finderrrrC path_finderrrr rs  z_NamespacePath.__init__cCs( |jd\}}}|dkrdS|dfS)Nrnr)rrC__path__)ruru)rridotmerrr _find_parent_path_namess z&_NamespacePath._find_parent_path_namescCs|\}}ttj||Sr)rrrmodules)rparent_module_namepath_attr_namerrr rws z_NamespacePath._get_parent_pathcCsdt|}||jks|j|jkr/||j|}|dur(|jdur(|jr(|j|_ ||_|j|_|j Sr) rrwrxryrzr{rurrrv)r parent_pathrrrr _recalculates z_NamespacePath._recalculatecC t|Sr)iterrrRrrr __iter__ z_NamespacePath.__iter__cCs ||Srr)rindexrrr __getitem__rz_NamespacePath.__getitem__cCs||j|<dSr)rv)rrrCrrr __setitem__sz_NamespacePath.__setitem__cCrr)r8rrRrrr __len__rz_NamespacePath.__len__cC d|jS)Nz_NamespacePath({!r}))r]rvrRrrr __repr__rz_NamespacePath.__repr__cCs ||vSrrritemrrr __contains__rz_NamespacePath.__contains__cCs|j|dSr)rvr?rrrr r?z_NamespacePath.appendN)rrrryrrrwrrrrrrrr?rrrr rts  rtc@sXeZdZddZeddZddZddZd d Zd d Z d dZ ddZ ddZ dS)_NamespaceLoadercCst||||_dSr)rtrvr|rrr rsz_NamespaceLoader.__init__cCs tdtd|jS)NzR_NamespaceLoader.module_repr() is deprecated and slated for removal in Python 3.12z)rprqrrr]r)r(rrr module_reprs  z_NamespaceLoader.module_reprcCdS)NTrr+rrr r r$z_NamespaceLoader.is_packagecCrNrrr+rrr r6r$z_NamespaceLoader.get_sourcecCstdddddS)Nrzr'T)r8)r9r+rrr r%rz_NamespaceLoader.get_codecCr!rrr"rrr r#r$z_NamespaceLoader.create_modulecCr!rrrnrrr r)r$z_NamespaceLoader.exec_modulecCs td|jt||S)Nz&namespace module loaded with path {!r})rrrvr*r+rrr r,s  z_NamespaceLoader.load_modulecCsddlm}||jS)Nr)NamespaceReader)r^rrv)rr(rrrr r_'s  z$_NamespaceLoader.get_resource_readerN) rrrrrrrr6r%r#r)r,r_rrrr rs   rc@steZdZ eddZeddZeddZeddZedd d Z edd d Z edddZ eddZ d S) PathFindercCsP ttjD]\}}|durtj|=qt|dr|qtjd7_dS)Ninvalidate_cachesr/)listrpath_importer_cacheitemsrrrtry)rfinderrrr r2s  zPathFinder.invalidate_cachesc CsN tjdurtjstdttjD]}z||WSty$YqwdS)Nzsys.path_hooks is empty)r path_hooksrprqrr)rChookrrr _path_hooks?s   zPathFinder._path_hookscCsf |dkrzt}Wn tyYdSwztj|}W|Sty2||}|tj|<Y|Swr)rrVFileNotFoundErrorrrKeyErrorr)r rCrrrr _path_importer_cacheLs     zPathFinder._path_importer_cachecCst|drt|d}t|t||\}}nt|d}t|t||}g}|dur:t||St |d}||_ |S)Nrz5.find_spec() not found; falling back to find_loader()z5.find_spec() not found; falling back to find_module()) rr _object_namerprqrrrrrr)r rrrrrrrrr _legacy_get_specbs      zPathFinder._legacy_get_specNc Cs g}|D]C}t|ttfsq||}|durHt|dr$|||}n|||}|dur/q|jdur8|S|j}|durCt d| |qt |d}||_|S)Nrzspec missing loader) rrzbytesrrrrrrrrrr) r rrCrnamespace_pathentryrrrrrr _get_specws,      zPathFinder._get_speccCs` |durtj}||||}|durdS|jdur.|j}|r,d|_t|||j|_|SdS|Sr)rrCrrrrrt)r rrCrrrrrr rs zPathFinder.find_speccCs, tdt|||}|durdS|jS)NzePathFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() insteadrrrrr rs zPathFinder.find_modulecOs ddlm}|j|i|S)Nr)MetadataPathFinder)importlib.metadatarfind_distributions)rrrrrr rs zPathFinder.find_distributionsrr) rrrrrrrrrrrrrrrrr r.s$       rc@sXeZdZ ddZddZeZddZddZdd d Z d d Z e ddZ ddZ d S) FileFindercsr g}|D]\}|fdd|Dq||_|pd|_t|js,tt|j|_d|_t|_ t|_ dS)Nc3s|]}|fVqdSrrrorrr rIsz&FileFinder.__init__..rnr) r_loadersrCrYrErrV _path_mtimeset _path_cache_relaxed_path_cache)rrCloader_detailsloadersrrrr rs    zFileFinder.__init__cCs d|_dS)Nr)rrRrrr rrUzFileFinder.invalidate_cachescCs8 tdt||}|durdgfS|j|jpgfS)NzeFileFinder.find_loader() is deprecated and slated for removal in Python 3.12; use find_spec() instead)rprqrrrrr)rrrrrr rs zFileFinder.find_loadercCs|||}t||||dS)Nr)r)rrrrCsmslrrrrr rs zFileFinder._get_specNc Cs| d}|dd}z t|jptj}Wn ty!d}Ynw||jkr.|||_t r9|j }| }n|j }|}||vrmt |j|}|jD]\} } d| } t || } t| rh|| || |g|SqKt|}|jD]7\} } z t |j|| } Wn tyYdSwtjd| dd|| |vrt| r|| || d|Sqp|rtd|t|d} |g| _| SdS) NFrnrkrrz trying {}) verbosityzpossible namespace for {})rurNrCrrVrbrOr _fill_cacherrrrrErrTrrWr|rrrr)rrr is_namespace tail_modulercache cache_module base_pathrpr init_filename full_pathrrrr rsX          zFileFinder.find_specc Cs |j}z t|p t}Wntttfyg}Ynwtj ds*t ||_ n%t }|D]}| d\}}}|rDd ||}n|}||q/||_ tj tr_dd|D|_dSdS)Nr rnr[cSsh|]}|qSr)r)rfnrrr r Psz)FileFinder._fill_cache..)rCrlistdirrVrPermissionErrorNotADirectoryErrorrrrrrrr]raddrr) rrCcontentslower_suffix_contentsrrrrpnew_namerrr r3s(    zFileFinder._fill_cachecs fdd}|S)Ncs& t|s td|d|gRS)Nzonly directories are supportedrH)rWrrHr rrr path_hook_for_FileFinder\s z6FileFinder.path_hook..path_hook_for_FileFinderr)r rrrrr path_hookRszFileFinder.path_hookcCr)NzFileFinder({!r}))r]rCrRrrr rdrzFileFinder.__repr__r)rrrrrrrrrrrrrrrrrr rs 3  rcCs|d}|d}|s!|r|j}n||krt||}nt||}|s*t|||d}z||d<||d<||d<||d<WdStyGYdSw)N __loader____spec__r__file__ __cached__)getrrjrar Exception)nsrpathname cpathnamerrrrr _fix_up_modulejs$     rcCs( ttf}ttf}ttf}|||gSr)rZrextension_suffixesrarrjr~) extensionssourcebytecoderrr rs   rcCs|adSr)r)_bootstrap_modulerrr _set_bootstrap_modulesrcCs4 t|t}tjtj|gtjt dSr) rrrrrrr meta_pathr?r)rsupported_loadersrrr _installs r)rZr)NNN)rr)T)Srrrcrrprrrntrrposixr3r=rr;r@_pathseps_with_colonr%_CASE_INSENSITIVE_PLATFORMS_BYTES_KEYrrrr%r,r.rErLrNrSrTrWrYrjtype__code__rr#rr"r)r@rr}rr?rrr~DEBUG_BYTECODE_SUFFIXESOPTIMIZED_BYTECODE_SUFFIXESrrrrrrrrrrrrrrobjectrrrrr-rGrarjrZrtrrrrrrrrrrr s            G(  !    IC2-5E1