mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-05-24 23:23:49 +00:00
Update compatibility for Django 4.0
The only meaningful change is removing use of `force_text` (which was deprecated in Django 3.0) in favor of `force_str` (which has existed since before Django 1.11). On Python 3 there is no functional difference between the two.
This commit is contained in:
parent
a64a0e8c33
commit
198f6a3295
2 changed files with 3 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
"""Low-level IO operations, for use with file wrappers."""
|
||||
import io
|
||||
|
||||
from django.utils.encoding import force_bytes, force_text
|
||||
from django.utils.encoding import force_bytes, force_str
|
||||
|
||||
|
||||
class TextIteratorIO(io.TextIOBase):
|
||||
|
|
@ -32,7 +32,7 @@ class TextIteratorIO(io.TextIOBase):
|
|||
break
|
||||
else:
|
||||
# Make sure we handle text.
|
||||
self._left = force_text(self._left)
|
||||
self._left = force_str(self._left)
|
||||
ret = self._left[:n]
|
||||
self._left = self._left[len(ret) :]
|
||||
return ret
|
||||
|
|
|
|||
1
setup.py
1
setup.py
|
|
@ -23,6 +23,7 @@ setup(
|
|||
'Framework :: Django :: 2.2',
|
||||
'Framework :: Django :: 3.1',
|
||||
'Framework :: Django :: 3.2',
|
||||
'Framework :: Django :: 4.0',
|
||||
],
|
||||
keywords=" ".join(
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in a new issue