Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

graingert
Copy link
Member

No description provided.

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.45%. Comparing base (7334c42) to head (afb6752).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3120      +/-   ##
==========================================
- Coverage   99.62%   99.45%   -0.18%     
==========================================
  Files         122      122              
  Lines       18360    18366       +6     
  Branches     1222     1222              
==========================================
- Hits        18291    18265      -26     
- Misses         47       78      +31     
- Partials       22       23       +1     
Files with missing lines Coverage Δ
src/trio/_core/_run.py 98.83% <100.00%> (-0.19%) ⬇️

... and 2 files with indirect coverage changes

---- 🚨 Try these New Features:

@@ -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
Copy link
Contributor

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

Copy link
Member

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
Copy link
Contributor

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.

Copy link
Member Author

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

@graingert
Copy link
Member Author

I'm currently trying to work out if this change makes it possible to test

# TODO: develop test for this deletion

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.

3 participants