Skip to content

Commit

Permalink
Merge pull request etianen#130 from kevinmarsh/feature/remove-depreca…
Browse files Browse the repository at this point in the history
…ted-force-text

Django 4.0: replace deprecated `force_text` with `force_str`
  • Loading branch information
etianen authored Sep 24, 2021
2 parents 1d6bca1 + 3c4d8ff commit 2fd1b66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_s3_storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from django.core.files.storage import Storage
from django.core.signals import setting_changed
from django.utils.deconstruct import deconstructible
from django.utils.encoding import filepath_to_uri, force_bytes, force_str, force_text
from django.utils.encoding import filepath_to_uri, force_bytes, force_str
from django.utils.timezone import make_naive, utc

log = logging.getLogger(__name__)
Expand All @@ -39,7 +39,7 @@ def _do_wrap_errors(self, name, *args, **kwargs):
err_cls = OSError
if code == "NoSuchKey":
err_cls = FileNotFoundError
raise err_cls("S3Storage error at {!r}: {}".format(name, force_text(ex)))
raise err_cls("S3Storage error at {!r}: {}".format(name, force_str(ex)))
return _do_wrap_errors


Expand Down

0 comments on commit 2fd1b66

Please sign in to comment.