summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2013-02-07 23:05:12 +0000
committerMarius Gedminas <marius@gedmin.as>2013-02-07 23:05:12 +0000
commitbb7febeede25b601ebbb5a7a038ae9c9232e56db (patch)
tree4798acb91f9196f914b920063ac797700ff991c7
parent2a3c61f60021a02205566b1ca89adba46b9643cb (diff)
downloadzope-tal-bb7febeede25b601ebbb5a7a038ae9c9232e56db.tar.gz
Add PyPy support because it's not hard
-rw-r--r--CHANGES.txt4
-rw-r--r--setup.py2
-rw-r--r--src/zope/tal/tests/test_xmlparser.py8
-rw-r--r--tox.ini2
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)
diff --git a/setup.py b/setup.py
index 2aa26cc..e53a7bd 100644
--- a/setup.py
+++ b/setup.py
@@ -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''
diff --git a/tox.ini b/tox.ini
index 079bdc8..e3853c9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
- py26,py27,py33
+ py26,py27,py33,pypy
[testenv]
commands =