Commit 9313ee68 authored by Julien Muchembled's avatar Julien Muchembled

import python-btrees_4.3.1.orig.tar.gz

parents
[report]
exclude_lines =
# pragma: no cover
class I[A-Z]\w+\((Interface|I[A-Z].*)\):
bin
eggs
develop-eggs
parts
.installed.cfg
build
docs/_build
__pycache__
*.pyc
*.so
.tox
.coverage
nosetests.xml
coverage.xml
*.egg-info
*.egg
dist
.eggs/
.dir-locals.el
language: python
sudo: false
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: 3.3
- os: linux
python: 3.4
- os: linux
python: 3.5
- os: linux
python: pypy
- os: linux
python: pypy3
- os: osx
language: generic
env: TERRYFY_PYTHON='homebrew 2'
- os: osx
language: generic
env: TERRYFY_PYTHON='homebrew 3'
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi
- if [[ "$TERRYFY_PYTHON" == "homebrew 3" ]]; then alias pip=`which pip3` ; fi
install:
- pip install -e .[ZODB]
script:
- python setup.py -q test -q
notifications:
email: false
after_success:
- echo [distutils] > ~/.pypirc
- echo index-servers = pypi >> ~/.pypirc
- echo [pypi] >> ~/.pypirc
- echo repository=https://pypi.python.org/pypi >> ~/.pypirc
- echo username=zope.wheelbuilder >> ~/.pypirc
- echo password=$PYPIPASSWORD >> ~/.pypirc
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then pip install twine; fi
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then python setup.py bdist_wheel; fi
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then twine upload dist/*; fi
env:
global:
secure: "CpYDbVb6YOyIAnCcvBEiDLeYmNhfDDqJosIV0NussN9dNe1hsfHQK98evAEe9F4kXuWo6SmmtT0uX2RXOojB5If/z7sAcXSDaGWCMJK0FY98sWL2DCRtb1/O1puo/uvn3RJlpe4bkxQoyFCKjpWaTJOM+NSEt7YbTTTdCpG7/zU="
Metadata-Version: 1.1
Name: BTrees
Version: 4.3.1
Summary: Scalable persistent object containers
Home-page: http://packages.python.org/BTrees
Author: Zope Foundation
Author-email: zodb-dev@zope.org
License: ZPL 2.1
Description: ``BTrees``: scalable persistent components
===========================================
.. image:: https://travis-ci.org/zopefoundation/BTrees.svg?branch=master
:target: https://travis-ci.org/zopefoundation/BTrees
.. image:: https://ci.appveyor.com/api/projects/status/github/zopefoundation/BTrees?branch=master&svg=true
:target: https://ci.appveyor.com/project/mgedmin/BTrees
This package contains a set of persistent object containers built around
a modified BTree data structure. The trees are optimized for use inside
ZODB's "optimistic concurrency" paradigm, and include explicit resolution
of conflicts detected by that mechannism.
Please see the Sphinx documentation (``docs/index.rst``) for further
information.
``BTrees`` Changelog
====================
4.3.1 (2016-05-16)
------------------
- Packaging: fix password used to automate wheel creation on Travis.
4.3.0 (2016-05-10)
------------------
- Fix unexpected ``OverflowError`` when passing 64bit values to long
keys / values on Win64. See:
https://github.com/zopefoundation/BTrees/issues/32
- When testing ``PURE_PYTHON`` environments under ``tox``, avoid poisoning
the user's global wheel cache.
- Ensure that he 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.
4.2.0 (2015-11-13)
------------------
- Add support for Python 3.5.
4.1.4 (2015-06-02)
------------------
- Ensure that pure-Python Bucket and Set objects have a human readable
``__repr__`` like the C versions.
4.1.3 (2015-05-19)
------------------
- Fix ``_p_changed`` when 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
4.1.2 (2015-04-07)
------------------
- Suppress testing 64-bit values in OLBTrees on 32 bit machines.
See: https://github.com/zopefoundation/BTrees/issues/9
- Fix ``_p_changed`` when adding items to small pure-Python
BTrees/TreeSets. See:
https://github.com/zopefoundation/BTrees/issues/11
4.1.1 (2014-12-27)
------------------
- Accomodate long values in pure-Python OLBTrees.
4.1.0 (2014-12-26)
------------------
- Add support for PyPy and PyPy3.
- Add support for Python 3.4.
- BTree subclasses can define ``max_leaf_size`` or ``max_internal_size``
to 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 ``minKey``, ``maxKey``. (PR #3)
- Update pure-Python trees / sets to accept explicit None to indicate
open ranges for ``keys``, ``values``, ``items``. (PR #3)
4.0.8 (2013-05-25)
------------------
- Fix value-based comparison for objects under Py3k: addresses invalid
merges of ``[OLI]OBTrees/OBuckets``.
- Ensure that pure-Python implementation of ``OOBTree.byValue`` matches
semantics (reversed-sort) of C implementation.
4.0.7 (2013-05-22)
------------------
- Issue #2: compilation error on 32-bit mode of OS/X.
- Test ``PURE_PYTHON`` environment variable support: if set, the C
extensions will not be built, imported, or tested.
4.0.6 (2013-05-14)
------------------
- Changed the ``ZODB`` extra to require only the real ``ZODB`` package,
rather than the ``ZODB3`` metapackage: depending on the version used,
the metapackage could pull in stale versions of **this** package and
``persistent``.
- Fixed Python version check in ``setup.py``.
4.0.5 (2013-01-15)
------------------
- Fit the ``repr`` of bucket objects, which could contain garbage
characters.
4.0.4 (2013-01-12)
------------------
- 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.zcml`` from 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
``sys.maxint``.
4.0.3 (2013-01-04)
------------------
- Added ``setup_requires==['persistent']``.
4.0.2 (2013-01-03)
------------------
- 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.
4.0.1 (2012-10-21)
------------------
- Provide local fallback for persistent C header inclusion if the
persistent distribution isn't installed. This makes the winbot happy.
4.0.0 (2012-10-20)
------------------
Platform Changes
################
- Dropped support for Python < 2.6.
- Factored ``BTrees`` as a separate distribution.
Testing Changes
###############
- All covered platforms tested under ``tox``.
- Added support for continuous integration using ``tox`` and ``jenkins``.
- Added ``setup.py dev`` alias (installs ``nose`` and ``coverage``).
- Dropped dependency on ``zope.testing`` / ``zope.testrunner``: tests now
run with ``setup.py test``.
Documentation Changes
#####################
- Added API reference, generated via Spinx' autodoc.
- Added Sphinx documentation based on ZODB Guide (snippets are exercised
via 'tox').
- Added ``setup.py docs`` alias (installs ``Sphinx`` and
``repoze.sphinx.autointerface``).
Platform: any
Classifier: Development Status :: 6 - Mature
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Framework :: ZODB
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
.coveragerc
.gitignore
.travis.yml
CHANGES.rst
COPYRIGHT.txt
LICENSE.txt
MANIFEST.in
README.rst
appveyor.yml
bootstrap.py
buildout.cfg
setup.cfg
setup.py
tox.ini
BTrees/BTreeItemsTemplate.c
BTrees/BTreeModuleTemplate.c
BTrees/BTreeTemplate.c
BTrees/BucketTemplate.c
BTrees/Development.txt
BTrees/IFBTree.py
BTrees/IIBTree.py
BTrees/IOBTree.py
BTrees/Interfaces.py
BTrees/LFBTree.py
BTrees/LLBTree.py
BTrees/LOBTree.py
BTrees/Length.py
BTrees/MergeTemplate.c
BTrees/OIBTree.py
BTrees/OLBTree.py
BTrees/OOBTree.py
BTrees/SetOpTemplate.c
BTrees/SetTemplate.c
BTrees/TreeSetTemplate.c
BTrees/_IFBTree.c
BTrees/_IIBTree.c
BTrees/_IOBTree.c
BTrees/_LFBTree.c
BTrees/_LLBTree.c
BTrees/_LOBTree.c
BTrees/_OIBTree.c
BTrees/_OLBTree.c
BTrees/_OOBTree.c
BTrees/__init__.py
BTrees/_base.py
BTrees/_compat.h
BTrees/_compat.py
BTrees/_fsBTree.c
BTrees/check.py
BTrees/floatvaluemacros.h
BTrees/fsBTree.py
BTrees/intkeymacros.h
BTrees/intvaluemacros.h
BTrees/nosetests.xml
BTrees/objectkeymacros.h
BTrees/objectvaluemacros.h
BTrees/sorters.c
BTrees/utils.py
BTrees.egg-info/PKG-INFO
BTrees.egg-info/SOURCES.txt
BTrees.egg-info/dependency_links.txt
BTrees.egg-info/entry_points.txt
BTrees.egg-info/not-zip-safe
BTrees.egg-info/requires.txt
BTrees.egg-info/top_level.txt
BTrees/tests/__init__.py
BTrees/tests/common.py
BTrees/tests/testBTrees.py
BTrees/tests/testBTreesUnicode.py
BTrees/tests/testConflict.py
BTrees/tests/test_IFBTree.py
BTrees/tests/test_IIBTree.py
BTrees/tests/test_IOBTree.py
BTrees/tests/test_LFBTree.py
BTrees/tests/test_LLBTree.py
BTrees/tests/test_LOBTree.py
BTrees/tests/test_Length.py
BTrees/tests/test_OIBTree.py
BTrees/tests/test_OLBTree.py
BTrees/tests/test_OOBTree.py
BTrees/tests/test__base.py
BTrees/tests/test_btreesubclass.py
BTrees/tests/test_check.py
BTrees/tests/test_fsBTree.py
BTrees/tests/test_utils.py
docs/Makefile
docs/api.rst
docs/conf.py
docs/index.rst
docs/make.bat
docs/_static/placeholder.txt
docs/_templates/placeholder.txt
\ No newline at end of file
\ No newline at end of file
persistent
zope.interface
[ZODB]
ZODB
[docs]
Sphinx
repoze.sphinx.autointerface
[test]
persistent
zope.interface
transaction
[testing]
persistent
zope.interface
transaction
nose
coverage
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2001-2012 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__all__ = ('Bucket', 'Set', 'BTree', 'TreeSet',
'IFBucket', 'IFSet', 'IFBTree', 'IFTreeSet',
'union', 'intersection', 'difference',
'weightedUnion', 'weightedIntersection', 'multiunion',
)
from zope.interface import moduleProvides
from .Interfaces import IIntegerFloatBTreeModule
from ._base import Bucket
from ._base import MERGE
from ._base import MERGE_WEIGHT_numeric
from ._base import MERGE_DEFAULT_float
from ._base import Set
from ._base import Tree as BTree
from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference
from ._base import intersection as _intersection
from ._base import multiunion as _multiunion
from ._base import set_operation as _set_operation
from ._base import to_int as _to_key
from ._base import to_float as _to_value
from ._base import union as _union
from ._base import weightedIntersection as _weightedIntersection
from ._base import weightedUnion as _weightedUnion
from ._base import _fix_pickle
_BUCKET_SIZE = 120
_TREE_SIZE = 500
using64bits = False
class IFBucketPy(Bucket):
_to_key = _to_key
_to_value = _to_value
MERGE = MERGE
MERGE_WEIGHT = MERGE_WEIGHT_numeric
MERGE_DEFAULT = MERGE_DEFAULT_float
class IFSetPy(Set):
_to_key = _to_key
MERGE = MERGE
MERGE_WEIGHT = MERGE_WEIGHT_numeric
MERGE_DEFAULT = MERGE_DEFAULT_float
class IFBTreePy(BTree):
max_leaf_size = _BUCKET_SIZE
max_internal_size = _TREE_SIZE
_to_key = _to_key
_to_value = _to_value
MERGE = MERGE
MERGE_WEIGHT = MERGE_WEIGHT_numeric
MERGE_DEFAULT = MERGE_DEFAULT_float
class IFTreeSetPy(TreeSet):
max_leaf_size = _BUCKET_SIZE
max_internal_size = _TREE_SIZE
_to_key = _to_key
MERGE = MERGE
MERGE_WEIGHT = MERGE_WEIGHT_numeric
MERGE_DEFAULT = MERGE_DEFAULT_float
class IFTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards:
IFBucketPy._mapping_type = IFBucketPy._bucket_type = IFBucketPy
IFBucketPy._set_type = IFSetPy
IFSetPy._mapping_type = IFBucketPy
IFSetPy._set_type = IFSetPy._bucket_type = IFSetPy
IFBTreePy._mapping_type = IFBTreePy._bucket_type = IFBucketPy
IFBTreePy._set_type = IFSetPy
IFTreeSetPy._mapping_type = IFBucketPy
IFTreeSetPy._set_type = IFTreeSetPy._bucket_type = IFSetPy
differencePy = _set_operation(_difference, IFSetPy)
unionPy = _set_operation(_union, IFSetPy)
intersectionPy = _set_operation(_intersection, IFSetPy)
multiunionPy = _set_operation(_multiunion, IFSetPy)
weightedUnionPy = _set_operation(_weightedUnion, IFSetPy)
weightedIntersectionPy = _set_operation(_weightedIntersection, IFSetPy)
try:
from ._IFBTree import IFBucket
except ImportError: #pragma NO COVER w/ C extensions
IFBucket = IFBucketPy
IFSet = IFSetPy
IFBTree = IFBTreePy
IFTreeSet = IFTreeSetPy
IFTreeIterator = IFTreeIteratorPy
difference = differencePy
union = unionPy
intersection = intersectionPy
multiunion = multiunionPy
weightedUnion = weightedUnionPy
weightedIntersection = weightedIntersectionPy
else: #pragma NO COVER w/o C extensions
from ._IFBTree import IFSet
from ._IFBTree import IFBTree
from ._IFBTree import IFTreeSet
from ._IFBTree import IFTreeIterator
from ._IFBTree import difference
from ._IFBTree import union
from ._IFBTree import intersection
from ._IFBTree import multiunion
from ._IFBTree import weightedUnion
from ._IFBTree import weightedIntersection
Bucket = IFBucket
Set = IFSet
BTree = IFBTree
TreeSet = IFTreeSet
_fix_pickle(globals(), __name__)
moduleProvides(IIntegerFloatBTreeModule)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
import persistent
class Length(persistent.Persistent):
"""BTree lengths are often too expensive to compute.
Objects that use BTrees need to keep track of lengths themselves.
This class provides an object for doing this.
As a bonus, the object support application-level conflict
resolution.
It is tempting to to assign length objects to __len__ attributes
to provide instance-specific __len__ methods. However, this no
longer works as expected, because new-style classes cache
class-defined slot methods (like __len__) in C type slots. Thus,
instance-defined slot fillers are ignored.
"""
# class-level default required to keep copy.deepcopy happy -- see
# https://bugs.launchpad.net/zodb/+bug/516653
value = 0
def __init__(self, v=0):
self.value = v
def __getstate__(self):
return self.value
def __setstate__(self, v):
self.value = v
def set(self, v):
self.value = v
def _p_resolveConflict(self, old, s1, s2):
return s1 + s2 - old
def change(self, delta):
self.value += delta
def __call__(self, *args):
return self.value
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*############################################################################
#
# Copyright (c) 2004 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
############################################################################*/
#define MASTER_ID "$Id$\n"
/* IFBTree - int key, float value BTree
Implements a collection using int type keys
and float type values
*/
/* Setup template macros */
#define PERSISTENT
#define MOD_NAME_PREFIX "IF"
#define DEFAULT_MAX_BUCKET_SIZE 120
#define DEFAULT_MAX_BTREE_SIZE 500
#include "_compat.h"
#include "intkeymacros.h"
#include "floatvaluemacros.h"
#ifdef PY3K
#define INITMODULE PyInit__IFBTree
#else
#define INITMODULE init_IFBTree
#endif
#include "BTreeModuleTemplate.c"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.