Skip to content

Document that trio.sleep_forever will raise RuntimeError instead of returning #3115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Oct 19, 2024

Fixes #3113.

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59632%. Comparing base (8850705) to head (1c94d82).
Report is 304 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main       #3115         +/-   ##
===================================================
+ Coverage   99.58694%   99.59632%   +0.00938%     
===================================================
  Files            121         121                 
  Lines          18157       18827        +670     
  Branches        3272        3517        +245     
===================================================
+ Hits           18082       18751        +669     
- Misses            52          53          +1     
  Partials          23          23                 
Files with missing lines Coverage Δ
src/trio/_timeouts.py 100.00000% <ø> (ø)

... and 10 files with indirect coverage changes

@TeamSpen210
Copy link
Contributor

I don't think this should say "instead of returning", it won't do so in normal usage, it'll only return if cancelled. Better to say that it never returns, and raises RuntimeError if manually rescheduled.

@jakkdl jakkdl merged commit 3d592af into python-trio:main Oct 21, 2024
38 checks passed
@A5rocks A5rocks deleted the document-trio-sleep-forever-exception branch November 18, 2024 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trio.sleep_forever should mention that it raises if rescheduled
5 participants