Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-mako
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-mako
Commits
adad0a0a
Commit
adad0a0a
authored
11 years ago
by
Mike Bayer
Browse files
Options
Downloads
Patches
Plain Diff
- [bug] The Babel plugin has been repaired to work on Python 3.
parent
e14a6860
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES
+2
-0
2 additions, 0 deletions
CHANGES
mako/compat.py
+5
-0
5 additions, 0 deletions
mako/compat.py
mako/ext/babelplugin.py
+2
-2
2 additions, 2 deletions
mako/ext/babelplugin.py
with
9 additions
and
2 deletions
CHANGES
+
2
−
0
View file @
adad0a0a
...
...
@@ -6,6 +6,8 @@
is backwards incompatible vs. code that is relying upon a _('')
translation to be working within a call tag.
- [bug] The Babel plugin has been repaired to work on Python 3.
0.8.1
- [bug] Changed setup.py to skip installing markupsafe
if Python version is < 2.6 or is between 3.0 and
...
...
This diff is collapsed.
Click to expand it.
mako/compat.py
+
5
−
0
View file @
adad0a0a
...
...
@@ -18,6 +18,8 @@ if py3k:
binary_type
=
bytes
text_type
=
str
from
io
import
BytesIO
as
byte_buffer
def
u
(
s
):
return
s
...
...
@@ -30,6 +32,9 @@ else:
from
cStringIO
import
StringIO
except
:
from
StringIO
import
StringIO
byte_buffer
=
StringIO
from
urllib
import
quote_plus
,
unquote_plus
from
htmlentitydefs
import
codepoint2name
,
name2codepoint
string_types
=
basestring
,
...
...
This diff is collapsed.
Click to expand it.
mako/ext/babelplugin.py
+
2
−
2
View file @
adad0a0a
...
...
@@ -113,10 +113,10 @@ def extract_nodes(nodes, keywords, comment_tags, options):
translator_comments
=
\
[
comment
[
1
]
for
comment
in
translator_comments
]
if
not
compat
.
py3k
and
isinstance
(
code
,
compat
.
text_type
):
if
isinstance
(
code
,
compat
.
text_type
):
code
=
code
.
encode
(
'
ascii
'
,
'
backslashreplace
'
)
code
=
StringIO
(
code
)
code
=
compat
.
byte_buffer
(
code
)
for
lineno
,
funcname
,
messages
,
python_translator_comments
\
in
extract_python
(
code
,
keywords
,
comment_tags
,
options
):
yield
(
node
.
lineno
+
(
lineno
-
1
),
funcname
,
messages
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment