Skip to content

Commit e55dc72

Browse files
author
Razvan Nesiu
committed
Update to python 3 syntax (force_unicode -> force_text)
1 parent 3436615 commit e55dc72

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

django_google_storage/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.utils.encoding import force_unicode
1+
from django.utils.encoding import force_text
22

33

44
def safe_join(base, *paths):
@@ -14,8 +14,8 @@ def safe_join(base, *paths):
1414
Paths outside the base path indicate a possible security sensitive operation.
1515
"""
1616
from urllib.parse import urljoin
17-
base_path = force_unicode(base)
18-
paths = [force_unicode(p) for p in paths]
17+
base_path = force_text(base)
18+
paths = [force_text(p) for p in paths]
1919
final_path = urljoin(base_path + ("/" if not base_path.endswith("/") else ""), *paths)
2020
# Ensure final_path starts with base_path and that the next character after
2121
# the final path is '/' (or nothing, in which case final_path must be

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='django-google-storage-updated',
6-
version='0.5.2',
6+
version='0.5.3',
77
packages=['django_google_storage', ],
88
author='Maxim Smirnoff',
99
author_email='[email protected]',

0 commit comments

Comments
 (0)