This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Yerken Tussupbekov
Recipients Yerken Tussupbekov, asvetlov, yselivanov
Date 2020-07-29.22:17:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596061048.21.0.803910276646.issue41438@roundup.psfhosted.org>
In-reply-to
Content
```
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 ?
History
Date User Action Args
2020-07-29 22:17:28Yerken Tussupbekovsetrecipients: + Yerken Tussupbekov, asvetlov, yselivanov
2020-07-29 22:17:28Yerken Tussupbekovsetmessageid: <1596061048.21.0.803910276646.issue41438@roundup.psfhosted.org>
2020-07-29 22:17:28Yerken Tussupbekovlinkissue41438 messages
2020-07-29 22:17:27Yerken Tussupbekovcreate