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

fix(backport): Skip callbacks with dead weakrefs while iterating over callbacks #2321

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

matthewfeickert
Copy link
Member

Description

  • Backport PR fix: Skip callbacks with dead weakrefs while iterating over callbacks #2310
  • Check refs while processing callbacks in case a callee is de-ref'd during the callback process.
  • Additionally flush after processing callbacks in case any callback de-ref's a callee.
  • Note that no additional tests are added for this case as the problem arises from and intermediate callback triggering a garbage-collect. It is unclear how to force this scenario deterministically in testing.
  • Add Jonas Rembser to contributors list.

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Backport PR https://github.com/scikit-hep/pyhf/pull/2310
* Check refs while processing callbacks in case a callee is de-ref'd during
  the callback process.
* Additionally flush after processing callbacks in case any callback de-ref's
  a callee.
* Note that no additional tests are added for this case as the problem arises from
  and intermediate callback triggering a garbage-collect. It is unclear how to force
  this scenario deterministically in testing.
* Add Jonas Rembser to contributors list.

… callbacks

* Backport PR https://github.com/scikit-hep/pyhf/pull/ 2310
* Check refs while processing callbacks in case a callee is de-ref'd during
  the callback process.
* Additionally flush after processing callbacks in case any callback de-ref's
  a callee.
* Note that no additional tests are added for this case as the problem arises from
  and intermediate callback triggering a garbage-collect. It is unclear how to force
  this scenario deterministically in testing.
* Add Jonas Rembser to contributors list.

Co-authored-by: Jonas Rembser <[email protected]>
@matthewfeickert matthewfeickert added docs Documentation related fix A bug fix backport Backport PRs from main to release branch labels Sep 6, 2023
@matthewfeickert matthewfeickert self-assigned this Sep 6, 2023
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release/v0.7.x@a8b6fce). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/v0.7.x    #2321   +/-   ##
=================================================
  Coverage                  ?   98.21%           
=================================================
  Files                     ?       69           
  Lines                     ?     4542           
  Branches                  ?      803           
=================================================
  Hits                      ?     4461           
  Misses                    ?       47           
  Partials                  ?       34           
Flag Coverage Δ
contrib 27.52% <0.00%> (?)
doctest 60.98% <0.00%> (?)
unittests-3.10 96.25% <0.00%> (?)
unittests-3.7 96.23% <0.00%> (?)
unittests-3.8 96.27% <0.00%> (?)
unittests-3.9 96.30% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewfeickert matthewfeickert merged commit 70a0558 into release/v0.7.x Sep 6, 2023
16 checks passed
@matthewfeickert matthewfeickert deleted the backport/fix-weakrefs branch September 6, 2023 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Backport PRs from main to release branch docs Documentation related fix A bug fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants