#30294: HttpResponse doesn't handle memoryview objects
-------------------------------------+-------------------------------------
     Reporter:  Roger Hunwicks       |                    Owner:  sage
         Type:  New feature          |                   Status:  assigned
    Component:  HTTP handling        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Roger Hunwicks):

 Personally, I think it is a Bug Fix because this used to work on Django
 1.8 and Python 2.7 and it no longer works on Django 2.2 and Python 3.x.
 The difference is that in Python 2.7 `BinaryField` returned a `buffer`
 which was handled correctly, but on Python 3.6 it returns a `memoryview`.
 I think this change is because Psycopg2 returns different on objects on
 Py2 vs Py3 and `BinaryField` just passes them on. It is not Django's fault
 that the Py2 vs Py3 differences in the upstream library caused a
 regression, but it still looks like a regression that Django code that
 used to work (`BinaryField` -> `HttpResponse`) no longer does.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30294#comment:9>
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/067.f3bfd8e1b90ff4ab0680e374628a325a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to