(self)
| 68 | class REPLThread(threading.Thread): |
| 69 | |
| 70 | def run(self): |
| 71 | try: |
| 72 | banner = ( |
| 73 | f'asyncio REPL {sys.version} on {sys.platform}\n' |
| 74 | f'Use "await" directly instead of "asyncio.run()".\n' |
| 75 | f'Type "help", "copyright", "credits" or "license" ' |
| 76 | f'for more information.\n' |
| 77 | f'{getattr(sys, "ps1", ">>> ")}import asyncio' |
| 78 | ) |
| 79 | |
| 80 | console.interact( |
| 81 | banner=banner, |
| 82 | exitmsg='exiting asyncio REPL...') |
| 83 | finally: |
| 84 | warnings.filterwarnings( |
| 85 | 'ignore', |
| 86 | message=r'^coroutine .* was never awaited$', |
| 87 | category=RuntimeWarning) |
| 88 | |
| 89 | loop.call_soon_threadsafe(loop.stop) |
| 90 | |
| 91 | |
| 92 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected