From df560f1309d44eea1a52472f47f6f35e2b63f6e3 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 4 Jul 2023 16:01:55 +0500 Subject: [PATCH] chore: updating deprecated method `force_text` with `force_str` --- require/storage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/require/storage.py b/require/storage.py index 9757321..6495cd1 100644 --- a/require/storage.py +++ b/require/storage.py @@ -8,7 +8,7 @@ from django.core.files.base import File from django.core.files.storage import FileSystemStorage from django.contrib.staticfiles.storage import StaticFilesStorage, ManifestStaticFilesStorage -from django.utils.encoding import force_text +from django.utils.encoding import force_str from require.conf import settings as require_settings from require.helpers import resolve_require_url @@ -136,9 +136,9 @@ def post_process(self, paths, dry_run=False, verbosity=1, **options): compiled_storage = FileSystemStorage(env.build_dir) # Walk the compiled directory, checking for modified assets. for build_dirpath, _, build_filenames in os.walk(env.build_dir): - build_dirpath = force_text(build_dirpath) + build_dirpath = force_str(build_dirpath) for build_filename in build_filenames: - build_filename = force_text(build_filename) + build_filename = force_str(build_filename) # Determine asset name. build_filepath = os.path.join(build_dirpath, build_filename) build_name = build_filepath[len(env.build_dir)+1:]