~corey.bryant/ubuntu/wily/python-pyscss/thedac

« back to all changes in this revision

Viewing changes to debian/patches/python-3.2-six.u.patch

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2014-06-26 12:10:36 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140626121036-3dv13zn5zptk9fpx
Tags: 1.2.0.post3-1
* Team upload.
* New upstream release (Closes: #738776).
* Added a debian/gbp.conf.
* Added missing ${python:Depends}
* Added Python 3 support.
* Removed duplicate debhelper build-depends.
* Cannonical VCS URLs.
* Standards-Version: is now 3.9.5.
* Added a watch file.
* override dh helpers which the package doesn't use.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fixups for Python 3.2 compat
 
2
 Uses six.u() whenever needed
 
3
Author: Thomas Goirand <zigo@debian.org>
 
4
Forwarded: no
 
5
Last-Update: 2014-06-27
 
6
 
 
7
--- python-pyscss-1.2.0.post3.orig/scss/expression.py
 
8
+++ python-pyscss-1.2.0.post3/scss/expression.py
 
9
@@ -326,7 +326,7 @@ class CallOp(Expression):
 
10
         rendered_args = [arg.render() for arg in args]
 
11
 
 
12
         return String(
 
13
-            u"%s(%s)" % (func_name, u", ".join(rendered_args)),
 
14
+            six.u("%s(%s)" % (func_name, six.u(", ".join(rendered_args)))),
 
15
             quotes=None)
 
16
 
 
17
 
 
18
--- python-pyscss-1.2.0.post3.orig/scss/types.py
 
19
+++ python-pyscss-1.2.0.post3/scss/types.py
 
20
@@ -16,7 +16,7 @@ from scss.util import escape
 
21
 
 
22
 class Value(object):
 
23
     is_null = False
 
24
-    sass_type_name = u'unknown'
 
25
+    sass_type_name = six.u('unknown')
 
26
 
 
27
     def __repr__(self):
 
28
         return '<%s(%s)>' % (self.__class__.__name__, repr(self.value))
 
29
@@ -123,7 +123,7 @@ class Value(object):
 
30
 
 
31
 class Null(Value):
 
32
     is_null = True
 
33
-    sass_type_name = u'null'
 
34
+    sass_type_name = six.u('null')
 
35
 
 
36
     def __init__(self, value=None):
 
37
         pass
 
38
@@ -151,7 +151,7 @@ class Null(Value):
 
39
 
 
40
 
 
41
 class Undefined(Null):
 
42
-    sass_type_name = u'undefined'
 
43
+    sass_type_name = six.u('undefined')
 
44
 
 
45
     def __init__(self, value=None):
 
46
         pass
 
47
@@ -200,7 +200,7 @@ class Undefined(Null):
 
48
 
 
49
 
 
50
 class Boolean(Value):
 
51
-    sass_type_name = u'bool'
 
52
+    sass_type_name = six.u('bool')
 
53
 
 
54
     def __init__(self, value):
 
55
         self.value = bool(value)
 
56
@@ -222,7 +222,7 @@ class Boolean(Value):
 
57
 
 
58
 
 
59
 class Number(Value):
 
60
-    sass_type_name = u'number'
 
61
+    sass_type_name = six.u('number')
 
62
 
 
63
     def __init__(self, amount, unit=None, unit_numer=(), unit_denom=()):
 
64
         if isinstance(amount, Number):
 
65
@@ -547,7 +547,7 @@ class List(Value):
 
66
     in CSS output.
 
67
     """
 
68
 
 
69
-    sass_type_name = u'list'
 
70
+    sass_type_name = six.u('list')
 
71
 
 
72
     def __init__(self, iterable, separator=None, use_comma=None, is_literal=False):
 
73
         if isinstance(iterable, List):
 
74
@@ -733,7 +733,7 @@ def _constrain(value, lb=0, ub=1):
 
75
 
 
76
 
 
77
 class Color(Value):
 
78
-    sass_type_name = u'color'
 
79
+    sass_type_name = six.u('color')
 
80
     original_literal = None
 
81
 
 
82
     def __init__(self, tokens):
 
83
@@ -976,7 +976,7 @@ class String(Value):
 
84
     Otherwise, double quotes are used.
 
85
     """
 
86
 
 
87
-    sass_type_name = u'string'
 
88
+    sass_type_name = six.u('string')
 
89
 
 
90
     def __init__(self, value, quotes='"'):
 
91
         if isinstance(value, String):
 
92
@@ -1058,7 +1058,7 @@ class String(Value):
 
93
 
 
94
 
 
95
 class Map(Value):
 
96
-    sass_type_name = u'map'
 
97
+    sass_type_name = six.u('map')
 
98
 
 
99
     def __init__(self, pairs, index=None):
 
100
         self.pairs = tuple(pairs)
 
101
@@ -1112,10 +1112,10 @@ def expect_type(value, types, unit=any):
 
102
         if len(sass_type_names) == 1:
 
103
             sass_type = sass_type_names[0]
 
104
         elif len(sass_type_names) == 2:
 
105
-            sass_type = u' or '.join(sass_type_names)
 
106
+            sass_type = six.u(' or ').join(sass_type_names)
 
107
         else:
 
108
-            sass_type = u', '.join(sass_type_names[:-1])
 
109
-            sass_type += u', or ' + sass_type_names[-1]
 
110
+            sass_type = six.u(', ').join(sass_type_names[:-1])
 
111
+            sass_type += six.u(', or ') + sass_type_names[-1]
 
112
 
 
113
         raise TypeError("Expected %s, got %r" % (sass_type, value))
 
114
 
 
115
--- python-pyscss-1.2.0.post3.orig/scss/functions/core.py
 
116
+++ python-pyscss-1.2.0.post3/scss/functions/core.py
 
117
@@ -8,6 +8,8 @@ from __future__ import division
 
118
 import logging
 
119
 import math
 
120
 
 
121
+import six
 
122
+
 
123
 from six.moves import xrange
 
124
 
 
125
 from scss.functions.library import FunctionLibrary
 
126
@@ -221,7 +223,7 @@ def lightness(color):
 
127
 @register('ie-hex-str', 1)
 
128
 def ie_hex_str(color):
 
129
     c = Color(color).value
 
130
-    return String(u'#%02X%02X%02X%02X' % (round(c[3] * 255), round(c[0]), round(c[1]), round(c[2])))
 
131
+    return String(six.u('#%02X%02X%02X%02X') % (round(c[3] * 255), round(c[0]), round(c[1]), round(c[2])))
 
132
 
 
133
 
 
134
 # ------------------------------------------------------------------------------