Commit 5e82e6d0 authored by Marius Gedminas's avatar Marius Gedminas

Merge pull request #42 from NextThought/zodbpickle-required

Make zodbpickle non-optional. 
parents e76c5b02 3ea20150
...@@ -9,7 +9,7 @@ python: ...@@ -9,7 +9,7 @@ python:
- 3.3 - 3.3
- 3.4 - 3.4
install: install:
- travis_retry pip install BTrees ZConfig manuel persistent six transaction zc.lockfile zdaemon zope.interface zope.testing zope.testrunner - travis_retry pip install BTrees ZConfig manuel persistent six transaction zc.lockfile zdaemon zodbpickle zope.interface zope.testing zope.testrunner
- travis_retry pip install -e . - travis_retry pip install -e .
script: script:
- zope-testrunner -u --test-path=src --auto-color --auto-progress - zope-testrunner -u --test-path=src --auto-color --auto-progress
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
4.2.1 (unreleased) 4.2.1 (unreleased)
================== ==================
- TBD - Make the ``zodbpickle`` dependency required and not conditional.
This fixes various packaging issues involving pip and its wheel
cache. zodbpickle was only optional under Python 2.6 so this change
only impacts users of that version.
4.2.0 (2015-06-02) 4.2.0 (2015-06-02)
================== ==================
......
...@@ -153,7 +153,6 @@ setup(name="ZODB", ...@@ -153,7 +153,6 @@ setup(name="ZODB",
tests_require = tests_require, tests_require = tests_require,
extras_require = { extras_require = {
'test': tests_require, 'test': tests_require,
':python_version != "2.6"': ['zodbpickle >= 0.6.0'],
}, },
install_requires = [ install_requires = [
'persistent >= 4.1.0', 'persistent >= 4.1.0',
...@@ -164,6 +163,7 @@ setup(name="ZODB", ...@@ -164,6 +163,7 @@ setup(name="ZODB",
'zc.lockfile', 'zc.lockfile',
'zdaemon >= 4.0.0a1', 'zdaemon >= 4.0.0a1',
'zope.interface', 'zope.interface',
'zodbpickle >= 0.6.0',
], ],
zip_safe = False, zip_safe = False,
entry_points = """ entry_points = """
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
# #
############################################################################## ##############################################################################
import sys import sys
from six import PY3
IS_JYTHON = sys.platform.startswith('java') IS_JYTHON = sys.platform.startswith('java')
try:
if not PY3:
# Python 2.x # Python 2.x
import cPickle # PyPy's cPickle doesn't have noload, and noload is broken in Python 2.7,
if ((hasattr(cPickle.Unpickler, 'load') and not hasattr(cPickle.Unpickler, 'noload')) or # so we need zodbpickle.
sys.version_info >= (2,7)): # Get the fastest working version we can (PyPy has no fastpickle)
# PyPy doesn't have noload, and noload is broken in Python 2.7. try:
# Get the fastest version we can (PyPy has no fastpickle) import zodbpickle.fastpickle as cPickle
try: except ImportError:
import zodbpickle.fastpickle as cPickle import zodbpickle.pickle as cPickle
except ImportError:
import zodbpickle.pickle as cPickle
Pickler = cPickle.Pickler Pickler = cPickle.Pickler
Unpickler = cPickle.Unpickler Unpickler = cPickle.Unpickler
dump = cPickle.dump dump = cPickle.dump
...@@ -36,7 +36,7 @@ try: ...@@ -36,7 +36,7 @@ try:
NAME_MAPPING = {} NAME_MAPPING = {}
_protocol = 1 _protocol = 1
FILESTORAGE_MAGIC = b"FS21" FILESTORAGE_MAGIC = b"FS21"
except ImportError: else:
# Python 3.x: can't use stdlib's pickle because # Python 3.x: can't use stdlib's pickle because
# http://bugs.python.org/issue6784 # http://bugs.python.org/issue6784
import zodbpickle.pickle import zodbpickle.pickle
......
...@@ -20,6 +20,7 @@ deps = ...@@ -20,6 +20,7 @@ deps =
transaction transaction
zc.lockfile zc.lockfile
zdaemon zdaemon
zodbpickle
zope.interface zope.interface
zope.testing zope.testing
zope.testrunner >= 4.4.6 zope.testrunner >= 4.4.6
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment