#28095: Widget "build_attrs" changed method signature
------------------------------------------+------------------------
               Reporter:  Melvyn Sopacua  |          Owner:  nobody
                   Type:  Bug             |         Status:  new
              Component:  Documentation   |        Version:  1.11
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  1
                  UI/UX:  0               |
------------------------------------------+------------------------
 While build_attrs is undocumented (not sure why, since many widgets
 override render() and make use of build_attrs) and changed it's method
 signature in 1.11 by removing kwargs.

 This isn't mentioned in the release notes.

 A compatibility method could look something like this:


 {{{
     def build_attrs(self, extra_attrs=None, **kwargs):
         # Django 1.11 changed method signature by removing kwargs
         if extra_attrs:
             kwargs.update(extra_attrs)
         return super().build_attrs(extra_attrs=kwargs)

 }}}

 An update of the release notes would be very welcome.

--
Ticket URL: <https://code.djangoproject.com/ticket/28095>
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/057.66edf638a412859fc4eae4b805887e7b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to