()
| 29 | |
| 30 | @contextlib.contextmanager |
| 31 | def silence_asyncio_long_exec_warning(): |
| 32 | def flt(log_record): |
| 33 | msg = log_record.getMessage() |
| 34 | return not msg.startswith('Executing ') |
| 35 | |
| 36 | logger = logging.getLogger('asyncio') |
| 37 | logger.addFilter(flt) |
| 38 | try: |
| 39 | yield |
| 40 | finally: |
| 41 | logger.removeFilter(flt) |
| 42 | |
| 43 | |
| 44 | def with_timeout(timeout): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…