U if3 @sXddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdddej Z GdddejZedkrTed eZeed eiZd D]Zeeee<qe eeZdad az ddlZWnek rYnXeZd e_ez e Wn8e!k rJtr@t"s@t#d aYqYnXqTqdS)N)futurescs$eZdZfddZddZZS)AsyncIOInteractiveConsolecs*t||jjjtjO_||_dS)N)super__init__compileZcompilerflagsastZPyCF_ALLOW_TOP_LEVEL_AWAITloop)selflocalsr  __class__5/opt/alt/python38/lib64/python3.8/asyncio/__main__.pyrs z"AsyncIOInteractiveConsole.__init__csttjfdd}t|z WStk rDYn,tk rntrb dn YnXdS)Nc sdadatj}z |}Wnztk r6Ynftk rj}zda|WYdSd}~XYn2tk r}z|WYdSd}~XYnXt |s |dSzj |attWn.tk r}z|W5d}~XYnXdS)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 CsZz6dtjdtjdt tddd }t j |d d W5tjddtdttjXdS) Nignorez ^coroutine .* was never awaited$)messagecategoryz 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...)bannerZexitmsg) warningsfilterwarningsRuntimeWarningr r stopsysversionplatformgetattrconsoleZinteract)r r,rrrrunFs" zREPLThread.runN)r$r%r&r6rrrrr(Dsr(__main__zcpython.run_stdinasyncio>r$__file__ __package__ __builtins__ __loader____spec__FT)$r r8rZconcurrent.futuresrrr1Z threadingrr-rZInteractiveConsolerZThreadr(r$auditZnew_event_loopr Zset_event_loopZ repl_localskeyr r5rrreadline ImportErrorZ repl_threadZdaemonstartZ run_foreverrZdoneZcancelrrrrsH 6