aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ast.py
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-01-16 13:23:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2018-01-16 13:23:21 -0500
commita582879d89ac6e37b9daa8b3c820ebedddad2aea (patch)
treec52c26b30292db25cbef0a89021c205dd0ccb44f /test/test_ast.py
parent200398c6fba989a7f72779e62fd326b28d12cdf2 (diff)
downloadexternal_python_mako-a582879d89ac6e37b9daa8b3c820ebedddad2aea.tar.gz
external_python_mako-a582879d89ac6e37b9daa8b3c820ebedddad2aea.tar.bz2
external_python_mako-a582879d89ac6e37b9daa8b3c820ebedddad2aea.zip
Remove redundant Python<2.6 code
Includes PR https://github.com/zzzeek/mako/pull/26 so [Travis CI passes](https://travis-ci.org/hugovk/mako/builds/329346809). The last two commits are unique to this PR. --- Since Mako 1.0.0, Python 2.6 has been the minimum supported version: > [general] Compatibility changes; in order to modernize the codebase, Mako is now dropping support for Python 2.4 and Python 2.5 altogether. The source base is now targeted at Python 2.6 and forwards. http://docs.makotemplates.org/en/latest/changelog.html#change-b602a175c0ec26eaa4f42962d23cca96 This removes redundant code only relevant to Python 2.5 or earlier. It also adds `python_requires` to setup.py, so pip won't install this version on Python 2.5 or earlier. For people with older versions, pip will install the next Mako version down. Are all Python 3.x versions supported? If not, I'll add those to `python_requires` as well. Change-Id: I624e1d56e79555c579278c7a5b4de9498179ffe9 Pull-request: https://github.com/zzzeek/mako/pull/27
Diffstat (limited to 'test/test_ast.py')
-rw-r--r--test/test_ast.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/test_ast.py b/test/test_ast.py
index 32a1d74..24ba0c3 100644
--- a/test/test_ast.py
+++ b/test/test_ast.py
@@ -1,8 +1,7 @@
import unittest
from mako import ast, exceptions, pyparser, util, compat
-from test import eq_, requires_python_2, requires_python_3, \
- requires_python_26_or_greater
+from test import eq_, requires_python_2, requires_python_3
exception_kwargs = {
'source': '',
@@ -223,7 +222,6 @@ t2 = lambda (x,y):(x+5, y+4)
eq_(parsed.declared_identifiers, set(['t1', 't2']))
eq_(parsed.undeclared_identifiers, set())
- @requires_python_26_or_greater
def test_locate_identifiers_16(self):
code = """
try:
@@ -234,7 +232,6 @@ except Exception as e:
parsed = ast.PythonCode(code, **exception_kwargs)
eq_(parsed.undeclared_identifiers, set(['x', 'y', 'Exception']))
- @requires_python_26_or_greater
def test_locate_identifiers_17(self):
code = """
try: