1Metadata-Version: 2.1 2Name: BTrees 3Version: 4.9.2 4Summary: Scalable persistent object containers 5Home-page: https://github.com/zopefoundation/BTrees 6Author: Zope Foundation 7Author-email: zodb-dev@zope.org 8License: ZPL 2.1 9Description: ========================================= 10 BTrees: scalable persistent components 11 ========================================= 12 13 .. image:: https://github.com/zopefoundation/BTrees/actions/workflows/tests.yml/badge.svg 14 :target: https://github.com/zopefoundation/BTrees/actions/workflows/tests.yml 15 16 .. image:: https://ci.appveyor.com/api/projects/status/github/zopefoundation/BTrees?branch=master&svg=true 17 :target: https://ci.appveyor.com/project/mgedmin/BTrees 18 19 .. image:: https://coveralls.io/repos/github/zopefoundation/BTrees/badge.svg?branch=master 20 :target: https://coveralls.io/github/zopefoundation/BTrees?branch=master 21 22 .. image:: https://img.shields.io/pypi/v/BTrees.svg 23 :target: https://pypi.org/project/BTrees/ 24 :alt: Current version on PyPI 25 26 .. image:: https://img.shields.io/pypi/pyversions/BTrees.svg 27 :target: https://pypi.org/project/BTrees/ 28 :alt: Supported Python versions 29 30 31 This package contains a set of persistent object containers built around 32 a modified BTree data structure. The trees are optimized for use inside 33 ZODB's "optimistic concurrency" paradigm, and include explicit resolution 34 of conflicts detected by that mechanism. 35 36 Please see `the Sphinx documentation <http://btrees.readthedocs.io/>`_ for further 37 information. 38 39 40 ================== 41 BTrees Changelog 42 ================== 43 44 4.9.2 (2021-06-09) 45 ================== 46 47 - Fix ``fsBTree.TreeSet`` and ``fsBTree.BTree`` raising 48 ``SystemError``. See `issue 170 <https://github.com/zopefoundation/BTrees/issues/170>`_. 49 50 - Fix all the ``fsBTree`` objects to provide the correct interfaces 51 and be instances of the appropriate collection ABCs. This was done 52 for the other modules in release 4.8.0. 53 54 - Fix the ``multiunion``, ``union``, ``intersection``, and 55 ``difference`` functions when used with arbitrary iterables. 56 Previously, the iterable had to be pre-sorted, meaning only 57 sequences like ``list`` and ``tuple`` could reliably be used; this 58 was not documented though. If the iterable wasn't sorted, the 59 function would produce garbage output. Now, if the function detects 60 an arbitrary iterable, it automatically sorts a copy. 61 62 4.9.1 (2021-05-27) 63 ================== 64 65 - Fix setting unknown class attributes on subclasses of BTrees when 66 using the C extension. This prevented subclasses from being 67 decorated with ``@component.adapter()``. See `issue 168 68 <https://github.com/zopefoundation/BTrees/issues/168>`_. 69 70 71 4.9.0 (2021-05-26) 72 ================== 73 74 - Fix the C implementation to match the Python implementation and 75 allow setting custom node sizes for an entire application directly 76 by changing ``BTree.max_leaf_size`` and ``BTree.max_internal_size`` 77 attributes, without having to create a new subclass. These 78 attributes can now also be read from the classes in the C 79 implementation. See `issue 166 80 <https://github.com/zopefoundation/BTrees/issues/166>`_. 81 82 - Add various small performance improvements for storing 83 zope.interface attributes on ``BTree`` and ``TreeSet`` as well as 84 deactivating persistent objects from this package. 85 86 4.8.0 (2021-04-14) 87 ================== 88 89 - Make Python 2 forbid the use of type objects as keys (unless a 90 custom metaclass is used that implements comparison as required by 91 BTrees.) On Python 3, types are not orderable so they were already 92 forbidden, but on Python 2 types can be ordered by memory address, 93 which makes them unsuitable for use as keys. See `issue 94 <https://github.com/zopefoundation/BTrees/issues/153>`_. 95 96 - Make the ``multiunion``, ``union``, ``intersection``, and 97 ``difference`` functions accept arbitrary Python iterables (that 98 iterate across the correct types). Previously, the Python 99 implementation allowed this, but the C implementation only allowed 100 objects (like ``TreeSet`` or ``Bucket``) defined in the same module 101 providing the function. See `issue 24 102 <https://github.com/zopefoundation/BTrees/issues/24>`_. 103 104 - Fix persistency bug in the Python version 105 (`#118 <https://github.com/zopefoundation/BTrees/issues/118>`_). 106 107 - Fix ``Tree.__setstate__`` to no longer accept children besides 108 tree or bucket types to prevent crashes. See `PR 143 109 <https://github.com/zopefoundation/BTrees/pull/143>`_ for details. 110 111 - Make BTrees, TreeSet, Set and Buckets implements the ``__and__``, 112 ``__or__`` and ``__sub__`` special methods as shortcuts for 113 ``BTrees.Interfaces.IMerge.intersection``, 114 ``BTrees.Interfaces.IMerge.union`` and 115 ``BTrees.Interfaces.IMerge.difference``. 116 117 - Add support for Python 3.9. 118 119 - Build and upload aarch64 wheels. 120 121 - Make a value of ``0`` in the ``PURE_PYTHON`` environment variable 122 require the C extensions (except on PyPy). Previously, and if this 123 variable is unset, missing or unusable C extensions would be 124 silently ignored. With this variable set to ``0``, an 125 ``ImportError`` will be raised if the C extensions are unavailable. 126 See `issue 156 127 <https://github.com/zopefoundation/BTrees/issues/156>`_. 128 129 - Make the BTree objects (``BTree``, ``TreeSet``, ``Set``, ``Bucket``) 130 of each module actually provide the interfaces defined in 131 ``BTrees.Interfaces``. Previously, they provided no interfaces. 132 133 - Make all the BTree and Bucket objects instances of 134 ``collections.abc.MutableMapping`` (that is, ``isinstance(btree, 135 MutableMapping)`` is now true; no actual inheritance has changed). 136 As part of this, they now provide the ``popitem()`` method. 137 138 - Make all the TreeSet and Set objects instances of 139 ``collections.abc.MutableSet`` (that is, ``isinstance(tree_set, 140 MutableSet)`` is now true; no actual inheritance has changed). 141 As part of this, they now provide several more methods, including 142 ``isdisjoint``, ``discard``, and ``pop``, and support in-place 143 mutation operators such as ``tree_set |= other``, ``tree_set += 144 other``, ``tree_set -= other`` and ``tree_set ^= other``. See `issue 145 121 <https://github.com/zopefoundation/BTrees/issues/121>`_. 146 147 - Update the definitions of ``ISized`` and ``IReadSequence`` to simply 148 be ``zope.interface.common.collections.ISized`` and 149 ``zope.interface.common.sequence.IMinimalSequence`` respectively. 150 151 - Remove the ``__nonzero__`` interface method from ``ICollection``. No 152 objects actually implemented such a method; instead, the boolean value 153 is typically taken from ``__len__``. 154 155 - Adjust the definition of ``ISet`` to produce the same resolution 156 order under the C3 and legacy orderings. This means that the legacy 157 order has changed slightly, but that this package emits no warnings 158 when ``ZOPE_INTERFACE_LOG_CHANGED_IRO=1``. Note that the legacy 159 order was not being used for these objects because the C3 ordering 160 was still consistent; it could only be obtained using 161 ``ZOPE_INTERFACE_USE_LEGACY_IRO=1``. See `PR 159 162 <https://github.com/zopefoundation/BTrees/pull/159>`_ for all the 163 interface updates. 164 165 - Fix the ``get``, ``setdefault`` and ``pop`` methods, as well as the 166 ``in`` operator, to not suppress ``POSKeyError`` if the object or 167 subobjects are corrupted. Previously, such errors were logged by 168 ZODB, but not propagated. See `issue 161 169 <https://github.com/zopefoundation/BTrees/issues/161>`_. 170 171 4.7.2 (2020-04-07) 172 ================== 173 174 - Fix more cases of C and Python inconsistency. The C implementation 175 now behaves like the Python implementation when it comes to integer 176 overflow for the integer keys for ``in``, ``get`` and ``has_key``. 177 Now they return False, the default value, and False, respectively in 178 both versions if the tested value would overflow or underflow. 179 Previously, the C implementation would raise ``OverflowError`` or 180 ``KeyError``, while the Python implementation functioned as 181 expected. See `issue 140 182 <https://github.com/zopefoundation/BTrees/issues/140>`_. 183 184 .. note:: 185 The unspecified true return values of ``has_key`` 186 have changed. 187 188 189 4.7.1 (2020-03-22) 190 ================== 191 192 - Fix the definitions of ``__all__`` in modules. In 4.7.0, they 193 incorrectly left out names. See `PR 132 194 <https://github.com/zopefoundation/BTrees/pull/132>`_. 195 196 - Ensure the interface resolution order of all objects is consistent. 197 See `issue 137 <https://github.com/zopefoundation/BTrees/issues/137>`_. 198 199 4.7.0 (2020-03-17) 200 ================== 201 202 - Add unsigned variants of the trees. These use the initial "U" for 203 32-bit data and "Q" for 64-bit data (for "quad", which is similar to 204 what the C ``printf`` function uses and the Python struct module 205 uses). 206 207 - Fix the value for ``BTrees.OIBTree.using64bits`` when using the pure Python 208 implementation (PyPy and when ``PURE_PYTHON`` is in the environment). 209 210 - Make the errors that are raised when values are out of range more 211 consistent between Python 2 and Python 3 and between 32-bit and 212 64-bit variants. 213 214 - Make the Bucket types consistent with the BTree types as updated in 215 versions 4.3.2: Querying for keys with default comparisons or that 216 are not integers no longer raises ``TypeError``. 217 218 4.6.1 (2019-11-07) 219 ================== 220 221 - Add support for Python 3.8. 222 223 224 4.6.0 (2019-07-30) 225 ================== 226 227 - Drop support for Python 3.4. 228 229 - Fix tests against persistent 4.4. 230 231 - Stop accidentally installing the 'terryfy' package in macOS wheels. 232 See `issue 98 233 <https://github.com/zopefoundation/BTrees/issues/98>`_. 234 235 - Fix segmentation fault in ``bucket_repr()``. See 236 `issue 106 <https://github.com/zopefoundation/BTrees/issues/106>`_. 237 238 239 4.5.1 (2018-08-09) 240 ================== 241 242 - Produce binary wheels for Python 3.7. 243 244 - Use pyproject.toml to specify build dependencies. This requires pip 245 18 or later to build from source. 246 247 248 4.5.0 (2018-04-23) 249 ================== 250 251 - Add support for Python 3.6 and 3.7. 252 - Drop support for Python 3.3. 253 - Raise an ``ImportError`` consistently on Python 3 if the C extension for 254 BTrees is used but the ``persistent`` C extension is not available. 255 Previously this could result in an odd ``AttributeError``. See 256 https://github.com/zopefoundation/BTrees/pull/55 257 - Fix the possibility of a rare crash in the C extension when 258 deallocating items. See https://github.com/zopefoundation/BTrees/issues/75 259 - Respect the ``PURE_PYTHON`` environment variable at runtime even if 260 the C extensions are available. See 261 https://github.com/zopefoundation/BTrees/issues/78 262 - Always attempt to build the C extensions, but make their success 263 optional. 264 - Fix a ``DeprecationWarning`` that could come from I and L objects in 265 Python 2 in pure-Python mode. See https://github.com/zopefoundation/BTrees/issues/79 266 267 4.4.1 (2017-01-24) 268 ================== 269 270 Fixed a packaging bug that caused extra files to be included (some of 271 which caused problems in some platforms). 272 273 4.4.0 (2017-01-11) 274 ================== 275 276 - Allow None as a special key (sorted smaller than all others). 277 278 This is a bit of a return to BTrees 3 behavior in that Nones are 279 allowed as keys again. Other objects with default ordering are 280 still not allowed as keys. 281 282 4.3.2 (2017-01-05) 283 ================== 284 285 - Make the CPython implementation consistent with the pure-Python 286 implementation and only check object keys for default comparison 287 when setting keys. In Python 2 this makes it possible to remove keys 288 that were added using a less restrictive version of BTrees. (In 289 Python 3 keys that are unorderable still cannot be removed.) 290 Likewise, all versions can unpickle trees that already had such 291 keys. See: https://github.com/zopefoundation/BTrees/issues/53 and 292 https://github.com/zopefoundation/BTrees/issues/51 293 294 - Make the Python implementation consistent with the CPython 295 implementation and check object key identity before checking 296 equality and performing comparisons. This can allow fixing trees 297 that have keys that now have broken comparison functions. See 298 https://github.com/zopefoundation/BTrees/issues/50 299 300 - Make the CPython implementation consistent with the pure-Python 301 implementation and no longer raise ``TypeError`` for an object key 302 (in object-keyed trees) with default comparison on ``__getitem__``, 303 ``get`` or ``in`` operations. Instead, the results will be a 304 ``KeyError``, the default value, and ``False``, respectively. 305 Previously, CPython raised a ``TypeError`` in those cases, while the 306 Python implementation behaved as specified. 307 308 Likewise, non-integer keys in integer-keyed trees 309 will raise ``KeyError``, return the default and return ``False``, 310 respectively, in both implementations. Previously, pure-Python 311 raised a ``KeyError``, returned the default, and raised a 312 ``TypeError``, while CPython raised ``TypeError`` in all three cases. 313 314 4.3.1 (2016-05-16) 315 ================== 316 317 - Packaging: fix password used to automate wheel creation on Travis. 318 319 4.3.0 (2016-05-10) 320 ================== 321 322 - Fix unexpected ``OverflowError`` when passing 64bit values to long 323 keys / values on Win64. See: 324 https://github.com/zopefoundation/BTrees/issues/32 325 326 - When testing ``PURE_PYTHON`` environments under ``tox``, avoid poisoning 327 the user's global wheel cache. 328 329 - Ensure that the pure-Python implementation, used on PyPy and when a C 330 compiler isn't available for CPython, pickles identically to the C 331 version. Unpickling will choose the best available implementation. 332 This change prevents interoperability problems and database corruption if 333 both implementations are in use. While it is no longer possible to 334 pickle a Python implementation and have it unpickle to the Python 335 implementation if the C implementation is available, existing Python 336 pickles will still unpickle to the Python implementation (until 337 pickled again). See: 338 https://github.com/zopefoundation/BTrees/issues/19 339 340 - Avoid creating invalid objects when unpickling empty BTrees in a pure-Python 341 environment. 342 343 - Drop support for Python 2.6 and 3.2. 344 345 4.2.0 (2015-11-13) 346 ================== 347 348 - Add support for Python 3.5. 349 350 4.1.4 (2015-06-02) 351 ================== 352 353 - Ensure that pure-Python Bucket and Set objects have a human readable 354 ``__repr__`` like the C versions. 355 356 4.1.3 (2015-05-19) 357 ================== 358 359 - Fix ``_p_changed`` when removing items from small pure-Python 360 BTrees/TreeSets and when adding items to small pure-Python Sets. See: 361 https://github.com/zopefoundation/BTrees/issues/13 362 363 364 4.1.2 (2015-04-07) 365 ================== 366 367 - Suppress testing 64-bit values in OLBTrees on 32 bit machines. 368 See: https://github.com/zopefoundation/BTrees/issues/9 369 370 - Fix ``_p_changed`` when adding items to small pure-Python 371 BTrees/TreeSets. See: 372 https://github.com/zopefoundation/BTrees/issues/11 373 374 375 4.1.1 (2014-12-27) 376 ================== 377 378 - Accomodate long values in pure-Python OLBTrees. 379 380 381 4.1.0 (2014-12-26) 382 ================== 383 384 - Add support for PyPy and PyPy3. 385 386 - Add support for Python 3.4. 387 388 - BTree subclasses can define ``max_leaf_size`` or ``max_internal_size`` 389 to control maximum sizes for Bucket/Set and BTree/TreeSet nodes. 390 391 - Detect integer overflow on 32-bit machines correctly under Python 3. 392 393 - Update pure-Python and C trees / sets to accept explicit None to indicate 394 max / min value for ``minKey``, ``maxKey``. (PR #3) 395 396 - Update pure-Python trees / sets to accept explicit None to indicate 397 open ranges for ``keys``, ``values``, ``items``. (PR #3) 398 399 400 4.0.8 (2013-05-25) 401 ================== 402 403 - Fix value-based comparison for objects under Py3k: addresses invalid 404 merges of ``[OLI]OBTrees/OBuckets``. 405 406 - Ensure that pure-Python implementation of ``OOBTree.byValue`` matches 407 semantics (reversed-sort) of C implementation. 408 409 410 4.0.7 (2013-05-22) 411 ================== 412 413 - Issue #2: compilation error on 32-bit mode of OS/X. 414 415 - Test ``PURE_PYTHON`` environment variable support: if set, the C 416 extensions will not be built, imported, or tested. 417 418 419 4.0.6 (2013-05-14) 420 ================== 421 422 - Changed the ``ZODB`` extra to require only the real ``ZODB`` package, 423 rather than the ``ZODB3`` metapackage: depending on the version used, 424 the metapackage could pull in stale versions of **this** package and 425 ``persistent``. 426 427 - Fixed Python version check in ``setup.py``. 428 429 430 4.0.5 (2013-01-15) 431 ================== 432 433 - Fit the ``repr`` of bucket objects, which could contain garbage 434 characters. 435 436 437 4.0.4 (2013-01-12) 438 ================== 439 440 - Emulate the (private) iterators used by the C extension modules from 441 pure Python. This change is "cosmetic" only: it prevents the ZCML 442 ``zope.app.security:permission.zcml`` from failing. The emulated 443 classes are **not** functional, and should be considered implementation 444 details. 445 446 - Accomodate buildout to the fact that we no longer bundle a copy 447 of 'persistent.h'. 448 449 - Fix test failures on Windows: no longer rely on overflows from 450 ``sys.maxint``. 451 452 453 4.0.3 (2013-01-04) 454 ================== 455 456 - Added ``setup_requires==['persistent']``. 457 458 459 4.0.2 (2013-01-03) 460 ================== 461 462 - Updated Trove classifiers. 463 464 - Added explicit support for Python 3.2, Python 3.3, and PyPy. 465 Note that the C extensions are not (yet) available on PyPy. 466 467 - Python reference implementations now tested separately from the C 468 verions on all platforms. 469 470 - 100% unit test coverage. 471 472 473 4.0.1 (2012-10-21) 474 ================== 475 476 - Provide local fallback for persistent C header inclusion if the 477 persistent distribution isn't installed. This makes the winbot happy. 478 479 480 4.0.0 (2012-10-20) 481 ================== 482 483 Platform Changes 484 ---------------- 485 486 - Dropped support for Python < 2.6. 487 488 - Factored ``BTrees`` as a separate distribution. 489 490 Testing Changes 491 --------------- 492 493 - All covered platforms tested under ``tox``. 494 495 - Added support for continuous integration using ``tox`` and ``jenkins``. 496 497 - Added ``setup.py dev`` alias (installs ``nose`` and ``coverage``). 498 499 - Dropped dependency on ``zope.testing`` / ``zope.testrunner``: tests now 500 run with ``setup.py test``. 501 502 Documentation Changes 503 --------------------- 504 505 - Added API reference, generated via Spinx' autodoc. 506 507 - Added Sphinx documentation based on ZODB Guide (snippets are exercised 508 via 'tox'). 509 510 - Added ``setup.py docs`` alias (installs ``Sphinx`` and 511 ``repoze.sphinx.autointerface``). 512 513Platform: any 514Classifier: Development Status :: 6 - Mature 515Classifier: License :: OSI Approved :: Zope Public License 516Classifier: Programming Language :: Python 517Classifier: Programming Language :: Python :: 2 518Classifier: Programming Language :: Python :: 2.7 519Classifier: Programming Language :: Python :: 3 520Classifier: Programming Language :: Python :: 3.5 521Classifier: Programming Language :: Python :: 3.6 522Classifier: Programming Language :: Python :: 3.7 523Classifier: Programming Language :: Python :: 3.8 524Classifier: Programming Language :: Python :: 3.9 525Classifier: Programming Language :: Python :: Implementation :: CPython 526Classifier: Programming Language :: Python :: Implementation :: PyPy 527Classifier: Framework :: ZODB 528Classifier: Topic :: Database 529Classifier: Topic :: Software Development :: Libraries :: Python Modules 530Classifier: Operating System :: Microsoft :: Windows 531Classifier: Operating System :: Unix 532Provides-Extra: test 533Provides-Extra: ZODB 534Provides-Extra: docs 535