summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2014-12-29 13:29:48 -0500
committerTres Seaver <tseaver@palladion.com>2014-12-29 13:29:48 -0500
commit33903cd083a4d0af116e63d7ad70c160e89ec45b (patch)
tree545496f3be8a786da68e9aca2436ff44ed4a5431
parent0bc4d7831c8a1526db44c532eec5f18a1de78773 (diff)
downloadzope-tal-33903cd083a4d0af116e63d7ad70c160e89ec45b.tar.gz
Add support for Python 3.4
-rw-r--r--.travis.yml1
-rw-r--r--CHANGES.rst4
-rw-r--r--setup.py6
-rw-r--r--src/zope/tal/tests/test_talinterpreter.py9
-rw-r--r--tox.ini2
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)
diff --git a/setup.py b/setup.py
index 1eebf64..f2015dd 100644
--- a/setup.py
+++ b/setup.py
@@ -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; &#1; &#x0a; &a &#45 &; <>" />')
EXPECTED = ('<img alt="&a; \x01 \n '
'&amp;a &amp;#45 &amp;; &lt;&gt;" />')
- else:
+ elif sys.version_info < (3, 4):
# html.parser.HTMLParser in Python 3.3 parses "&#45" as "-"
INPUT = ('<img tal:define="foo nothing" '
'alt="&a; &#1; &#x0a; &a &#45 &; <>" />')
EXPECTED = ('<img alt="&a; \x01 \n '
'&amp;a - &amp;; &lt;&gt;" />')
+ else:
+ # html.parser.HTMLParser in Python 3.4 parses "&#1" as ""
+ # because '1' is an "invalid codepoint".
+ INPUT = ('<img tal:define="foo nothing" '
+ 'alt="&a; &#1; &#x0a; &a &#45 &; <>" />')
+ EXPECTED = ('<img alt="&a; \n '
+ '&amp;a - &amp;; &lt;&gt;" />')
self.compare(INPUT, EXPECTED)
def compare(self, INPUT, EXPECTED):
diff --git a/tox.ini b/tox.ini
index e3853c9..9e8f4fc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
- py26,py27,py33,pypy
+ py26,py27,py33,py34,pypy
[testenv]
commands =