From d2dbe1031bb43687e1434565645ac7433dfc66d8 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 18 May 2013 00:24:05 +0200 Subject: [PATCH] _markupsafe: remove some py2.4/2.5 compat code --- jinja2/_markupsafe/__init__.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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__') -- 2.47.3