[Zope3-checkins] CVS: Zope3/src/zope/proxy/context - __init__.py:1.1.2.5

Jim Fulton jim@zope.com
Tue, 24 Dec 2002 11:07:46 -0500


Update of /cvs-repository/Zope3/src/zope/proxy/context
In directory cvs.zope.org:/tmp/cvs-serv1350/context

Modified Files:
      Tag: NameGeddon-branch
	__init__.py 
Log Message:
More changes after refactoring context.context.py into __init__.

=== Zope3/src/zope/proxy/context/__init__.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/proxy/context/__init__.py:1.1.2.4	Tue Dec 24 07:51:27 2002
+++ Zope3/src/zope/proxy/context/__init__.py	Tue Dec 24 11:07:46 2002
@@ -23,8 +23,12 @@
 from zope.proxy.context.wrapper import getobject, getdict
 from zope.proxy.context.wrapper import getcontext, getinnercontext
 from zope.proxy.context.wrapper import getinnerwrapper
+from zope.proxy.context.wrapper import Wrapper as _Wrapper, getbaseobject
 from zope.security.checker import defineChecker, selectChecker, BasicTypes
 
+
+__metaclass__ = type
+
 from zope.proxy.interfaces.context import IContextWrapper
 
 __implements__ = IContextWrapper
@@ -151,10 +155,6 @@
 
 # This method wrapper does not work for builtin methods.
 
-from zope.proxy.context.wrapper import Wrapper, getbaseobject
-
-__metaclass__ = type
-
 class ContextMethod:
     def __new__(cls, method):
         try:
@@ -198,7 +198,9 @@
 
     return factory(object, context, **data)
 
-class SimpleMethodWrapper(Wrapper):
+Wrapper = wrapperCreator
+
+class SimpleMethodWrapper(_Wrapper):
 
     def __getattribute__(self, name):
         """Support for ContextMethod and ContextProperty.__get__"""
@@ -210,7 +212,7 @@
                        '__Zope_ContextWrapper_contextful_get__', False):
                 return class_value.__get__(self, class_)
             
-        return Wrapper.__getattribute__(self, name)
+        return _Wrapper.__getattribute__(self, name)
 
     def __setattr__(self, name, value):
         """Support for ContextProperty.__set__"""
@@ -228,13 +230,13 @@
 class SimpleCallableMethodWrapper(SimpleMethodWrapper):
 
     def __call__(self, *args, **kw):
-        attr = Wrapper.__getattribute__(self, '__call__')
+        attr = _Wrapper.__getattribute__(self, '__call__')
         return attr.__get__(self)(*args, **kw)
 
 class SimpleGetitemMethodWrapper(SimpleMethodWrapper):
 
     def __getitem__(self, key, *args, **kw):
-        attr = Wrapper.__getattribute__(self, '__getitem__')
+        attr = _Wrapper.__getattribute__(self, '__getitem__')
         return attr.__get__(self)(key, *args, **kw)
 
 class SimpleCallableGetitemMethodWrapper(SimpleCallableMethodWrapper,