[Zodb-checkins] CVS: ZODB3/ZODB - cPersistence.c:1.63 coptimizations.c:1.20

Guido van Rossum guido@python.org
Mon, 30 Sep 2002 12:02:33 -0400


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv27324

Modified Files:
	cPersistence.c coptimizations.c 
Log Message:
These C extensions living in a package were doing relative imports of
other modules living in the same package.  It turns out that that
doesn't work when the __import__ builtin has been replaced by one
written in Python.  The easiest fix is to use absolute imports.



=== ZODB3/ZODB/cPersistence.c 1.62 => 1.63 ===
--- ZODB3/ZODB/cPersistence.c:1.62	Tue Jun 18 17:37:56 2002
+++ ZODB3/ZODB/cPersistence.c	Mon Sep 30 12:02:32 2002
@@ -845,7 +845,7 @@
 {
   PyObject *m, *d, *s;
 
-  s = PyString_FromString("TimeStamp");
+  s = PyString_FromString("ZODB.TimeStamp");
   if (s == NULL)
       return;
   m = PyImport_Import(s);


=== ZODB3/ZODB/coptimizations.c 1.19 => 1.20 ===
--- ZODB3/ZODB/coptimizations.c:1.19	Mon Sep 16 23:42:58 2002
+++ ZODB3/ZODB/coptimizations.c	Mon Sep 30 12:02:32 2002
@@ -288,7 +288,7 @@
     make_string(new_oid);
 			
     /* Get InvalidObjectReference error */
-    UNLESS (m=PyString_FromString("POSException")) return;
+    UNLESS (m=PyString_FromString("ZODB.POSException")) return;
     ASSIGN(m, PyImport_Import(m));
     UNLESS (m) return;
     ASSIGN(m, PyObject_GetAttrString(m, "InvalidObjectReference"));