-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Avoid refcycles in run exc #3120
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3120 +/- ##
====================================================
- Coverage 100.00000% 99.82640% -0.17360%
====================================================
Files 124 124
Lines 18427 18433 +6
Branches 1215 1215
====================================================
- Hits 18427 18401 -26
- Misses 0 31 +31
- Partials 0 1 +1
|
0d79042
to
12e8395
Compare
src/trio/_core/_run.py
Outdated
@@ -1706,6 +1706,7 @@ def close(self) -> None: | |||
self.asyncgens.close() | |||
if "after_run" in self.instruments: | |||
self.instruments.call("after_run") | |||
self.system_nursery: Nursery | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type hint here isn't necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as this isn't the first time system_nursery
is set yes
demo.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you accidentally left this instead of copying parts over as a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, sorry I pushed this in draft so I don't lose it
I'm currently trying to work out if this change makes it possible to test Line 2790 in 12e8395
|
No description provided.