#37102: CountsDict.__init__() passes *kwargs instead of **kwargs to
super().__init__()
----------------------+--------------------------------------
Reporter: 王鑫 | Type: Bug
Status: new | Component: Utilities
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------+--------------------------------------
The CountsDict class in django/utils/html.py has a bug in its __init__
method:
class CountsDict(dict):
def __init__(self, *args, word, **kwargs):
super().__init__(*args, *kwargs) # BUG: should be **kwargs
self.word = word
The call uses *kwargs (positional unpacking) instead of **kwargs
(keyword unpacking). Currently this never triggers because CountsDict is
only called with
word=middle, but it would fail if any keyword arguments were passed.
The fix is to change *kwargs to **kwargs on line 281.
--
Ticket URL: <https://code.djangoproject.com/ticket/37102>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019e34fde8d8-55c24e2a-b12d-4ec5-aa6b-232a63c64a89-000000%40eu-central-1.amazonses.com.