Message374589
```
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 ? |
|
Date |
User |
Action |
Args |
2020-07-29 22:17:28 | Yerken Tussupbekov | set | recipients:
+ Yerken Tussupbekov, asvetlov, yselivanov |
2020-07-29 22:17:28 | Yerken Tussupbekov | set | messageid: <1596061048.21.0.803910276646.issue41438@roundup.psfhosted.org> |
2020-07-29 22:17:28 | Yerken Tussupbekov | link | issue41438 messages |
2020-07-29 22:17:27 | Yerken Tussupbekov | create | |
|