File: remove-six.patch

package info (click to toggle)
django-assets 2.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 436 kB
  • sloc: python: 977; makefile: 129; sh: 6
file content (70 lines) | stat: -rw-r--r-- 2,160 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- a/django_assets/filter.py
+++ b/django_assets/filter.py
@@ -5,7 +5,6 @@
 """
 from django.template import Template, Context
 
-from webassets import six
 from webassets.filter import Filter, register_filter
 
 
--- a/django_assets/glob.py
+++ b/django_assets/glob.py
@@ -16,7 +16,6 @@
 """
 
 import re
-from webassets import six
 
 __all__ = ["filter", "fnmatch", "fnmatchcase", "translate"]
 
@@ -235,10 +234,6 @@
         and faster to filter here than in :meth:`_iglob`.
         """
 
-        if isinstance(pattern, six.text_type) and not isinstance(dirname, six.text_type):
-            dirname = six.u(dirname, sys.getfilesystemencoding() or
-                                       sys.getdefaultencoding())
-
         # If no magic, short-circuit, only check for existence
         if not has_magic(pattern):
             if pattern == '':
--- a/django_assets/templatetags/assets.py
+++ b/django_assets/templatetags/assets.py
@@ -5,7 +5,6 @@
 from django_assets import Bundle
 from django_assets.env import get_env
 
-from webassets import six
 from webassets.exceptions import ImminentDeprecationWarning
 
 
@@ -60,7 +59,7 @@
             #
             # {% assets filters="jsmin", output="path/to/file.js", depends="watchfile.js,second/watch/file.js" "projectfile.js" %}
             value = resolve_var(x)
-            if isinstance(value, six.text_type):
+            if isinstance(value, str):
                 value = value.split(',')
             return value
         def resolve_bundle(name):
--- a/tests/test_django.py
+++ b/tests/test_django.py
@@ -8,7 +8,6 @@
 from django_assets import Bundle, register as django_env_register
 from django_assets.env import get_env
 from django_assets.env import reset as django_env_reset
-from webassets import six
 
 from webassets.test import (
     TempDirHelper,
@@ -294,9 +293,6 @@
     def get(self, name):
         """Return the given file's contents.
         """
-        if not six.PY3:
-            return super(TestFilter, self).get(name).decode('utf-8')
-
         import codecs
         with codecs.open(self.path(name), "r", "utf-8") as f:
             return f.read()