Fix more cases of C and Python inconsistency. The C implementation now behaves like the Python implementation when it comes to integer overflow for the integer keys for
has_key. Now they return False, the default value, and False, respectively in both versions if the tested value would overflow or underflow. Previously, the C implementation would raise
KeyError, while the Python implementation functioned as expected. See issue 140.
The unspecified true return values of
- Add unsigned variants of the trees. These use the initial “U” for
32-bit data and “Q” for 64-bit data (for “quad”, which is similar to
what the C
printffunction uses and the Python struct module uses).
- Fix the value for
BTrees.OIBTree.using64bitswhen using the pure Python implementation (PyPy and when
PURE_PYTHONis in the environment).
- Make the errors that are raised when values are out of range more consistent between Python 2 and Python 3 and between 32-bit and 64-bit variants.
- Make the Bucket types consistent with the BTree types as updated in
versions 4.3.2: Querying for keys with default comparisons or that
are not integers no longer raises
- Add support for Python 3.8.
- Produce binary wheels for Python 3.7.
- Use pyproject.toml to specify build dependencies. This requires pip 18 or later to build from source.
- Add support for Python 3.6 and 3.7.
- Drop support for Python 3.3.
- Raise an
ImportErrorconsistently on Python 3 if the C extension for BTrees is used but the
persistentC extension is not available. Previously this could result in an odd
AttributeError. See https://github.com/zopefoundation/BTrees/pull/55
- Fix the possibility of a rare crash in the C extension when deallocating items. See https://github.com/zopefoundation/BTrees/issues/75
- Respect the
PURE_PYTHONenvironment variable at runtime even if the C extensions are available. See https://github.com/zopefoundation/BTrees/issues/78
- Always attempt to build the C extensions, but make their success optional.
- Fix a
DeprecationWarningthat could come from I and L objects in Python 2 in pure-Python mode. See https://github.com/zopefoundation/BTrees/issues/79
Fixed a packaging bug that caused extra files to be included (some of which caused problems in some platforms).
Allow None as a special key (sorted smaller than all others).
This is a bit of a return to BTrees 3 behavior in that Nones are allowed as keys again. Other objects with default ordering are still not allowed as keys.
Make the CPython implementation consistent with the pure-Python implementation and only check object keys for default comparison when setting keys. In Python 2 this makes it possible to remove keys that were added using a less restrictive version of BTrees. (In Python 3 keys that are unorderable still cannot be removed.) Likewise, all versions can unpickle trees that already had such keys. See: https://github.com/zopefoundation/BTrees/issues/53 and https://github.com/zopefoundation/BTrees/issues/51
Make the Python implementation consistent with the CPython implementation and check object key identity before checking equality and performing comparisons. This can allow fixing trees that have keys that now have broken comparison functions. See https://github.com/zopefoundation/BTrees/issues/50
Make the CPython implementation consistent with the pure-Python implementation and no longer raise
TypeErrorfor an object key (in object-keyed trees) with default comparison on
inoperations. Instead, the results will be a
KeyError, the default value, and
False, respectively. Previously, CPython raised a
TypeErrorin those cases, while the Python implementation behaved as specified.
Likewise, non-integer keys in integer-keyed trees will raise
KeyError, return the default and return
False, respectively, in both implementations. Previously, pure-Python raised a
KeyError, returned the default, and raised a
TypeError, while CPython raised
TypeErrorin all three cases.
- Packaging: fix password used to automate wheel creation on Travis.
- Fix unexpected
OverflowErrorwhen passing 64bit values to long keys / values on Win64. See: https://github.com/zopefoundation/BTrees/issues/32
- When testing
tox, avoid poisoning the user’s global wheel cache.
- Ensure that the pure-Python implementation, used on PyPy and when a C compiler isn’t available for CPython, pickles identically to the C version. Unpickling will choose the best available implementation. This change prevents interoperability problems and database corruption if both implementations are in use. While it is no longer possible to pickle a Python implementation and have it unpickle to the Python implementation if the C implementation is available, existing Python pickles will still unpickle to the Python implementation (until pickled again). See: https://github.com/zopefoundation/BTrees/issues/19
- Avoid creating invalid objects when unpickling empty BTrees in a pure-Python environment.
- Drop support for Python 2.6 and 3.2.
- Add support for Python 3.5.
- Ensure that pure-Python Bucket and Set objects have a human readable
__repr__like the C versions.
_p_changedwhen removing items from small pure-Python BTrees/TreeSets and when adding items to small pure-Python Sets. See: https://github.com/zopefoundation/BTrees/issues/13
- Suppress testing 64-bit values in OLBTrees on 32 bit machines. See: https://github.com/zopefoundation/BTrees/issues/9
_p_changedwhen adding items to small pure-Python BTrees/TreeSets. See: https://github.com/zopefoundation/BTrees/issues/11
- Accomodate long values in pure-Python OLBTrees.
- Add support for PyPy and PyPy3.
- Add support for Python 3.4.
- BTree subclasses can define
max_internal_sizeto control maximum sizes for Bucket/Set and BTree/TreeSet nodes.
- Detect integer overflow on 32-bit machines correctly under Python 3.
- Update pure-Python and C trees / sets to accept explicit None to indicate
max / min value for
maxKey. (PR #3)
- Update pure-Python trees / sets to accept explicit None to indicate
open ranges for
items. (PR #3)
- Fix value-based comparison for objects under Py3k: addresses invalid
- Ensure that pure-Python implementation of
OOBTree.byValuematches semantics (reversed-sort) of C implementation.
- Issue #2: compilation error on 32-bit mode of OS/X.
PURE_PYTHONenvironment variable support: if set, the C extensions will not be built, imported, or tested.
- Changed the
ZODBextra to require only the real
ZODBpackage, rather than the
ZODB3metapackage: depending on the version used, the metapackage could pull in stale versions of this package and
- Fixed Python version check in
- Fit the
reprof bucket objects, which could contain garbage characters.
- Emulate the (private) iterators used by the C extension modules from
pure Python. This change is “cosmetic” only: it prevents the ZCML
zope.app.security:permission.zcmlfrom failing. The emulated classes are not functional, and should be considered implementation details.
- Accomodate buildout to the fact that we no longer bundle a copy of ‘persistent.h’.
- Fix test failures on Windows: no longer rely on overflows from
- Updated Trove classifiers.
- Added explicit support for Python 3.2, Python 3.3, and PyPy. Note that the C extensions are not (yet) available on PyPy.
- Python reference implementations now tested separately from the C verions on all platforms.
- 100% unit test coverage.
- Provide local fallback for persistent C header inclusion if the persistent distribution isn’t installed. This makes the winbot happy.
- Dropped support for Python < 2.6.
BTreesas a separate distribution.
- All covered platforms tested under
- Added support for continuous integration using
setup.py devalias (installs
- Dropped dependency on
zope.testrunner: tests now run with
- Added API reference, generated via Spinx’ autodoc.
- Added Sphinx documentation based on ZODB Guide (snippets are exercised via ‘tox’).
setup.py docsalias (installs