]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/bloom.py
Don't import * from helpers
[bup.git] / lib / bup / bloom.py
index 5974ee28a70da2d31716cb9f6e2583a2181e0ceb..ef896f564027158523594ff71728d51f20c64ee0 100644 (file)
@@ -79,9 +79,13 @@ None of this tells us what max_pfalse_positive to choose.
 
 Brandon Low <lostlogic@lostlogicx.com> 2011-02-04
 """
-import sys, os, math, mmap
+
+import sys, os, math, mmap, struct
+
 from bup import _helpers
-from bup.helpers import *
+from bup.helpers import (debug1, debug2, log, mmap_read, mmap_readwrite,
+                         mmap_readwrite_private)
+
 
 BLOOM_VERSION = 2
 MAX_BITS_EACH = 32 # Kinda arbitrary, but 4 bytes per entry is pretty big
@@ -94,6 +98,9 @@ _total_steps = 0
 bloom_contains = _helpers.bloom_contains
 bloom_add = _helpers.bloom_add
 
+# FIXME: check bloom create() and ShaBloom handling/ownership of "f".
+# The ownership semantics should be clarified since the caller needs
+# to know who is responsible for closing it.
 
 class ShaBloom:
     """Wrapper which contains data from multiple index files. """