diff options
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | setup.py | 3 | ||||
-rw-r--r-- | src/zope/publisher/tests/basetestipublicationrequest.py | 20 | ||||
-rw-r--r-- | tox.ini | 3 |
5 files changed, 18 insertions, 18 deletions
diff --git a/.travis.yml b/.travis.yml index 975204a..f3f553e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,11 @@ python: - 2.7 - 3.3 - 3.4 -# - pypy + - pypy # - pypy3 -# pypy and pypy3 blocked on a PyPy-compatible zope.security +# pypy3 has unicode issues install: - - pip install . --use-mirrors + - pip install . script: - python setup.py test -q notifications: diff --git a/CHANGES.rst b/CHANGES.rst index 1b9f7da..e6e3bd2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changes 4.1.1 (unreleased) ------------------ -- TBD +- Add support for PyPy. 4.1.0 (2014-12-27) ------------------ @@ -126,7 +126,7 @@ Changes 3.12.0 (2009-12-31) ------------------- -- Revert change done in 3.6.2, removing the ``zope.authentication`` +- Revert change done in 3.6.2, removing the ``zope.authentication`` dependency again. Move the ``BasicAuthAdapter`` and ``FTPAuth`` adapters to the new ``zope.login`` package. @@ -65,8 +65,7 @@ setup(name='zope.publisher', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', -# PyPy blocked on compatible release of zope.security -# 'Programming Language :: Python :: Implementation :: PyPy', + 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', diff --git a/src/zope/publisher/tests/basetestipublicationrequest.py b/src/zope/publisher/tests/basetestipublicationrequest.py index c2a9cf2..45935b2 100644 --- a/src/zope/publisher/tests/basetestipublicationrequest.py +++ b/src/zope/publisher/tests/basetestipublicationrequest.py @@ -28,6 +28,9 @@ class Held: def release(self): self.released = True +def getrefcount(o, default=0): + # PyPy/Jython do not have getrefcount + return sys.getrefcount(o) if hasattr(sys, 'getrefcount') else default class BaseTestIPublicationRequest(object): def testVerifyIPublicationRequest(self): @@ -47,28 +50,28 @@ class BaseTestIPublicationRequest(object): request = self._Test__new() response = request.response - rcresponse = sys.getrefcount(response) + rcresponse = getrefcount(response) resource = object() - rcresource = sys.getrefcount(resource) + rcresource = getrefcount(resource) request.hold(resource) resource2 = Held() - rcresource2 = sys.getrefcount(resource2) + rcresource2 = getrefcount(resource2) request.hold(resource2) - self.assertTrue(sys.getrefcount(resource) > rcresource) - self.assertTrue(sys.getrefcount(resource2) > rcresource2) + self.assertTrue(getrefcount(resource, 1) > rcresource) + self.assertTrue(getrefcount(resource2, 1) > rcresource2) self.assertFalse(resource2.released) request.close() self.assertTrue(resource2.released) # Responses are not unreferenced during close() - self.assertTrue(sys.getrefcount(response) >= rcresponse) - self.assertEqual(sys.getrefcount(resource), rcresource) - self.assertEqual(sys.getrefcount(resource2), rcresource2) + self.assertTrue(getrefcount(response) >= rcresponse) + self.assertEqual(getrefcount(resource), rcresource) + self.assertEqual(getrefcount(resource2), rcresource2) def testSkinManagement(self): request = self._Test__new() @@ -80,4 +83,3 @@ class BaseTestIPublicationRequest(object): self.assertEqual(IMoreFoo.providedBy(request), False) directlyProvides(request, IMoreFoo) self.assertEqual(IMoreFoo.providedBy(request), True) - @@ -1,7 +1,6 @@ [tox] envlist = -# pypy blocked on a PyPy-compatible zope.security - py26,py27,py33,py34 + py26,py27,py33,py34,pypy [testenv] commands = |