Commit fd48702d authored by Tim Peters's avatar Tim Peters

Remove BTrees/convert.py, which hasn't been of use for years.

parent c6e06365
......@@ -61,7 +61,6 @@ src/BTrees/_OOBTree.c
src/BTrees/__init__.py
src/BTrees/_fsBTree.c
src/BTrees/check.py
src/BTrees/convert.py
src/BTrees/intkeymacros.h
src/BTrees/intvaluemacros.h
src/BTrees/objectkeymacros.h
......
......@@ -118,6 +118,10 @@ BTrees
- (3.5a4) Collector 1829. Clarified that the ``minKey()`` and ``maxKey()``
methods raise an exception if no key exists satsifying the constraints.
- (3.5a4) The ancient ``convert.py`` script was removed. It was intended to
convert "old" BTrees to "new" BTrees, but the "old" BTree implementation
was removed from ZODB years ago.
What's new in ZODB3 3.4.1a6?
============================
......
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation 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
#
##############################################################################
# TODO: does this script still serve a purpose? Writing this in 2005,
# "old btree" doesn't mean much to me.
import transaction
def convert(old, new, threshold=200, f=None):
"Utility for converting old btree to new"
n=0
for k, v in old.items():
if f is not None: v=f(v)
new[k]=v
n=n+1
if n > threshold:
transaction.savepoint()
old._p_jar.cacheMinimize()
n=0
transaction.savepoint()
old._p_jar.cacheMinimize()
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