#36104: forms.Media shouldn't expect media objects only
-------------------------------------+-------------------------------------
               Reporter:  Matthias   |          Owner:  Matthias Kestenholz
  Kestenholz                         |
                   Type:  Bug        |         Status:  assigned
              Component:  Forms      |        Version:  5.1
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  1
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 While thinking about https://forum.djangoproject.com/t/rejuvenating-vs-
 deprecating-form-media/21285 I have noticed that the `forms.Media.__add__`
 method assumes that media objects are only ever added to each other. That
 doesn't necessarily have to be the case.

 I propose returning `NotImplemented` when the RHS isn't a `Media` instance
 but something else.

 All tests pass locally.

 (It has nothing to do with https://code.djangoproject.com/ticket/35648
 specifically but the same discussion probably applies.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36104>
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/010701946f586c0c-1d1fafa4-8da1-4436-927d-5c1c24a358c5-000000%40eu-central-1.amazonses.com.

Reply via email to