Skip to content

Disallow absolute deadlines for relative cancel scopes#3403

Open
A5rocks wants to merge 1 commit intopython-trio:mainfrom
A5rocks:remove-deprecation
Open

Disallow absolute deadlines for relative cancel scopes#3403
A5rocks wants to merge 1 commit intopython-trio:mainfrom
A5rocks:remove-deprecation

Conversation

@A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Mar 3, 2026

This just converts our deprecations into RuntimeErrors. It's been long enough!

@A5rocks A5rocks force-pushed the remove-deprecation branch from b97ab8b to ef54ef3 Compare March 3, 2026 05:45
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00000%. Comparing base (3dd35d7) to head (ef54ef3).

Additional details and impacted files
@@               Coverage Diff               @@
##                 main        #3403   +/-   ##
===============================================
  Coverage   100.00000%   100.00000%           
===============================================
  Files             128          128           
  Lines           19424        19418    -6     
  Branches         1318         1318           
===============================================
- Hits            19424        19418    -6     
Files with missing lines Coverage Δ
src/trio/_core/_run.py 100.00000% <100.00000%> (ø)
src/trio/_tests/test_timeouts.py 100.00000% <100.00000%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +1 to +3
Trying to use absolute deadlines on a `trio.CancelScope` constructed
with a relative deadline now raises, after being deprecated since Trio
0.27.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe have a small snippet about how to port old code if this wasn't already mentioned in 0.27.0's release notes, though I wouldn't expect many people to encounter that since it's been depreciated for quite a bit now.

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.

2 participants