async with asyncio.timeout(5):, added in Python 3.11, implements a deadline by cancelling the enclosed code. The cancellation arrives as CancelledError inside the block, and the context manager converts it to TimeoutError on the way out. asyncio.wait_for has worked the same way for longer.
That detail explains a common bug: a try/except CancelledError inside the block, or a cleanup handler that catches it and does not re-raise, absorbs the timeout entirely. The code keeps running past its deadline and the caller never sees TimeoutError. except asyncio.CancelledError: ... raise is the only safe form.
A second consequence is that the timeout cannot interrupt code that never awaits. A blocking call or a tight CPU loop inside the block runs to completion regardless of the deadline, because cancellation is only delivered at an await point. Move such work to asyncio.to_thread. Since Python 3.11, TimeoutError and asyncio.TimeoutError are the same class, so the old alias-specific except clauses can be simplified.