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: prevent qthrottled and qdebounced from holding strong references with bound methods #247

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

tlambert03
Copy link
Member

I hit a cleanup issue and eventually traced it back to qdebounced/qthrottled holding a strong reference when used on a bound method. This ensures that those two decorators don't hold strong refs

Copy link

codecov bot commented Jun 2, 2024

Codecov Report

Attention: Patch coverage is 97.43590% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 87.14%. Comparing base (7b1aefd) to head (4badc90).

Files Patch % Lines
src/superqt/utils/_throttler.py 97.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #247      +/-   ##
==========================================
+ Coverage   87.07%   87.14%   +0.06%     
==========================================
  Files          46       46              
  Lines        3397     3423      +26     
==========================================
+ Hits         2958     2983      +25     
- Misses        439      440       +1     

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

@tlambert03 tlambert03 requested a review from Czaki June 2, 2024 19:18
@tlambert03
Copy link
Member Author

review from @Czaki would be appreciated

Copy link
Contributor

@Czaki Czaki left a comment

Choose a reason for hiding this comment

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

In general, looks ok. A few minor suggestions, but I'm not sure what you already tested.

src/superqt/utils/_throttler.py Outdated Show resolved Hide resolved
src/superqt/utils/_throttler.py Show resolved Hide resolved
src/superqt/utils/_throttler.py Show resolved Hide resolved
src/superqt/utils/_throttler.py Show resolved Hide resolved
@tlambert03 tlambert03 merged commit 1f4d908 into pyapp-kit:main Jun 3, 2024
48 checks passed
@tlambert03 tlambert03 deleted the fix-strong-ref branch June 3, 2024 14:24
@tlambert03 tlambert03 added the bug Something isn't working label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants