[Checkins] SVN: zope.container/trunk/src/zope/container/ rename zope.app.container to zope.container

Wolfgang Schnerring wosc at wosc.de
Wed Jan 28 10:59:18 EST 2009


Log message for revision 95341:
  rename zope.app.container to zope.container
  

Changed:
  D   zope.container/trunk/src/zope/container/_zope_app_container_contained.c
  A   zope.container/trunk/src/zope/container/_zope_container_contained.c
  U   zope.container/trunk/src/zope/container/_zope_proxy_proxy.c
  U   zope.container/trunk/src/zope/container/btree.py
  U   zope.container/trunk/src/zope/container/constraints.py
  U   zope.container/trunk/src/zope/container/contained.py
  U   zope.container/trunk/src/zope/container/dependency.py
  U   zope.container/trunk/src/zope/container/ordered.py
  U   zope.container/trunk/src/zope/container/sample.py
  U   zope.container/trunk/src/zope/container/size.py
  U   zope.container/trunk/src/zope/container/tests/placelesssetup.py
  U   zope.container/trunk/src/zope/container/tests/test_btree.py
  U   zope.container/trunk/src/zope/container/tests/test_constraints.py
  U   zope.container/trunk/src/zope/container/tests/test_contained.py
  U   zope.container/trunk/src/zope/container/tests/test_containertraversable.py
  U   zope.container/trunk/src/zope/container/tests/test_containertraverser.py
  U   zope.container/trunk/src/zope/container/tests/test_dependency.py
  U   zope.container/trunk/src/zope/container/tests/test_directory.py
  U   zope.container/trunk/src/zope/container/tests/test_find.py
  U   zope.container/trunk/src/zope/container/tests/test_icontainer.py
  U   zope.container/trunk/src/zope/container/tests/test_ordered.py
  U   zope.container/trunk/src/zope/container/tests/test_size.py
  U   zope.container/trunk/src/zope/container/traversal.py

-=-
Deleted: zope.container/trunk/src/zope/container/_zope_app_container_contained.c
===================================================================
--- zope.container/trunk/src/zope/container/_zope_app_container_contained.c	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/_zope_app_container_contained.c	2009-01-28 15:59:18 UTC (rev 95341)
@@ -1,336 +0,0 @@
-/*############################################################################
-#
-# Copyright (c) 2003 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.
-#
-############################################################################*/
-
-#define _ZOPE_APP_CONTAINER_CONTAINED_C "$Id$\n"
-
-/* Contained Proxy Base class
-
- Contained proxies provide __parent__ and __name__ attributes for
- objects without them.
-
- There is something strange and, possibly cool, going on here, wrt
- persistence.  To reuse the base proxy implementation we don't treat
- the proxied object as part of the persistent state of the proxy.
- This means that the proxy still operates as a proxy even if it is a
- ghost.  
-
- The proxy will only be unghostified if you need to access one of the
- attributes provided by the proxy.
-
- */
-
-
-#include "Python.h"
-#include "persistent/cPersistence.h"
-
-static PyObject *str_p_deactivate;
-
-#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
-typedef int Py_ssize_t;
-#define PY_SSIZE_T_MAX INT_MAX
-#define PY_SSIZE_T_MIN INT_MIN
-typedef Py_ssize_t (*lenfunc)(PyObject *);
-typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
-typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
-typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
-typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
-#endif
-
-typedef struct {
-  cPersistent_HEAD
-  PyObject *po_weaklist;
-  PyObject *proxy_object;
-  PyObject *__parent__;
-  PyObject *__name__;
-} ProxyObject;
-
-typedef struct {
-    PyTypeObject *proxytype;
-    int (*check)(PyObject *obj);
-    PyObject *(*create)(PyObject *obj);
-    PyObject *(*getobject)(PyObject *proxy);
-} ProxyInterface;
-
-#define OBJECT(O) ((PyObject*)(O))
-#define Proxy_GET_OBJECT(ob)   (((ProxyObject *)(ob))->proxy_object)
-
-#define CLEAR(O) \
-  if (O) {PyObject *clr__tmp = O; O = NULL; Py_DECREF(clr__tmp); }
-
-/* Supress inclusion of the original proxy.h */
-#define _proxy_H_ 1
-
-/* Incude the proxy C source */
-#include "_zope_proxy_proxy.c"
-
-#define SPECIAL(NAME) (                        \
-    *(NAME) == '_' &&                          \
-      (((NAME)[1] == 'p' && (NAME)[2] == '_')  \
-       ||                                      \
-       ((NAME)[1] == '_' && (                  \
-         strcmp((NAME), "__parent__") == 0     \
-         ||                                    \
-         strcmp((NAME), "__name__") == 0       \
-         ||                                    \
-         strcmp((NAME), "__getstate__") == 0   \
-         ||                                    \
-         strcmp((NAME), "__setstate__") == 0   \
-         ||                                    \
-         strcmp((NAME), "__getnewargs__") == 0 \
-         ||                                    \
-         strcmp((NAME), "__reduce__") == 0     \
-         ||                                    \
-         strcmp((NAME), "__reduce_ex__") == 0  \
-         ))                                    \
-       ))
-      
-static PyObject *
-CP_getattro(PyObject *self, PyObject *name)
-{
-  char *cname;
-
-  cname = PyString_AsString(name);
-  if (cname == NULL)
-    return NULL;
-
-  if (SPECIAL(cname))
-    /* delegate to persistent */
-    return cPersistenceCAPI->pertype->tp_getattro(self, name);
-
-  /* Use the wrapper version to delegate */
-  return wrap_getattro(self, name);
-}
-
-static int
-CP_setattro(PyObject *self, PyObject *name, PyObject *v)
-{
-  char *cname;
-
-  cname = PyString_AsString(name);
-  if (cname == NULL)
-    return -1;
-
-  if (SPECIAL(cname))
-    /* delegate to persistent */
-    return cPersistenceCAPI->pertype->tp_setattro(self, name, v);
-
-  /* Use the wrapper version to delegate */
-  return wrap_setattro(self, name, v);
-}
-
-static PyObject *
-CP_getstate(ProxyObject *self)
-{
-  return Py_BuildValue("OO", 
-                       self->__parent__ ? self->__parent__ : Py_None,
-                       self->__name__   ? self->__name__   : Py_None
-                       );
-}
-
-static PyObject *
-CP_getnewargs(ProxyObject *self)
-{
-  return Py_BuildValue("(O)", self->proxy_object);
-}
-
-static PyObject *
-CP_setstate(ProxyObject *self, PyObject *state)
-{
-  PyObject *parent, *name;
-
-  if(! PyArg_ParseTuple(state, "OO", &parent, &name))
-    return NULL;
-
-  CLEAR(self->__parent__);
-  CLEAR(self->__name__);
-
-  Py_INCREF(parent);
-  Py_INCREF(name);
-
-  self->__parent__ = parent;
-  self->__name__ = name;
-
-  Py_INCREF(Py_None);
-  return Py_None;
-}
-
-static PyObject *
-CP_reduce(ProxyObject *self)
-{
-  PyObject *result;
-  if (! PER_USE(self))
-    return NULL;
-  result = Py_BuildValue("O(O)(OO)",
-                         self->ob_type,
-                         self->proxy_object,
-                         self->__parent__ ? self->__parent__ : Py_None,
-                         self->__name__   ? self->__name__   : Py_None
-                         );
-  PER_ALLOW_DEACTIVATION(self);
-  return result;
-}
-
-static PyObject *
-CP_reduce_ex(ProxyObject *self, PyObject *proto)
-{
-  return CP_reduce(self);
-}
-
-static PyObject *
-CP__p_deactivate(ProxyObject *self)
-{
-  PyObject *result;
-
-  result = PyObject_CallMethodObjArgs(OBJECT(cPersistenceCAPI->pertype), 
-                                      str_p_deactivate,
-                                      self, NULL);
-  if (result == NULL)
-    return NULL;
-
-  if (self->jar && self->oid && self->state == cPersistent_UPTODATE_STATE)
-    {
-      Py_XDECREF(self->__parent__);
-      self->__parent__ = NULL;
-      Py_XDECREF(self->__name__);
-      self->__name__ = NULL;
-    }
-
-    return result;
-}
-
-
-static PyMethodDef
-CP_methods[] = {
-  {"__getstate__", (PyCFunction)CP_getstate, METH_NOARGS, 
-   "Get the object state"},
-  {"__setstate__", (PyCFunction)CP_setstate, METH_O, 
-   "Set the object state"},
-  {"__getnewargs__", (PyCFunction)CP_getnewargs, METH_NOARGS, 
-   "Get the arguments that must be passed to __new__"},
-  {"__reduce__", (PyCFunction)CP_reduce, METH_NOARGS, 
-   "Reduce the object to constituent parts."},
-  {"__reduce_ex__", (PyCFunction)CP_reduce_ex, METH_O, 
-   "Reduce the object to constituent parts."},
-  {"_p_deactivate", (PyCFunction)CP__p_deactivate, METH_NOARGS, 
-   "Deactivate the object."},
-  {NULL, NULL},
-};
-
-
-/* Code to access structure members by accessing attributes */
-
-#include "structmember.h"
-
-static PyMemberDef CP_members[] = {
-  {"__parent__", T_OBJECT, offsetof(ProxyObject, __parent__)},
-  {"__name__", T_OBJECT, offsetof(ProxyObject, __name__)},
-  {NULL}	/* Sentinel */
-};
-
-static int
-CP_traverse(ProxyObject *self, visitproc visit, void *arg)
-{
-  if (cPersistenceCAPI->pertype->tp_traverse((PyObject *)self, visit, arg) < 0)
-    return -1;
-  if (self->proxy_object != NULL && visit(self->proxy_object, arg) < 0)
-    return -1;
-  if (self->__parent__ != NULL && visit(self->__parent__, arg) < 0)
-    return -1;
-  if (self->__name__ != NULL && visit(self->__name__, arg) < 0)
-    return -1;
-  
-  return 0;
-}
-
-static int
-CP_clear(ProxyObject *self)
-{
-  /* Drop references that may have created reference
-     cycles. Immutable objects do not have to define this method
-     since they can never directly create reference cycles. Note
-     that the object must still be valid after calling this
-     method (don't just call Py_DECREF() on a reference). The
-     collector will call this method if it detects that this
-     object is involved in a reference cycle.
-  */
-  if (cPersistenceCAPI->pertype->tp_clear != NULL)
-    cPersistenceCAPI->pertype->tp_clear((PyObject*)self);
-  
-  CLEAR(self->proxy_object);
-  CLEAR(self->__parent__);
-  CLEAR(self->__name__);
-
-  return 0;
-}
-
-static void
-CP_dealloc(ProxyObject *self)
-{
-  if (self->po_weaklist != NULL)
-    PyObject_ClearWeakRefs((PyObject *)self);
-
-  CLEAR(self->proxy_object);
-  CLEAR(self->__parent__);
-  CLEAR(self->__name__);
-
-  cPersistenceCAPI->pertype->tp_dealloc((PyObject*)self);
-}
-
-#ifndef PyMODINIT_FUNC	/* declarations for DLL import/export */
-#define PyMODINIT_FUNC void
-#endif
-PyMODINIT_FUNC
-init_zope_app_container_contained(void)
-{
-  PyObject *m;
-
-  str_p_deactivate = PyString_FromString("_p_deactivate");
-  if (str_p_deactivate == NULL)
-    return;
-        
-  /* Try to fake out compiler nag function */
-  if (0) init_zope_proxy_proxy();
-  
-  m = Py_InitModule3("_zope_app_container_contained", 
-                     module_functions, module___doc__);
-
-  if (m == NULL)
-    return;
-
-  if (empty_tuple == NULL)
-    empty_tuple = PyTuple_New(0);
-
-  /* Initialize the PyPersist_C_API and the type objects. */
-  cPersistenceCAPI = PyCObject_Import("persistent.cPersistence", "CAPI");
-  if (cPersistenceCAPI == NULL)
-    return;
-
-  ProxyType.tp_name = "zope.app.container.contained.ContainedProxyBase";
-  ProxyType.ob_type = &PyType_Type;
-  ProxyType.tp_base = cPersistenceCAPI->pertype;
-  ProxyType.tp_getattro = CP_getattro;
-  ProxyType.tp_setattro = CP_setattro;
-  ProxyType.tp_members = CP_members;
-  ProxyType.tp_methods = CP_methods;
-  ProxyType.tp_traverse = (traverseproc) CP_traverse;
-  ProxyType.tp_clear = (inquiry) CP_clear;
-  ProxyType.tp_dealloc = (destructor) CP_dealloc;
-  ProxyType.tp_weaklistoffset = offsetof(ProxyObject, po_weaklist);
-
-  if (PyType_Ready(&ProxyType) < 0)
-    return;
-
-  Py_INCREF(&ProxyType);
-  PyModule_AddObject(m, "ContainedProxyBase", (PyObject *)&ProxyType);
-}

