#31654: Memcached key validation raises InvalidCacheKey with clunky message.
-------------------------------------+------------------------------------
Reporter: Tim McCormack | Owner: felixxm
Type: Bug | Status: assigned
Component: Core (Cache system) | Version: 2.2
Severity: Release blocker | Resolution:
Keywords: memcached | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Carlton Gibson):
* severity: Normal => Release blocker
Comment:
Thanks for the follow up Tim.
I still don't get the error using 3.5...
{{{
Python 3.5.9 (default, Jun 4 2020, 16:47:18)
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.core.cache.backends.base import CacheKeyWarning
>>> import warnings
>>> a_tuple = ('A string message, plus...', CacheKeyWarning)
>>> warnings.warn(a_tuple, CacheKeyWarning)
__main__:1: CacheKeyWarning: ('A string message, plus...', <class
'django.core.cache.backends.base.CacheKeyWarning'>)
}}}
There must be something else going on. Maybe a custom warning formatting?
(How else is the `TypeError: 'type' object cannot be interpreted as an
integer` — the warning class being converted to an int? 🤔)
[https://github.com/edx/edx-platform/pull/24137 The EdX change] will stop
the warning coming up, and is exactly the case that the patch was meant to
catch.
Treating CacheKeyWarnings as errors would be good — I wonder how many
folks would be seeing those and ignoring them... 😬
I think there's enough of a regression here to backport the fix.
--
Ticket URL: <https://code.djangoproject.com/ticket/31654#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.21f5f7ba3e934890b892c39438053982%40djangoproject.com.