Commit b8333c14 authored by Tres Seaver's avatar Tres Seaver

Attempt to insulate against ZODB dependencies.

Mark (temporarily) tests which use DB, etc. as functests.

Conditionally import the BTreesConflictError exception type from
ZODB.POSError into BTrees.Interfaces;  if missing, derive from ValueError.

Note that this is basically what the C code does already, so make
it use the one from BTrees.Interfaces directly.
parent acb62c44
......@@ -485,7 +485,7 @@ INITMODULE (void)
return;
/* Grab the ConflictError class */
m = PyImport_ImportModule("ZODB.POSException");
m = PyImport_ImportModule("BTrees.Interfaces");
if (m != NULL) {
c = PyObject_GetAttrString(m, "BTreesConflictError");
if (c != NULL)
......
......@@ -507,6 +507,12 @@ class IIntegerFloatBTreeModule(IBTreeModule, IMerge):
family = Attribute('The IBTreeFamily of this module')
try:
from ZODB.POSException import BTreesConflictError
except ImportError:
class BTreesConflictError(ValueError):
pass
###############################################################
# IMPORTANT NOTE
#
......
This diff is collapsed.
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