diff --git a/django/utils/safestring.py b/django/utils/safestring.py index 5128add622..93d74f602d 100644 --- a/django/utils/safestring.py +++ b/django/utils/safestring.py @@ -18,27 +18,6 @@ class SafeData: return self -class SafeBytes(bytes, SafeData): - """ - A bytes subclass that has been specifically marked as "safe" (requires no - further escaping) for HTML output purposes. - - Kept in Django 2.0 for usage by apps supporting Python 2. Shouldn't be used - in Django anymore. - """ - def __add__(self, rhs): - """ - Concatenating a safe byte string with another safe byte string or safe - string is safe. Otherwise, the result is no longer safe. - """ - t = super().__add__(rhs) - if isinstance(rhs, SafeText): - return SafeText(t) - elif isinstance(rhs, SafeBytes): - return SafeBytes(t) - return t - - class SafeText(str, SafeData): """ A str subclass that has been specifically marked as "safe" for HTML output diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt index 19361cc195..a657a4b0a0 100644 --- a/docs/releases/3.0.txt +++ b/docs/releases/3.0.txt @@ -274,6 +274,8 @@ Django 3.0, we're removing these APIs at this time. * ``django.utils.functional.curry()`` - Use :func:`functools.partial` or :class:`functools.partialmethod`. See :commit:`5b1c389603a353625ae1603`. +* ``django.utils.safestring.SafeBytes`` - Unused since Django 2.0. + Miscellaneous -------------