1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #27795 -- Removed force_bytes() usage from django/utils/http.py.

django.utils.http.urlsafe_base64_encode() now returns a string, not a
bytestring. Since URLs are represented as strings,
urlsafe_base64_encode() should return a string. All uses immediately
decoded the bytestring to a string anyway.

As the inverse operation, urlsafe_base64_decode() accepts a string.
This commit is contained in:
Jon Dufresne
2018-10-01 18:18:04 -05:00
committed by Tim Graham
parent f3d3338e06
commit c82893cb8c
6 changed files with 21 additions and 10 deletions

View File

@@ -298,6 +298,10 @@ Miscellaneous
* Support for bytestring paths in the template filesystem loader is removed.
* :func:`django.utils.http.urlsafe_base64_encode` now returns a string instead
of a bytestring, and :func:`django.utils.http.urlsafe_base64_decode` may no
longer be passed a bytestring.
.. _deprecated-features-2.2:
Features deprecated in 2.2