django-debug-toolbar
django-debug-toolbar copied to clipboard
CachePanel: monkeypatch Django's caches across sys.modules
Fixes https://github.com/jazzband/django-debug-toolbar/issues/799.
TODO:
- [ ] cleanup (consistent naming)
- [x] test(s)
Codecov Report
Merging #982 into master will decrease coverage by
2.41%. The diff coverage is78.57%.
@@ Coverage Diff @@
## master #982 +/- ##
==========================================
- Coverage 83.46% 81.04% -2.42%
==========================================
Files 28 28
Lines 1578 1583 +5
Branches 235 236 +1
==========================================
- Hits 1317 1283 -34
- Misses 192 221 +29
- Partials 69 79 +10
| Impacted Files | Coverage Δ | |
|---|---|---|
| debug_toolbar/panels/cache.py | 74.41% <78.57%> (-7.04%) |
:arrow_down: |
| debug_toolbar/compat.py | 50% <0%> (-50%) |
:arrow_down: |
| debug_toolbar/management/commands/__init__.py | 66.66% <0%> (-16.67%) |
:arrow_down: |
| debug_toolbar/panels/sql/utils.py | 70.65% <0%> (-13.18%) |
:arrow_down: |
| debug_toolbar/panels/headers.py | 95.45% <0%> (-4.55%) |
:arrow_down: |
| debug_toolbar/panels/templates/panel.py | 86.4% <0%> (-1.6%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 88ddc7b...7268b2c. Read the comment docs.
Codecov Report
Merging #982 into master will decrease coverage by
<.01%. The diff coverage is93.33%.
@@ Coverage Diff @@
## master #982 +/- ##
==========================================
- Coverage 83.46% 83.45% -0.01%
==========================================
Files 28 28
Lines 1578 1584 +6
Branches 235 237 +2
==========================================
+ Hits 1317 1322 +5
- Misses 192 193 +1
Partials 69 69
| Impacted Files | Coverage Δ | |
|---|---|---|
| debug_toolbar/panels/cache.py | 81.53% <93.33%> (+0.08%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 88ddc7b...45b1de3. Read the comment docs.
This might work, but looks really really evil :-/
Maybe https://github.com/jazzband/django-debug-toolbar/pull/800 would be less intrusive then? I was not aware that I did another PR already when doing this one..
@blueyed could you please update this PR and fix the conflicts?
Would be good to get a go considering its "evil-ness" before. /cc @matthiask @aaugustin
Aside from a general feeling that this could cause issues, I don't have a strong opinion on this. If you're ready to support users after this change, you can merge it.
The relevant code has changed a lot in this area. Please resubmit if you still want to work on this. Thanks in advance!