Skip to content

Commit

Permalink
Merge pull request #159 from zopefoundation/zodb-pr207
Browse files Browse the repository at this point in the history
Fix tests with ZODB >= 5.6.0.
  • Loading branch information
tseaver committed Jul 28, 2020
2 parents cb26281 + 503dccb commit d535f53
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ bin
develop-eggs
eggs
parts
pyvenv.cfg
testing.log
.dir-locals.el
data.fs*
ZEO_forker*.conf
.eggs/
doc/_build
lib/
lib64
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ matrix:
python: 2.7
- os: linux
python: pypy
- os: linux
python: 3.4
- os: linux
python: 3.5
- os: linux
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
5.2.2 (unreleased)
------------------

- Remove support for Python 3.4

- Provide proper CA test certificates to allow the SSL tests succeed for Py3

- Replace deprecated occurences of ``Thread.isAlive()`` by ``Thread.is_alive()``
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'manuel',
'random2',
'mock',
'msgpack < 0.6',
'msgpack < 1',
'zope.testrunner',
]

Expand All @@ -45,7 +45,6 @@
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Expand Down Expand Up @@ -157,5 +156,5 @@ def emit(self, record):
zeo-nagios = ZEO.nagios:main
""",
include_package_data=True,
python_requires='>=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
python_requires='>=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
)
7 changes: 5 additions & 2 deletions src/ZEO/asyncio/marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def decoder(protocol):
from msgpack import unpackb
def msgpack_decode(data):
"""Decodes msg and returns its parts"""
return unpackb(data, encoding='utf-8', use_list=False)
return unpackb(data, raw=False, use_list=False)
return msgpack_decode
else:
assert protocol[:1] == b'Z'
Expand Down Expand Up @@ -126,7 +126,10 @@ def reduce_exception(exc):

exception_type_type = type(Exception)

_SAFE_MODULE_NAMES = ('ZopeUndo.Prefix', 'copy_reg', '__builtin__', 'zodbpickle')
_SAFE_MODULE_NAMES = (
'ZopeUndo.Prefix', 'zodbpickle',
'builtins', 'copy_reg', '__builtin__',
)

def find_global(module, name):
"""Helper for message unpickler"""
Expand Down
5 changes: 4 additions & 1 deletion src/ZEO/tests/ZEO4/zrpc/marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def server_decode(msg):

exception_type_type = type(Exception)

_SAFE_MODULE_NAMES = ('ZopeUndo.Prefix', 'copy_reg', '__builtin__', 'zodbpickle')
_SAFE_MODULE_NAMES = (
'ZopeUndo.Prefix', 'zodbpickle',
'builtins', 'copy_reg', '__builtin__',
)

def find_global(module, name):
"""Helper for message unpickler"""
Expand Down
2 changes: 2 additions & 0 deletions src/ZEO/tests/testZEO.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ def getConfig(self):

class FileStorageClientHexTests(FileStorageHexTests):

use_extension_bytes = True

def getConfig(self):
return """\
%import ZODB.tests
Expand Down
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py34,py35,py36,py37,pypy,pypy3,simple,docs
py27,py35,py36,py37,pypy,pypy3,simple,docs

[testenv]
commands =
Expand All @@ -21,19 +21,21 @@ deps =
zope.testing
zope.testrunner
mock
msgpack
msgpack < 1
# ZopeUndo is needed as soft-dependency for a regression test
ZopeUndo

[testenv:simple]
# Test that 'setup.py test' works
basepython =
python3.4
python3.6
commands =
python setup.py -q test -q
deps = {[testenv]deps}

[testenv:docs]
basepython =
python3.8
python3.6
commands =
sphinx-build -b html doc doc/_build/html
extras =
Expand Down

0 comments on commit d535f53

Please sign in to comment.