Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
474a5543
Commit
474a5543
authored
Jul 26, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move 'unicode' name in Tempita out of the way of 2to3 in Py3.2
parent
97dda59a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Cython/Tempita/_tempita.py
Cython/Tempita/_tempita.py
+2
-2
Cython/Tempita/compat3.py
Cython/Tempita/compat3.py
+3
-3
No files found.
Cython/Tempita/_tempita.py
View file @
474a5543
...
@@ -43,7 +43,7 @@ import tokenize
...
@@ -43,7 +43,7 @@ import tokenize
from
io
import
StringIO
from
io
import
StringIO
from
._looper
import
looper
from
._looper
import
looper
from
.compat3
import
bytes
,
unicode
,
basestring_
,
next
,
is_unicode
,
coerce_text
from
.compat3
import
bytes
,
unicode
_
,
basestring_
,
next
,
is_unicode
,
coerce_text
__all__
=
[
'TemplateError'
,
'Template'
,
'sub'
,
'HTMLTemplate'
,
__all__
=
[
'TemplateError'
,
'Template'
,
'sub'
,
'HTMLTemplate'
,
'sub_html'
,
'html'
,
'bunch'
]
'sub_html'
,
'html'
,
'bunch'
]
...
@@ -328,7 +328,7 @@ class Template(object):
...
@@ -328,7 +328,7 @@ class Template(object):
return ''
return ''
if self._unicode:
if self._unicode:
try:
try:
value = unicode(value)
value = unicode
_
(value)
except UnicodeDecodeError:
except UnicodeDecodeError:
value = bytes(value)
value = bytes(value)
else:
else:
...
...
Cython/Tempita/compat3.py
View file @
474a5543
import
sys
import
sys
__all__
=
[
'b'
,
'basestring_'
,
'bytes'
,
'unicode'
,
'next'
,
'is_unicode'
]
__all__
=
[
'b'
,
'basestring_'
,
'bytes'
,
'unicode
_
'
,
'next'
,
'is_unicode'
]
if
sys
.
version
<
"3"
:
if
sys
.
version
<
"3"
:
b
=
bytes
=
str
b
=
bytes
=
str
basestring_
=
basestring
basestring_
=
basestring
unicode
=
unicode
unicode
_
=
unicode
else
:
else
:
def
b
(
s
):
def
b
(
s
):
...
@@ -14,7 +14,7 @@ else:
...
@@ -14,7 +14,7 @@ else:
return
bytes
(
s
)
return
bytes
(
s
)
basestring_
=
(
bytes
,
str
)
basestring_
=
(
bytes
,
str
)
bytes
=
bytes
bytes
=
bytes
unicode
=
str
unicode
_
=
str
text
=
str
text
=
str
if
sys
.
version
<
"3"
:
if
sys
.
version
<
"3"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment