Skip to content

Conversation

@A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Sep 21, 2025

Fixes #3332

While this loses a little bit of information on pre-3.11 versions,
I think it's worth the readability improvements. I could be convinced
that conditionally raising the exception group with the special note
would work too, though.

This commit also simplifies a test by accounting for cancellation.

Fixes python-trio#3332
@A5rocks A5rocks requested review from Zac-HD and jakkdl September 21, 2025 02:26
@codecov
Copy link

codecov bot commented Sep 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00000%. Comparing base (0f975c3) to head (d09e942).
⚠️ Report is 47 commits behind head on main.

Additional details and impacted files
@@               Coverage Diff               @@
##                 main        #3334   +/-   ##
===============================================
  Coverage   100.00000%   100.00000%           
===============================================
  Files             125          125           
  Lines           19582        19586    +4     
  Branches         1341         1342    +1     
===============================================
+ Hits            19582        19586    +4     
Files with missing lines Coverage Δ
src/trio/_channel.py 100.00000% <100.00000%> (ø)
src/trio/_tests/test_channel.py 100.00000% <100.00000%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Zac-HD Zac-HD merged commit fc16b60 into python-trio:main Sep 21, 2025
43 checks passed
@A5rocks A5rocks deleted the improved-safe-generator branch September 21, 2025 19:54
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.

as_safe_channel could wrap exception groups less

3 participants