Copied: zope.container/trunk/src/zope/container/_zope_container_contained.c (from rev 95336, zope.container/trunk/src/zope/container/_zope_app_container_contained.c)
===================================================================
--- zope.container/trunk/src/zope/container/_zope_container_contained.c	                        (rev 0)
+++ zope.container/trunk/src/zope/container/_zope_container_contained.c	2009-01-28 15:59:18 UTC (rev 95341)
@@ -0,0 +1,336 @@
+/*############################################################################
+#
+# Copyright (c) 2003 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.
+#
+############################################################################*/
+
+#define _ZOPE_APP_CONTAINER_CONTAINED_C "$Id$\n"
+
+/* Contained Proxy Base class
+
+ Contained proxies provide __parent__ and __name__ attributes for
+ objects without them.
+
+ There is something strange and, possibly cool, going on here, wrt
+ persistence.  To reuse the base proxy implementation we don't treat
+ the proxied object as part of the persistent state of the proxy.
+ This means that the proxy still operates as a proxy even if it is a
+ ghost.  
+
+ The proxy will only be unghostified if you need to access one of the
+ attributes provided by the proxy.
+
+ */
+
+
+#include "Python.h"
+#include "persistent/cPersistence.h"
+
+static PyObject *str_p_deactivate;
+
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+typedef Py_ssize_t (*lenfunc)(PyObject *);
+typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
+typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
+typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
+typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
+#endif
+
+typedef struct {
+  cPersistent_HEAD
+  PyObject *po_weaklist;
+  PyObject *proxy_object;
+  PyObject *__parent__;
+  PyObject *__name__;
+} ProxyObject;
+
+typedef struct {
+    PyTypeObject *proxytype;
+    int (*check)(PyObject *obj);
+    PyObject *(*create)(PyObject *obj);
+    PyObject *(*getobject)(PyObject *proxy);
+} ProxyInterface;
+
+#define OBJECT(O) ((PyObject*)(O))
+#define Proxy_GET_OBJECT(ob)   (((ProxyObject *)(ob))->proxy_object)
+
+#define CLEAR(O) \
+  if (O) {PyObject *clr__tmp = O; O = NULL; Py_DECREF(clr__tmp); }
+
+/* Supress inclusion of the original proxy.h */
+#define _proxy_H_ 1
+
+/* Incude the proxy C source */
+#include "_zope_proxy_proxy.c"
+
+#define SPECIAL(NAME) (                        \
+    *(NAME) == '_' &&                          \
+      (((NAME)[1] == 'p' && (NAME)[2] == '_')  \
+       ||                                      \
+       ((NAME)[1] == '_' && (                  \
+         strcmp((NAME), "__parent__") == 0     \
+         ||                                    \
+         strcmp((NAME), "__name__") == 0       \
+         ||                                    \
+         strcmp((NAME), "__getstate__") == 0   \
+         ||                                    \
+         strcmp((NAME), "__setstate__") == 0   \
+         ||                                    \
+         strcmp((NAME), "__getnewargs__") == 0 \
+         ||                                    \
+         strcmp((NAME), "__reduce__") == 0     \
+         ||                                    \
+         strcmp((NAME), "__reduce_ex__") == 0  \
+         ))                                    \
+       ))
+      
+static PyObject *
+CP_getattro(PyObject *self, PyObject *name)
+{
+  char *cname;
+
+  cname = PyString_AsString(name);
+  if (cname == NULL)
+    return NULL;
+
+  if (SPECIAL(cname))
+    /* delegate to persistent */
+    return cPersistenceCAPI->pertype->tp_getattro(self, name);
+
+  /* Use the wrapper version to delegate */
+  return wrap_getattro(self, name);
+}
+
+static int
+CP_setattro(PyObject *self, PyObject *name, PyObject *v)
+{
+  char *cname;
+
+  cname = PyString_AsString(name);
+  if (cname == NULL)
+    return -1;
+
+  if (SPECIAL(cname))
+    /* delegate to persistent */
+    return cPersistenceCAPI->pertype->tp_setattro(self, name, v);
+
+  /* Use the wrapper version to delegate */
+  return wrap_setattro(self, name, v);
+}
+
+static PyObject *
+CP_getstate(ProxyObject *self)
+{
+  return Py_BuildValue("OO", 
+                       self->__parent__ ? self->__parent__ : Py_None,
+                       self->__name__   ? self->__name__   : Py_None
+                       );
+}
+
+static PyObject *
+CP_getnewargs(ProxyObject *self)
+{
+  return Py_BuildValue("(O)", self->proxy_object);
+}
+
+static PyObject *
+CP_setstate(ProxyObject *self, PyObject *state)
+{
+  PyObject *parent, *name;
+
+  if(! PyArg_ParseTuple(state, "OO", &parent, &name))
+    return NULL;
+
+  CLEAR(self->__parent__);
+  CLEAR(self->__name__);
+
+  Py_INCREF(parent);
+  Py_INCREF(name);
+
+  self->__parent__ = parent;
+  self->__name__ = name;
+
+  Py_INCREF(Py_None);
+  return Py_None;
+}
+
+static PyObject *
+CP_reduce(ProxyObject *self)
+{
+  PyObject *result;
+  if (! PER_USE(self))
+    return NULL;
+  result = Py_BuildValue("O(O)(OO)",
+                         self->ob_type,
+                         self->proxy_object,
+                         self->__parent__ ? self->__parent__ : Py_None,
+                         self->__name__   ? self->__name__   : Py_None
+                         );
+  PER_ALLOW_DEACTIVATION(self);
+  return result;
+}
+
+static PyObject *
+CP_reduce_ex(ProxyObject *self, PyObject *proto)
+{
+  return CP_reduce(self);
+}
+
+static PyObject *
+CP__p_deactivate(ProxyObject *self)
+{
+  PyObject *result;
+
+  result = PyObject_CallMethodObjArgs(OBJECT(cPersistenceCAPI->pertype), 
+                                      str_p_deactivate,
+                                      self, NULL);
+  if (result == NULL)
+    return NULL;
+
+  if (self->jar && self->oid && self->state == cPersistent_UPTODATE_STATE)
+    {
+      Py_XDECREF(self->__parent__);
+      self->__parent__ = NULL;
+      Py_XDECREF(self->__name__);
+      self->__name__ = NULL;
+    }
+
+    return result;
+}
+
+
+static PyMethodDef
+CP_methods[] = {
+  {"__getstate__", (PyCFunction)CP_getstate, METH_NOARGS, 
+   "Get the object state"},
+  {"__setstate__", (PyCFunction)CP_setstate, METH_O, 
+   "Set the object state"},
+  {"__getnewargs__", (PyCFunction)CP_getnewargs, METH_NOARGS, 
+   "Get the arguments that must be passed to __new__"},
+  {"__reduce__", (PyCFunction)CP_reduce, METH_NOARGS, 
+   "Reduce the object to constituent parts."},
+  {"__reduce_ex__", (PyCFunction)CP_reduce_ex, METH_O, 
+   "Reduce the object to constituent parts."},
+  {"_p_deactivate", (PyCFunction)CP__p_deactivate, METH_NOARGS, 
+   "Deactivate the object."},
+  {NULL, NULL},
+};
+
+
+/* Code to access structure members by accessing attributes */
+
+#include "structmember.h"
+
+static PyMemberDef CP_members[] = {
+  {"__parent__", T_OBJECT, offsetof(ProxyObject, __parent__)},
+  {"__name__", T_OBJECT, offsetof(ProxyObject, __name__)},
+  {NULL}	/* Sentinel */
+};
+
+static int
+CP_traverse(ProxyObject *self, visitproc visit, void *arg)
+{
+  if (cPersistenceCAPI->pertype->tp_traverse((PyObject *)self, visit, arg) < 0)
+    return -1;
+  if (self->proxy_object != NULL && visit(self->proxy_object, arg) < 0)
+    return -1;
+  if (self->__parent__ != NULL && visit(self->__parent__, arg) < 0)
+    return -1;
+  if (self->__name__ != NULL && visit(self->__name__, arg) < 0)
+    return -1;
+  
+  return 0;
+}
+
+static int
+CP_clear(ProxyObject *self)
+{
+  /* Drop references that may have created reference
+     cycles. Immutable objects do not have to define this method
+     since they can never directly create reference cycles. Note
+     that the object must still be valid after calling this
+     method (don't just call Py_DECREF() on a reference). The
+     collector will call this method if it detects that this
+     object is involved in a reference cycle.
+  */
+  if (cPersistenceCAPI->pertype->tp_clear != NULL)
+    cPersistenceCAPI->pertype->tp_clear((PyObject*)self);
+  
+  CLEAR(self->proxy_object);
+  CLEAR(self->__parent__);
+  CLEAR(self->__name__);
+
+  return 0;
+}
+
+static void
+CP_dealloc(ProxyObject *self)
+{
+  if (self->po_weaklist != NULL)
+    PyObject_ClearWeakRefs((PyObject *)self);
+
+  CLEAR(self->proxy_object);
+  CLEAR(self->__parent__);
+  CLEAR(self->__name__);
+
+  cPersistenceCAPI->pertype->tp_dealloc((PyObject*)self);
+}
+
+#ifndef PyMODINIT_FUNC	/* declarations for DLL import/export */
+#define PyMODINIT_FUNC void
+#endif
+PyMODINIT_FUNC
+init_zope_app_container_contained(void)
+{
+  PyObject *m;
+
+  str_p_deactivate = PyString_FromString("_p_deactivate");
+  if (str_p_deactivate == NULL)
+    return;
+        
+  /* Try to fake out compiler nag function */
+  if (0) init_zope_proxy_proxy();
+  
+  m = Py_InitModule3("_zope_app_container_contained", 
+                     module_functions, module___doc__);
+
+  if (m == NULL)
+    return;
+
+  if (empty_tuple == NULL)
+    empty_tuple = PyTuple_New(0);
+
+  /* Initialize the PyPersist_C_API and the type objects. */
+  cPersistenceCAPI = PyCObject_Import("persistent.cPersistence", "CAPI");
+  if (cPersistenceCAPI == NULL)
+    return;
+
+  ProxyType.tp_name = "zope.app.container.contained.ContainedProxyBase";
+  ProxyType.ob_type = &PyType_Type;
+  ProxyType.tp_base = cPersistenceCAPI->pertype;
+  ProxyType.tp_getattro = CP_getattro;
+  ProxyType.tp_setattro = CP_setattro;
+  ProxyType.tp_members = CP_members;
+  ProxyType.tp_methods = CP_methods;
+  ProxyType.tp_traverse = (traverseproc) CP_traverse;
+  ProxyType.tp_clear = (inquiry) CP_clear;
+  ProxyType.tp_dealloc = (destructor) CP_dealloc;
+  ProxyType.tp_weaklistoffset = offsetof(ProxyObject, po_weaklist);
+
+  if (PyType_Ready(&ProxyType) < 0)
+    return;
+
+  Py_INCREF(&ProxyType);
+  PyModule_AddObject(m, "ContainedProxyBase", (PyObject *)&ProxyType);
+}


