Skip to content

Commit af137cf

Browse files
authored
Fix deprecation warnings from Django (#731)
1 parent e31aa5a commit af137cf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pipeline/signals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.dispatch import Signal
22

33

4-
css_compressed = Signal(providing_args=["package"])
5-
js_compressed = Signal(providing_args=["package"])
4+
css_compressed = Signal()
5+
js_compressed = Signal()

pipeline/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from urllib.parse import quote
1414

15-
from django.utils.encoding import smart_text
15+
from django.utils.encoding import smart_str
1616

1717
from pipeline.conf import settings
1818

@@ -30,7 +30,7 @@ def to_class(class_str):
3030
def filepath_to_uri(path):
3131
if path is None:
3232
return path
33-
return quote(smart_text(path).replace("\\", "/"), safe="/~!*()'#?")
33+
return quote(smart_str(path).replace("\\", "/"), safe="/~!*()'#?")
3434

3535

3636
def guess_type(path, default=None):
@@ -39,7 +39,7 @@ def guess_type(path, default=None):
3939
mimetype, _ = mimetypes.guess_type(path)
4040
if not mimetype:
4141
return default
42-
return smart_text(mimetype)
42+
return smart_str(mimetype)
4343

4444

4545
def relpath(path, start=posixpath.curdir):

0 commit comments

Comments
 (0)