o ?Og3 @sBddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdddej Z GdddejZedkred eZeed eiZd D] Zeeee<qTe eeZdad azddlZWn eyvYnweZd e_e ze WdSe!ytrt"st#d aYqwdS)N)futurescs$eZdZfddZddZZS)AsyncIOInteractiveConsolecs*t||jjjtjO_||_dS)N)super__init__compileZcompilerflagsastZPyCF_ALLOW_TOP_LEVEL_AWAITloop)selflocalsr  __class__7/opt/alt/python310/lib64/python3.10/asyncio/__main__.pyrs  z"AsyncIOInteractiveConsole.__init__csntjfdd}t|zWStyty6tr/ dYdS YdSw)Nc sdadatj}z|}Wn8tyty1}zda|WYd}~dSd}~wtyH}z |WYd}~dSd}~wwt |sU |dSzj |attWdSty|}z |WYd}~dSd}~ww)NFT) repl_futurerepl_future_interruptedtypes FunctionTyper SystemExitKeyboardInterruptZ set_exception BaseExceptioninspectZ iscoroutineZ set_resultr Z create_taskrZ _chain_future)funccoroZexexccodeZfuturer rrcallbacks6       z3AsyncIOInteractiveConsole.runcode..callbackz KeyboardInterrupt ) concurrentrZFuturer call_soon_threadsaferesultrrrwriteZ showtraceback)r rrrrrruncodes     z!AsyncIOInteractiveConsole.runcode)__name__ __module__ __qualname__rr# __classcell__rrr rrs rc@seZdZddZdS) REPLThreadc Cstz*dtjdtjdttddd}tj|ddWtjd d td t t j dStjd d td t t j w) Nz asyncio REPL z on zy Use "await" directly instead of "asyncio.run()". Type "help", "copyright", "credits" or "license" for more information. Zps1z>>> zimport asynciozexiting asyncio REPL...)bannerZexitmsgignorez ^coroutine .* was never awaited$)messagecategory) sysversionplatformgetattrconsoleZinteractwarningsfilterwarningsRuntimeWarningr r stop)r r)rrrrunFs* zREPLThread.runN)r$r%r&r6rrrrr(Ds r(__main__zcpython.run_stdinasyncio>r$__spec____file__ __builtins__ __package__ __loader__FT)$r r8rZconcurrent.futuresrrr-Z threadingrr2rZInteractiveConsolerZThreadr(r$auditZnew_event_loopr Zset_event_loopZ repl_localskeyr r1rrreadline ImportErrorZ repl_threadZdaemonstartZ run_foreverrZdoneZcancelrrrrsR 6