Property changes on: zope.container/trunk/src/zope/container/_zope_container_contained.c
___________________________________________________________________
Added: cvs2svn:cvs-rev
   + 1.5
Added: svn:keywords
   + Id
Added: svn:mergeinfo
   + 
Added: svn:eol-style
   + native

Modified: zope.container/trunk/src/zope/container/_zope_proxy_proxy.c
===================================================================
--- zope.container/trunk/src/zope/container/_zope_proxy_proxy.c	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/_zope_proxy_proxy.c	2009-01-28 15:59:18 UTC (rev 95341)
@@ -14,8 +14,8 @@
 
 /*
  *   This file is also used as a really extensive macro in
- *   ../app/container/_zope_app_container_contained.c.  If you need to
- *   change this file, you need to "svn copy" it to ../app/container/.
+ *   ../app/container/_zope_container_contained.c.  If you need to
+ *   change this file, you need to "svn copy" it to ../container/.
  *
  *   This approach is taken to allow the sources for the two packages
  *   to be compilable when the relative locations of these aren't

Modified: zope.container/trunk/src/zope/container/btree.py
===================================================================
--- zope.container/trunk/src/zope/container/btree.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/btree.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -21,8 +21,8 @@
 from BTrees.OOBTree import OOBTree
 from BTrees.Length import Length
 
-from zope.app.container.interfaces import IBTreeContainer
-from zope.app.container.contained import Contained, setitem, uncontained
+from zope.container.interfaces import IBTreeContainer
+from zope.container.contained import Contained, setitem, uncontained
 from zope.cachedescriptors.property import Lazy
 from zope.interface import implements
 

Modified: zope.container/trunk/src/zope/container/constraints.py
===================================================================
--- zope.container/trunk/src/zope/container/constraints.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/constraints.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -33,7 +33,7 @@
    ...         "Add an item"
    ...     __setitem__.precondition = preNoZ
 
-   >>> from zope.app.container.interfaces import IContainer
+   >>> from zope.container.interfaces import IContainer
    >>> class C1(object):
    ...     zope.interface.implements(I1, IContainer)
    ...     def __repr__(self):
@@ -157,9 +157,9 @@
 from zope.dottedname.resolve import resolve
 import zope.schema
 from zope.interface import providedBy
-from zope.app.container.interfaces import InvalidItemType, InvalidContainerType
-from zope.app.container.i18n import ZopeMessageFactory as _
-from zope.app.container.interfaces import IContainer
+from zope.container.interfaces import InvalidItemType, InvalidContainerType
+from zope.container.i18n import ZopeMessageFactory as _
+from zope.container.interfaces import IContainer
 
 def checkObject(container, name, object):
     """Check containement constraints for an object and container
@@ -425,7 +425,7 @@
       >>> class IBar(IContainer):
       ...     pass
 
-      >>> from zope.app.container.interfaces import IContained
+      >>> from zope.container.interfaces import IContained
       >>> class IFooBarContained(IContained):
       ...     containers(IFoo, IBar)
 

Modified: zope.container/trunk/src/zope/container/contained.py
===================================================================
--- zope.container/trunk/src/zope/container/contained.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/contained.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -29,15 +29,15 @@
 from zope.security.checker import selectChecker, CombinedChecker
 from zope.lifecycleevent import ObjectModifiedEvent
 
-from zope.app.container.i18n import ZopeMessageFactory as _
-from zope.app.container.interfaces import IContained
-from zope.app.container.interfaces import INameChooser
-from zope.app.container.interfaces import IObjectAddedEvent
-from zope.app.container.interfaces import IObjectMovedEvent
-from zope.app.container.interfaces import IObjectRemovedEvent
-from zope.app.container.interfaces import IContainerModifiedEvent
-from zope.app.container._zope_app_container_contained import ContainedProxyBase
-from zope.app.container._zope_app_container_contained import getProxiedObject
+from zope.container.i18n import ZopeMessageFactory as _
+from zope.container.interfaces import IContained
+from zope.container.interfaces import INameChooser
+from zope.container.interfaces import IObjectAddedEvent
+from zope.container.interfaces import IObjectMovedEvent
+from zope.container.interfaces import IObjectRemovedEvent
+from zope.container.interfaces import IContainerModifiedEvent
+from zope.container._zope_app_container_contained import ContainedProxyBase
+from zope.container._zope_app_container_contained import getProxiedObject
 from zope.app.broken.interfaces import IBroken
 
 class Contained(object):
@@ -380,8 +380,8 @@
     ...     def setMoved(self, event):
     ...         self.moved = event
 
-    >>> from zope.app.container.interfaces import IObjectAddedEvent
-    >>> from zope.app.container.interfaces import IObjectMovedEvent
+    >>> from zope.container.interfaces import IObjectAddedEvent
+    >>> from zope.container.interfaces import IObjectMovedEvent
     >>> from zope.app.testing import ztapi
 
     >>> ztapi.subscribe([IItem, IObjectAddedEvent], None,
@@ -601,7 +601,7 @@
 
     >>> from zope.component.eventtesting import getEvents
     >>> from zope.lifecycleevent.interfaces import IObjectModifiedEvent
-    >>> from zope.app.container.interfaces import IObjectRemovedEvent
+    >>> from zope.container.interfaces import IObjectRemovedEvent
 
     We'll start by creating a container with an item:
 
@@ -705,14 +705,14 @@
         self.context = context
 
     def checkName(self, name, object):
-        """See zope.app.container.interfaces.INameChooser
+        """See zope.container.interfaces.INameChooser
 
         We create and populate a dummy container
 
-        >>> from zope.app.container.sample import SampleContainer
+        >>> from zope.container.sample import SampleContainer
         >>> container = SampleContainer()
         >>> container['foo'] = 'bar'
-        >>> from zope.app.container.contained import NameChooser
+        >>> from zope.container.contained import NameChooser
 
         All these names are invalid:
 
@@ -769,17 +769,17 @@
 
 
     def chooseName(self, name, object):
-        """See zope.app.container.interfaces.INameChooser
+        """See zope.container.interfaces.INameChooser
 
         The name chooser is expected to choose a name without error
         
         We create and populate a dummy container
 
-        >>> from zope.app.container.sample import SampleContainer
+        >>> from zope.container.sample import SampleContainer
         >>> container = SampleContainer()
         >>> container['foo.old.rst'] = 'rst doc'
 
-        >>> from zope.app.container.contained import NameChooser
+        >>> from zope.container.contained import NameChooser
         >>> NameChooser(container).chooseName('+ at +@foo.old.rst', object())
         u'foo.old-2.rst'
         >>> NameChooser(container).chooseName('+ at +@foo/foo', object())

Modified: zope.container/trunk/src/zope/container/dependency.py
===================================================================
--- zope.container/trunk/src/zope/container/dependency.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/dependency.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -21,7 +21,7 @@
 __docformat__ = 'restructuredtext'
 
 from zope.i18nmessageid import Message
-from zope.app.container.i18n import ZopeMessageFactory as _
+from zope.container.i18n import ZopeMessageFactory as _
 from zope.app.dependable.interfaces import IDependable, DependencyError
 from zope.traversing.api import getPath
 

Modified: zope.container/trunk/src/zope/container/ordered.py
===================================================================
--- zope.container/trunk/src/zope/container/ordered.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/ordered.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -17,14 +17,14 @@
 """
 __docformat__ = 'restructuredtext'
 
-from zope.app.container.interfaces import IOrderedContainer
+from zope.container.interfaces import IOrderedContainer
 from zope.interface import implements
 from persistent import Persistent
 from persistent.dict import PersistentDict
 from persistent.list import PersistentList
 from types import StringTypes, TupleType, ListType
-from zope.app.container.contained import Contained, setitem, uncontained
-from zope.app.container.contained import notifyContainerModified
+from zope.container.contained import Contained, setitem, uncontained
+from zope.container.contained import notifyContainerModified
 
 class OrderedContainer(Persistent, Contained):
     """ `OrderedContainer` maintains entries' order as added and moved.

Modified: zope.container/trunk/src/zope/container/sample.py
===================================================================
--- zope.container/trunk/src/zope/container/sample.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/sample.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -22,9 +22,9 @@
 """
 __docformat__ = 'restructuredtext'
 
-from zope.app.container.interfaces import IContainer
+from zope.container.interfaces import IContainer
 from zope.interface import implements
-from zope.app.container.contained import Contained, setitem, uncontained
+from zope.container.contained import Contained, setitem, uncontained
 
 
 class SampleContainer(Contained):

Modified: zope.container/trunk/src/zope/container/size.py
===================================================================
--- zope.container/trunk/src/zope/container/size.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/size.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -18,7 +18,7 @@
 """
 __docformat__ = 'restructuredtext'
 
-from zope.app.container.i18n import ZopeMessageFactory as _
+from zope.container.i18n import ZopeMessageFactory as _
 from zope.size.interfaces import ISized
 from zope.interface import implements
 

Modified: zope.container/trunk/src/zope/container/tests/placelesssetup.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/placelesssetup.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/placelesssetup.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -16,8 +16,8 @@
 $Id$
 """
 from zope.app.testing import ztapi
-from zope.app.container.interfaces import IWriteContainer, INameChooser
-from zope.app.container.contained import NameChooser
+from zope.container.interfaces import IWriteContainer, INameChooser
+from zope.container.contained import NameChooser
 
 class PlacelessSetup(object):
 

Modified: zope.container/trunk/src/zope/container/tests/test_btree.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_btree.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_btree.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -20,8 +20,8 @@
 from zope.testing.doctestunit import DocTestSuite
 from zope.app.testing import placelesssetup
 from test_icontainer import TestSampleContainer
-from zope.app.container.btree import BTreeContainer
-from zope.app.container.interfaces import IBTreeContainer
+from zope.container.btree import BTreeContainer
+from zope.container.interfaces import IBTreeContainer
 
 
 class TestBTreeContainer(TestSampleContainer, TestCase):
@@ -168,7 +168,7 @@
     return TestSuite((
         makeSuite(TestBTreeContainer),
         makeSuite(TestBTreeSpecials),
-        DocTestSuite('zope.app.container.btree',
+        DocTestSuite('zope.container.btree',
                      setUp=placelesssetup.setUp,
                      tearDown=placelesssetup.tearDown),
         ))

Modified: zope.container/trunk/src/zope/container/tests/test_constraints.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_constraints.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_constraints.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -19,14 +19,14 @@
 from zope.testing import doctest, module
 
 def setUp(test):
-    module.setUp(test, 'zope.app.container.constraints_txt')
+    module.setUp(test, 'zope.container.constraints_txt')
 
 def tearDown(test):
-    module.tearDown(test, 'zope.app.container.constraints_txt')
+    module.tearDown(test, 'zope.container.constraints_txt')
 
 def test_suite():
     return unittest.TestSuite((
-        doctest.DocTestSuite('zope.app.container.constraints'),
+        doctest.DocTestSuite('zope.container.constraints'),
         doctest.DocFileSuite('../constraints.txt',
                              setUp=setUp, tearDown=tearDown),
         ))

Modified: zope.container/trunk/src/zope/container/tests/test_contained.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_contained.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_contained.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -25,7 +25,7 @@
 import zope.interface
 from zope.testing import doctest
 
-from zope.app.container.contained import ContainedProxy
+from zope.container.contained import ContainedProxy
 from zope.app.testing import placelesssetup
 
 class MyOb(Persistent):
@@ -108,24 +108,24 @@
     It implements IContained and IPersistent:
 
       >>> tuple(zope.interface.implementedBy(ContainedProxy))
-      (<InterfaceClass zope.app.container.interfaces.IContained>,
+      (<InterfaceClass zope.container.interfaces.IContained>,
        <InterfaceClass persistent.interfaces.IPersistent>)
 
     A proxied object has IContainer, in addition to what the unproxied
     object has:
 
       >>> tuple(zope.interface.providedBy(p))
-      (<InterfaceClass zope.app.container.tests.test_contained.I1>,
-       <InterfaceClass zope.app.container.interfaces.IContained>,
+      (<InterfaceClass zope.container.tests.test_contained.I1>,
+       <InterfaceClass zope.container.interfaces.IContained>,
        <InterfaceClass persistent.interfaces.IPersistent>)
 
       >>> class I2(zope.interface.Interface):
       ...     pass
       >>> zope.interface.directlyProvides(c, I2)
       >>> tuple(zope.interface.providedBy(p))
-      (<InterfaceClass zope.app.container.tests.test_contained.I2>,
-       <InterfaceClass zope.app.container.tests.test_contained.I1>,
-       <InterfaceClass zope.app.container.interfaces.IContained>,
+      (<InterfaceClass zope.container.tests.test_contained.I2>,
+       <InterfaceClass zope.container.tests.test_contained.I1>,
+       <InterfaceClass zope.container.interfaces.IContained>,
        <InterfaceClass persistent.interfaces.IPersistent>)
 
     We can declare interfaces through the proxy:
@@ -134,9 +134,9 @@
       ...     pass
       >>> zope.interface.directlyProvides(p, I3)
       >>> tuple(zope.interface.providedBy(p))
-      (<InterfaceClass zope.app.container.tests.test_contained.I3>,
-       <InterfaceClass zope.app.container.tests.test_contained.I1>,
-       <InterfaceClass zope.app.container.interfaces.IContained>,
+      (<InterfaceClass zope.container.tests.test_contained.I3>,
+       <InterfaceClass zope.container.tests.test_contained.I1>,
+       <InterfaceClass zope.container.interfaces.IContained>,
        <InterfaceClass persistent.interfaces.IPersistent>)
 
     """
@@ -293,7 +293,7 @@
 def test_ContainedProxy_instances_have_no_instance_dictionaries():
     """Make sure that proxies don't introduce extra instance dictionaries
 
-    >>> from zope.app.container.contained import ContainedProxy
+    >>> from zope.container.contained import ContainedProxy
     >>> class C:
     ...     pass
 
@@ -318,7 +318,7 @@
 
 def test_suite():
     return unittest.TestSuite((
-        doctest.DocTestSuite('zope.app.container.contained',
+        doctest.DocTestSuite('zope.container.contained',
                              setUp=placelesssetup.setUp,
                              tearDown=placelesssetup.tearDown),
         doctest.DocTestSuite(optionflags=doctest.NORMALIZE_WHITESPACE),

Modified: zope.container/trunk/src/zope/container/tests/test_containertraversable.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_containertraversable.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_containertraversable.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -20,8 +20,8 @@
 from zope.interface import implements
 from zope.traversing.interfaces import TraversalError
 
-from zope.app.container.traversal import ContainerTraversable
-from zope.app.container.interfaces import IContainer
+from zope.container.traversal import ContainerTraversable
+from zope.container.interfaces import IContainer
 
 class Container(object):
 

Modified: zope.container/trunk/src/zope/container/tests/test_containertraverser.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_containertraverser.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_containertraverser.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -16,8 +16,8 @@
 $Id$
 """
 import unittest
-from zope.app.container.traversal import ContainerTraverser
-from zope.app.container.interfaces import IReadContainer
+from zope.container.traversal import ContainerTraverser
+from zope.container.interfaces import IReadContainer
 from zope.app.testing import ztapi, placelesssetup
 from zope.publisher.interfaces import NotFound
 from zope.publisher.browser import TestRequest

Modified: zope.container/trunk/src/zope/container/tests/test_dependency.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_dependency.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_dependency.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -19,8 +19,8 @@
 
 from zope.interface import implements
 from zope.app.dependable.interfaces import IDependable, DependencyError
-from zope.app.container.contained import ObjectRemovedEvent
-from zope.app.container.dependency import CheckDependency
+from zope.container.contained import ObjectRemovedEvent
+from zope.container.dependency import CheckDependency
 from zope.traversing.interfaces import IPhysicallyLocatable
 
 class DummyObject(object):

Modified: zope.container/trunk/src/zope/container/tests/test_directory.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_directory.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_directory.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -16,7 +16,7 @@
 $Id$
 """
 from unittest import TestCase, TestSuite, main, makeSuite
-import zope.app.container.directory
+import zope.container.directory
 
 class Directory(object):
     pass
@@ -26,7 +26,7 @@
     def test_Cloner(self):
         d = Directory()
         d.a = 1
-        clone = zope.app.container.directory.Cloner(d)('foo')
+        clone = zope.container.directory.Cloner(d)('foo')
         self.assert_(clone != d)
         self.assertEqual(clone.__class__, d.__class__)
 

Modified: zope.container/trunk/src/zope/container/tests/test_find.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_find.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_find.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -16,10 +16,10 @@
 $Id$
 """
 from unittest import TestCase, main, makeSuite
-from zope.app.container.interfaces import IReadContainer
-from zope.app.container.interfaces import IObjectFindFilter
-from zope.app.container.find import FindAdapter, SimpleIdFindFilter
-from zope.app.container.find import SimpleInterfacesFindFilter
+from zope.container.interfaces import IReadContainer
+from zope.container.interfaces import IObjectFindFilter
+from zope.container.find import FindAdapter, SimpleIdFindFilter
+from zope.container.find import SimpleInterfacesFindFilter
 from zope.interface import implements, Interface, directlyProvides
 
 class FakeContainer(object):

Modified: zope.container/trunk/src/zope/container/tests/test_icontainer.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_icontainer.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_icontainer.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -18,7 +18,7 @@
 from unittest import TestCase, main, makeSuite
 
 from zope.interface.verify import verifyObject
-from zope.app.container.interfaces import IContainer
+from zope.container.interfaces import IContainer
 from zope.app.testing import placelesssetup
 
 
@@ -300,7 +300,7 @@
 class TestSampleContainer(BaseTestIContainer, TestCase):
 
     def makeTestObject(self):
-        from zope.app.container.sample import SampleContainer
+        from zope.container.sample import SampleContainer
         return SampleContainer()
 
     def makeTestData(self):

Modified: zope.container/trunk/src/zope/container/tests/test_ordered.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_ordered.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_ordered.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -28,7 +28,7 @@
 
     Prepare some objects::
 
-        >>> from zope.app.container.ordered import OrderedContainer
+        >>> from zope.container.ordered import OrderedContainer
         >>> oc = OrderedContainer()
         >>> oc['foo'] = 'bar'
         >>> oc['baz'] = 'quux'
@@ -69,7 +69,7 @@
     Now register an event subscriber to object added events.
 
         >>> import zope.component
-        >>> from zope.app.container import interfaces
+        >>> from zope.container import interfaces
 
         >>> @zope.component.adapter(interfaces.IObjectAddedEvent)
         ... def printContainerKeys(event):
@@ -79,7 +79,7 @@
 
     Now we are adding an object to the container. 
 
-        >>> from zope.app.container.ordered import OrderedContainer
+        >>> from zope.container.ordered import OrderedContainer
         >>> oc = OrderedContainer()
         >>> oc['foo'] = 'FOO'
         ['foo']
@@ -99,7 +99,7 @@
     throws an error.
 
         >>> import zope.component
-        >>> from zope.app.container import interfaces
+        >>> from zope.container import interfaces
 
         >>> @zope.component.adapter(interfaces.IObjectAddedEvent)
         ... def raiseException(event):
@@ -109,7 +109,7 @@
 
     Now we are adding an object to the container.
 
-        >>> from zope.app.container.ordered import OrderedContainer
+        >>> from zope.container.ordered import OrderedContainer
         >>> oc = OrderedContainer()
         >>> oc['foo'] = 'FOO'
         Traceback (most recent call last):
@@ -128,7 +128,7 @@
 
 def test_suite():
     suite = unittest.TestSuite()
-    suite.addTest(DocTestSuite("zope.app.container.ordered",
+    suite.addTest(DocTestSuite("zope.container.ordered",
                                setUp=placelesssetup.setUp,
                                tearDown=placelesssetup.tearDown))
     suite.addTest(DocTestSuite())

Modified: zope.container/trunk/src/zope/container/tests/test_size.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_size.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/tests/test_size.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -19,7 +19,7 @@
 
 from zope.interface import implements
 from zope.size.interfaces import ISized
-from zope.app.container.interfaces import IContainer
+from zope.container.interfaces import IContainer
 
 class DummyContainer(object):
 
@@ -35,12 +35,12 @@
 class Test(unittest.TestCase):
 
     def testImplementsISized(self):
-        from zope.app.container.size import ContainerSized
+        from zope.container.size import ContainerSized
         sized = ContainerSized(DummyContainer(23))
         self.assert_(ISized.providedBy(sized))
 
     def testEmptyContainer(self):
-        from zope.app.container.size import ContainerSized
+        from zope.container.size import ContainerSized
         obj = DummyContainer(0)
         sized = ContainerSized(obj)
         self.assertEqual(sized.sizeForSorting(), ('item', 0))
@@ -48,14 +48,14 @@
         self.assertEqual(sized.sizeForDisplay().mapping['items'], '0')
 
     def testOneItem(self):
-        from zope.app.container.size import ContainerSized
+        from zope.container.size import ContainerSized
         obj = DummyContainer(1)
         sized = ContainerSized(obj)
         self.assertEqual(sized.sizeForSorting(), ('item', 1))
         self.assertEqual(sized.sizeForDisplay(), u'1 item')
 
     def testSeveralItems(self):
-        from zope.app.container.size import ContainerSized
+        from zope.container.size import ContainerSized
         obj = DummyContainer(2)
         sized = ContainerSized(obj)
         self.assertEqual(sized.sizeForSorting(), ('item', 2))

Modified: zope.container/trunk/src/zope/container/traversal.py
===================================================================
--- zope.container/trunk/src/zope/container/traversal.py	2009-01-28 15:56:15 UTC (rev 95340)
+++ zope.container/trunk/src/zope/container/traversal.py	2009-01-28 15:59:18 UTC (rev 95341)
@@ -24,8 +24,8 @@
 from zope.publisher.interfaces.xmlrpc import IXMLRPCPublisher
 from zope.publisher.interfaces import NotFound
 
-from zope.app.container.interfaces import ISimpleReadContainer, IItemContainer
-from zope.app.container.interfaces import IReadContainer
+from zope.container.interfaces import ISimpleReadContainer, IItemContainer
+from zope.container.interfaces import IReadContainer
 from zope.app.publisher.browser import getDefaultViewName
 
 # Note that the next two classes are included here because they



More information about the Checkins mailing list