bluesky / ophyd-async

Hardware abstraction for bluesky written using asyncio
https://blueskyproject.io/ophyd-async
BSD 3-Clause "New" or "Revised" License
12 stars 26 forks source link

`wait_for_value` should raise an `asyncio.TimeoutError` #572

Closed DominicOram closed 2 months ago

DominicOram commented 2 months ago

wait_for_value currently raises a TimeoutError rather than an asyncio.TimeoutError. The later is probably more expected given it's a coroutine.

Specifically this caught us in https://github.com/DiamondLightSource/dodal/actions/runs/10845576879/job/30096722501?pr=786 where we were expecting to catch an asyncio.Timeout and we were missing it.

Note this is only an issue in python <3.11, where the two errors were then combined.