Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(919)

Unified Diff: appengine/components/components/third_party/markupsafe/_compat.py

Issue 1481573002: Update jinja2 to master (between 2.8 and 2.8.1); fix urlencode bug. (Closed) Base URL: git@github.com:luci/luci-py.git@1_tools
Patch Set: Add import hack Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/components/components/third_party/markupsafe/_compat.py
diff --git a/appengine/components/components/third_party/markupsafe/_compat.py b/appengine/components/components/third_party/markupsafe/_compat.py
new file mode 100644
index 0000000000000000000000000000000000000000..62e5632ad8fd531fbc17dc99ac062d413e93a002
--- /dev/null
+++ b/appengine/components/components/third_party/markupsafe/_compat.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+"""
+ markupsafe._compat
+ ~~~~~~~~~~~~~~~~~~
+
+ Compatibility module for different Python versions.
+
+ :copyright: (c) 2013 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import sys
+
+PY2 = sys.version_info[0] == 2
+
+if not PY2:
+ text_type = str
+ string_types = (str,)
+ unichr = chr
+ int_types = (int,)
+ iteritems = lambda x: iter(x.items())
+else:
+ text_type = unicode
+ string_types = (str, unicode)
+ unichr = unichr
+ int_types = (int, long)
+ iteritems = lambda x: x.iteritems()

Powered by Google App Engine
This is Rietveld 408576698