a d @sFddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdddej Z GdddejZedkrBeZeed eiZd D]Zeeee<qe eeZdad az ddlZWneyYn0eZd e_ez eWn4e y:tr2t!s2t"d aYqYq0qBqdS) N)futurescs$eZdZfddZddZZS)AsyncIOInteractiveConsolecs*t||jjjtjO_||_dS)N)super__init__compileZcompilerflagsastZPyCF_ALLOW_TOP_LEVEL_AWAITloop)selflocalsr  __class__5/opt/alt/python39/lib64/python3.9/asyncio/__main__.pyrs z"AsyncIOInteractiveConsole.__init__csptjfdd}t|z WStyBYn*tyjtr^ dn Yn0dS)Nc sdadatj}z |}Wntty4Ynbtyf}zda|WYd}~dSd}~0ty}z|WYd}~dSd}~00t |s |dSzj |attWn0ty}z|WYd}~n d}~00dS)NFT) repl_futurerepl_future_interruptedtypes FunctionTyper SystemExitKeyboardInterruptZ set_exception BaseExceptioninspectZ iscoroutineZ set_resultr Z create_taskrZ _chain_future)funccoroZexexccodeZfuturer rrcallbacks,       z3AsyncIOInteractiveConsole.runcode..callbackz KeyboardInterrupt ) concurrentrZFuturer call_soon_threadsaferesultrrrwriteZ showtraceback)r rrrrrruncodes      z!AsyncIOInteractiveConsole.runcode)__name__ __module__ __qualname__rr# __classcell__rrr rrs rc@seZdZddZdS) REPLThreadc CsvzRdtjdtjdttddd}tj|ddWtjd d td t t j ntjd d td t t j 0dS) 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(Dsr(__main__asyncio>__spec____file__ __builtins__ __package__ __loader__r$FT)#r r8rZconcurrent.futuresrrr-Z threadingrr2rZInteractiveConsolerZThreadr(r$Znew_event_loopr Zset_event_loopZ repl_localskeyr r1rrreadline ImportErrorZ repl_threadZdaemonstartZ run_foreverrZdoneZcancelrrrrsF 6