New submission from Yerken Tussupbekov <erkentus0...@gmail.com>:
``` import asyncio from concurrent import futures logging.basicConfig( level=logging.DEBUG, format="[%(asctime)s %(name)s %(levelname)s]: %(message)s", datefmt="%H:%M:%S %d-%m-%y", ) logger: logging.Logger = logging.getLogger("ideahitme") async def too_long() -> None: await asyncio.sleep(2) async def run() -> None: try: await asyncio.wait_for(too_long(), 1) except futures.TimeoutError: logger.info("concurrent.futures.TimeoutError happened") except asyncio.TimeoutError: logger.info("asyncio.TimeoutError happened") if __name__ == "__main__": asyncio.run(run()) ``` In python 3.8.4 running this script will print: asyncio.TimeoutError happened In python 3.7.5 running this script will print: concurrent.futures.TimeoutError happened This is a breaking change which I didn't see announced in the changelog. What is the expected behavior here ? ---------- components: asyncio messages: 374589 nosy: Yerken Tussupbekov, asvetlov, yselivanov priority: normal severity: normal status: open title: TimeoutError behavior changes on async.wait_for from python3.7 type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41438> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com