From: Thomas Waldmann Date: Fri, 17 May 2013 22:24:05 +0000 (+0200) Subject: _markupsafe: remove some py2.4/2.5 compat code X-Git-Tag: 2.7~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2dbe1031bb43687e1434565645ac7433dfc66d8;p=thirdparty%2Fjinja.git _markupsafe: remove some py2.4/2.5 compat code --- diff --git a/jinja2/_markupsafe/__init__.py b/jinja2/_markupsafe/__init__.py index a353ff3e..b14d279d 100644 --- a/jinja2/_markupsafe/__init__.py +++ b/jinja2/_markupsafe/__init__.py @@ -180,19 +180,11 @@ class Markup(six.text_type): for method in '__getitem__', 'capitalize', \ 'title', 'lower', 'upper', 'replace', 'ljust', \ + 'format', 'partition', 'rpartition', \ 'rjust', 'lstrip', 'rstrip', 'center', 'strip', \ 'translate', 'expandtabs', 'swapcase', 'zfill': locals()[method] = make_wrapper(method) - # new in python 2.5 - if hasattr(six.text_type, 'partition'): - partition = make_wrapper('partition'), - rpartition = make_wrapper('rpartition') - - # new in python 2.6 - if hasattr(six.text_type, 'format'): - format = make_wrapper('format') - # not in python 3 if hasattr(six.text_type, '__getslice__'): __getslice__ = make_wrapper('__getslice__')