pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

fix: prevent qthrottled and qdebounced from holding strong references with bound methods #247

Closed tlambert03 closed 5 months ago

tlambert03 commented 5 months ago

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

codecov[bot] commented 5 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tlambert03 commented 5 months ago

review from @Czaki would be appreciated