-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Changed cache monkey-patching for Django 3.2+ #1497
Conversation
32ebfd7
to
a6ceea2
Compare
Codecov Report
@@ Coverage Diff @@
## main #1497 +/- ##
==========================================
- Coverage 86.61% 85.72% -0.90%
==========================================
Files 35 35
Lines 1868 1891 +23
Branches 262 272 +10
==========================================
+ Hits 1618 1621 +3
- Misses 178 190 +12
- Partials 72 80 +8
Continue to review full report at Codecov.
|
Shoot. This still needs to monkey-patch |
That would require changing the settings which is a no-no. So I was right the first time. |
5323013
to
f282050
Compare
The reduction in code coverage is because our report doesn't handle the coverage across different versions (I think). |
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.
The reduction in code coverage is because our report doesn't handle the coverage across different versions (I think).
I can't say for sure but I think you're right.
Changed cache monkey-patching for Django 3.2+ to iterate over existing caches and patch them individually rather than attempting to patch django.core.caches as a whole. The middleware.cache is still being patched as a whole in order to attempt to catch any cache usages before enable_instrumentation is called. Test cache panel is diabled for middleware before it.
Co-authored-by: Matthias Kestenholz <mk@feinheit.ch>
ba6cc27
to
060860a
Compare
Changed caching monkey-patching for Django3.2+ to iterate over existing
caches and patch them individually rather than attempting to patch
django.core.caches
as a whole. Themiddleware.cache
is stillbeing patched as a whole in order to attempt to catch any cache
usages before enable_instrumentation is called.
Fixes #1496
Big thanks to @LiorA1 for reporting the issue and creating a reproducible test case.