#26460: Don't call ``warnings.warn`` for each invalid character in a caching key -------------------------------+-------------------------------------- Reporter: suligap | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 1.9 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------------------------- Changes (by suligap):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Old description: > BaseCache.validate_key() will call `warnings.warn()` > [https://github.com/django/django/blob/15a20dc9aff1bd8a055ee7c322631b3ca4d1c474/django/core/cache/backends/base.py#L240-L244 > for each invalid character in the key]. This is not a big issue since > only one warning will appear but it is unnecessary. New description: BaseCache.validate_key() will call `warnings.warn()` [https://github.com/django/django/blob/15a20dc9aff1bd8a055ee7c322631b3ca4d1c474/django/core/cache/backends/base.py#L240-L244 for each invalid character in the key]. This is not a big issue since only one warning will appear but it is unnecessary. Fixed in https://github.com/django/django/pull/6414 -- -- Ticket URL: <https://code.djangoproject.com/ticket/26460#comment:1> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.47911bbcd3ce4319be2556421c12fa57%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.