#28679: urlencode does not decode bytes before passing them to Python's urlencode -------------------------------------+------------------------------------- Reporter: François Freitag | Owner: François | Freitag Type: Bug | Status: assigned Component: Utilities | Version: 2.0 Severity: Release blocker | Resolution: Keywords: urlencode bytes | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by François Freitag): Python is [https://github.com/python/cpython/blob/543386b7f077d210ea0722079d68beb6c066730a/Lib/urllib/parse.py#L867-L891|treating bytes differently than other types], perhaps Django should maintain that behaviour? IMHO, decoding user-encoded text (assuming utf-8) and re-encoding is not useful and may cause harm to users who decided to encode their data using another encoding. I tend to agree with Claude on special-casing bytes. -- Ticket URL: <https://code.djangoproject.com/ticket/28679#comment:5> 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/073.07c75f0f8e4b2e9268ad265c7aaf5b68%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.