A simple fix would be to add an `if not isinstance(bytes, data)` check
before invoking the `_encode_data` function.
--
Ticket URL: <https://code.djangoproject.com/ticket/29520>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Herbert Fortes (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/29520#comment:1>
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Simply reverting the commit (and adding a test with a `bytes`-POST data)
could also be considered.
--
Ticket URL: <https://code.djangoproject.com/ticket/29520#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/10101 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29520#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/29520#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"9294110a57ce0a6d14506969c950090045c622c8" 9294110a]:
{{{
#!CommitTicketReference repository=""
revision="9294110a57ce0a6d14506969c950090045c622c8"
Fixed #29520 -- Fixed test client crash when posting bytes.
Regression in b8a41a2872624a6d9e61308932dd81d001e31eb9.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29520#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"01b7fdfd67a87e8c881e34d7ed97767c506b189c" 01b7fdfd]:
{{{
#!CommitTicketReference repository=""
revision="01b7fdfd67a87e8c881e34d7ed97767c506b189c"
[2.1.x] Fixed #29520 -- Fixed test client crash when posting bytes.
Regression in b8a41a2872624a6d9e61308932dd81d001e31eb9.
Backport of 9294110a57ce0a6d14506969c950090045c622c8 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29520#comment:6>