diff options
author | Marius Gedminas <marius@gedmin.as> | 2013-02-07 23:05:12 +0000 |
---|---|---|
committer | Marius Gedminas <marius@gedmin.as> | 2013-02-07 23:05:12 +0000 |
commit | bb7febeede25b601ebbb5a7a038ae9c9232e56db (patch) | |
tree | 4798acb91f9196f914b920063ac797700ff991c7 | |
parent | 2a3c61f60021a02205566b1ca89adba46b9643cb (diff) | |
download | zope-tal-bb7febeede25b601ebbb5a7a038ae9c9232e56db.tar.gz |
Add PyPy support because it's not hard
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | src/zope/tal/tests/test_xmlparser.py | 8 | ||||
-rw-r--r-- | tox.ini | 2 |
4 files changed, 11 insertions, 5 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 4d83e8e..4d24233 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,8 +10,8 @@ CHANGES - Dropped support for Python 2.4 and 2.5. -- Experimental Python 3.3 support (all tests pass, but test coverage - is not complete). +- Experimental Python 3.3 and PyPy support (all tests pass, but test + coverage is not complete). 3.6.1 (2012-03-09) @@ -63,6 +63,8 @@ setup(name='zope.tal', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', diff --git a/src/zope/tal/tests/test_xmlparser.py b/src/zope/tal/tests/test_xmlparser.py index 530a938..0c7344c 100644 --- a/src/zope/tal/tests/test_xmlparser.py +++ b/src/zope/tal/tests/test_xmlparser.py @@ -86,8 +86,12 @@ class SegmentedFile(object): def __init__(self, parts): self.parts = list(parts) - def read(self, bytes): - if self.parts: + def read(self, nbytes=None): + if nbytes is None: + # PyPy's expat wants to read everything in one go + s = b''.join(self.parts) + del self.parts[:] + elif self.parts: s = self.parts.pop(0) else: s = b'' @@ -1,6 +1,6 @@ [tox] envlist = - py26,py27,py33 + py26,py27,py33,pypy [testenv] commands = |