trio
trio copied to clipboard
trio.sleep_forever should mention that it raises if rescheduled
This causes a regression for anyone who was using
trio.sleep_forevercombined withtrio.lowlevel.reschedule. Okay, maybe they (we (I)) should have been usingtrio.lowlevel.wait_task_rescheduledbut theRuntimeErrorshould have been phased in with a warning over one release cycle.
Originally posted by @richardsheridan in https://github.com/python-trio/trio/pull/3096#issuecomment-2422986247
I think this regression is ultimately ok, especially since it's already done. We can update the docstring to mention this as in https://github.com/python-trio/trio/pull/3096#issuecomment-2422995153.