[Zope3-checkins] CVS: Zope3/src/zope/app/utilities -
instance.py:1.3 schema.py:1.5
Jim Fulton
jim at zope.com
Sun Sep 21 13:31:46 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/utilities
In directory cvs.zope.org:/tmp/cvs-serv12774/src/zope/app/utilities
Modified Files:
instance.py schema.py
Log Message:
No-longer use context wrappers.
=== Zope3/src/zope/app/utilities/instance.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/utilities/instance.py:1.2 Fri Aug 15 20:44:21 2003
+++ Zope3/src/zope/app/utilities/instance.py Sun Sep 21 13:31:15 2003
@@ -20,7 +20,6 @@
from persistence import Persistent
from persistence.dict import PersistentDict
from zope.app.component.interfacefield import InterfaceField
-from zope.context import ContextMethod
from zope.interface import directlyProvides, implements, Interface
from zope.schema import getFields, TextLine
from zope.security.checker import CheckerPublic, Checker, defineChecker
@@ -88,8 +87,6 @@
super(ContentComponentInstance, self).__setattr__(key, value)
else:
raise AttributeError, 'Attribute not available'
-
- __setattr__ = ContextMethod(__setattr__)
def getSchema(self):
=== Zope3/src/zope/app/utilities/schema.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/utilities/schema.py:1.4 Mon Aug 18 14:52:55 2003
+++ Zope3/src/zope/app/utilities/schema.py Sun Sep 21 13:31:15 2003
@@ -25,11 +25,10 @@
from zope.app.services.interface import PersistentInterfaceClass
from zope.app.services.interface import PersistentInterface
from zope.app.services.utility import UtilityRegistration
-from zope.context import ContextMethod
from zope.interface import implements
from zope.interface import directlyProvides, directlyProvidedBy
from zope.schema import getFieldsInOrder, getFieldNamesInOrder
-
+from zope.app.container.contained import Contained
class SchemaUtility(PersistentInterfaceClass):
@@ -131,7 +130,7 @@
name = self.contentName
container = zapi.getAdapter(self.context, IMutableSchema)
container.addField(name, content)
- return zapi.ContextWrapper(content, container, name=name)
+ return content
def nextURL(self):
"""See zope.app.interfaces.container.IAdding"""
@@ -149,21 +148,18 @@
def activated(self):
schema = self.getComponent()
schema.setName(self.name)
- activated = ContextMethod(activated)
def deactivated(self):
schema = self.getComponent()
schema.setName('<schema not activated>')
- deactivated = ContextMethod(deactivated)
# XXX: This needs refactoring
-class MutableSchemaContent:
+class MutableSchemaContent(Contained):
implements(IMutableSchemaContent)
schema_id = None
- zapi.ContextAwareDescriptors()
def _set_schema(self, iface):
directlyProvides(self, iface)
More information about the Zope3-Checkins
mailing list