[Zodb-checkins] CVS: Zope3/src/ZConfig - schema.py:1.24

Fred L. Drake, Jr. fred at zope.com
Thu Sep 25 10:59:10 EDT 2003


Update of /cvs-repository/Zope3/src/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv2696

Modified Files:
	schema.py 
Log Message:
remove restriction that a component cannot extend types defined in
other components; it's not clear that this was very meaningful


=== Zope3/src/ZConfig/schema.py 1.23 => 1.24 ===
--- Zope3/src/ZConfig/schema.py:1.23	Thu Sep 25 10:07:51 2003
+++ Zope3/src/ZConfig/schema.py	Thu Sep 25 10:59:09 2003
@@ -327,8 +327,6 @@
         if attrs.has_key("extends"):
             basename = self.basic_key(attrs["extends"])
             base = self._schema.gettype(basename)
-            if not self._localtypes.has_key(basename):
-                self.error("cannot extend type derived outside component")
             if base.isabstract():
                 self.error("sectiontype cannot extend an abstract type")
             if attrs.has_key("keytype"):
@@ -338,7 +336,6 @@
         else:
             sectinfo = self._schema.createSectionType(
                 name, keytype, valuetype, datatype)
-        self._localtypes[name] = sectinfo
         if attrs.has_key("implements"):
             ifname = self.basic_key(attrs["implements"])
             interface = self._schema.gettype(ifname)
@@ -464,7 +461,6 @@
         keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
         self._schema = info.SchemaType(keytype, valuetype, datatype,
                                        handler, self._url, self._registry)
-        self._localtypes = self._schema._types
         self._stack = [self._schema]
 
     def end_schema(self):
@@ -474,7 +470,6 @@
         assert not self._prefixes
 
 
-
 class ComponentParser(BaseParser):
 
     _handled_tags = BaseParser._handled_tags + ("component",)
@@ -482,7 +477,6 @@
 
     def __init__(self, registry, loader, url, schema):
         BaseParser.__init__(self, registry, loader, url)
-        self._localtypes = {}
         self._parent = schema
 
     def characters_description(self, data):




More information about the Zodb-checkins mailing list