Skip to content
Myr

new jinja2._compat module for stuff not yet in six 1.3.0

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Waldmann · committed by Thomas Waldmann · parent 755b6b7 · Browse files · 3 files+21 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+21 added−4 removed

  • other:+21 added−4 removed

3 files+21 added−4 removed

modified:jinja2/_markupsafe/__init__.py+1 added-4 removed
10 unmodified lines
11import re12import six13from six.moves import map14from six.moves import zip15try:16 unichr = unichr # py217except NameError:18 unichr = chr # py315from jinja2._compat import unichr1617__all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent']1819
200 unmodified lines
added:jinja2/_compat.py+18 added
1# -*- coding: utf-8 -*-2"""3 jinja2._compat4 ~~~~~~~~~~~~~~56 Some py2/py3 compatibility support that is not yet available in "six".7 There are bugs open for "six" for all this stuff, so we can remove it8 again from here as soon as we require a new enough "six" release.910 :copyright: Copyright 2013 by the Jinja team, see AUTHORS.11 :license: BSD, see LICENSE for details.12"""1314# https://bitbucket.org/gutworth/six/issue/25/add-unichr15try:16 unichr = unichr # py217except NameError:18 unichr = chr # py3
modified:jinja2/_stringdefs.py+2 added
11 unmodified lines
12 :copyright: Copyright 2006-2009 by the Jinja team, see AUTHORS.13 :license: BSD, see LICENSE for details.14"""1516from jinja2._compat import unichr1718Cc = u'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f'1920Cf = u'\xad\u0600\u0601\u0602\u0603\u06dd\u070f\u17b4\u17b5\u200b\u200c\u200d\u200e\u200f\u202a\u202b\u202c\u202d\u202e\u2060\u2061\u2062\u2063\u206a\u206b\u206c\u206d\u206e\u206f\ufeff\ufff9\ufffa\ufffb'21
111 unmodified lines