diff options
author | Tres Seaver <tseaver@palladion.com> | 2014-12-29 13:29:48 -0500 |
---|---|---|
committer | Tres Seaver <tseaver@palladion.com> | 2014-12-29 13:29:48 -0500 |
commit | 33903cd083a4d0af116e63d7ad70c160e89ec45b (patch) | |
tree | 545496f3be8a786da68e9aca2436ff44ed4a5431 | |
parent | 0bc4d7831c8a1526db44c532eec5f18a1de78773 (diff) | |
download | zope-tal-33903cd083a4d0af116e63d7ad70c160e89ec45b.tar.gz |
Add support for Python 3.4
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | setup.py | 6 | ||||
-rw-r--r-- | src/zope/tal/tests/test_talinterpreter.py | 9 | ||||
-rw-r--r-- | tox.ini | 2 |
5 files changed, 17 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 7bc8701..6afd71b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py33 + - TOXENV=py34 - TOXENV=pypy install: - pip install tox diff --git a/CHANGES.rst b/CHANGES.rst index 13871ea..fd14780 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,9 +1,11 @@ Changes ======= -4.0.1 (unreleased) +4.1.0 (unreleased) ------------------ +- Add support for Python 3.4. + - Add support for testing on Travis. 4.0.0 (2014-01-13) @@ -25,7 +25,8 @@ from setuptools import setup, find_packages here = os.path.dirname(__file__) def read(*rnames): - return open(os.path.join(here, *rnames)).read() + with open(os.path.join(here, *rnames)) as f: + return f.read() def alltests(): # use the zope.testrunner machinery to find all the @@ -42,7 +43,7 @@ def alltests(): return TestSuite(suites) setup(name='zope.tal', - version='4.0.1dev', + version='4.1.0.dev0', author='Zope Foundation and Contributors', author_email='zope-dev@zope.org', description='Zope Template Application Language (TAL)', @@ -63,6 +64,7 @@ setup(name='zope.tal', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', diff --git a/src/zope/tal/tests/test_talinterpreter.py b/src/zope/tal/tests/test_talinterpreter.py index 3717851..1a77453 100644 --- a/src/zope/tal/tests/test_talinterpreter.py +++ b/src/zope/tal/tests/test_talinterpreter.py @@ -714,12 +714,19 @@ class OutputPresentationTestCase(TestCaseBase): 'alt="&a;  
 &a - &; <>" />') EXPECTED = ('<img alt="&a; \x01 \n ' '&a &#45 &; <>" />') - else: + elif sys.version_info < (3, 4): # html.parser.HTMLParser in Python 3.3 parses "-" as "-" INPUT = ('<img tal:define="foo nothing" ' 'alt="&a;  
 &a - &; <>" />') EXPECTED = ('<img alt="&a; \x01 \n ' '&a - &; <>" />') + else: + # html.parser.HTMLParser in Python 3.4 parses "" as "" + # because '1' is an "invalid codepoint". + INPUT = ('<img tal:define="foo nothing" ' + 'alt="&a;  
 &a - &; <>" />') + EXPECTED = ('<img alt="&a; \n ' + '&a - &; <>" />') self.compare(INPUT, EXPECTED) def compare(self, INPUT, EXPECTED): @@ -1,6 +1,6 @@ [tox] envlist = - py26,py27,py33,pypy + py26,py27,py33,py34,pypy [testenv] commands = |