]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
_markupsafe: remove some py2.4/2.5 compat code
authorThomas Waldmann <tw@waldmann-edv.de>
Fri, 17 May 2013 22:24:05 +0000 (00:24 +0200)
committerThomas Waldmann <tw@waldmann-edv.de>
Fri, 17 May 2013 22:24:05 +0000 (00:24 +0200)
jinja2/_markupsafe/__init__.py

index a353ff3e8f04afc3246b2dd90da009c7ef2fbb9b..b14d279d8b86d66c03fcd62f6412584926d7fd14 100644 (file)
@@ -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__')