[Zodb-checkins] CVS: Packages/ZConfig - info.py:1.9 schema.py:1.13

Fred L. Drake, Jr. fred@zope.com
Fri, 10 Jan 2003 15:38:23 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv25394

Modified Files:
	info.py schema.py 
Log Message:
The <schema> element no longer supports a "type" attribute, since
component imports are better now, and do not use that element.


=== Packages/ZConfig/info.py 1.8 => 1.9 ===
--- Packages/ZConfig/info.py:1.8	Thu Jan  9 11:34:43 2003
+++ Packages/ZConfig/info.py	Fri Jan 10 15:37:49 2003
@@ -368,18 +368,18 @@
 
 
 class SchemaType(SectionType):
-    def __init__(self, name, keytype, valuetype, datatype, handler, url,
+    def __init__(self, keytype, valuetype, datatype, handler, url,
                  registry):
-        SectionType.__init__(self, name, keytype, valuetype, datatype,
+        SectionType.__init__(self, None, keytype, valuetype, datatype,
                              registry, {})
         self.handler = handler
         self.url = url
 
     def addtype(self, typeinfo):
-        n = typeinfo.name.lower()
+        n = typeinfo.name
         if self._types.has_key(n):
             raise ZConfig.SchemaError("type name cannot be redefined: "
-                                             + `typeinfo.name`)
+                                      + `typeinfo.name`)
         self._types[n] = typeinfo
 
     def allowUnnamed(self):


=== Packages/ZConfig/schema.py 1.12 => 1.13 ===
--- Packages/ZConfig/schema.py:1.12	Fri Jan 10 01:39:16 2003
+++ Packages/ZConfig/schema.py	Fri Jan 10 15:37:49 2003
@@ -427,15 +427,9 @@
         self.push_prefix(attrs)
         handler = self.get_handler(attrs)
         keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
-        name = attrs.get("type")
-        if name is not None:
-            name = self.basic_key(name)
-        self._schema = info.SchemaType(name, keytype, valuetype, datatype,
+        self._schema = info.SchemaType(keytype, valuetype, datatype,
                                        handler, self._url, self._registry)
         self._localtypes = self._schema._types
-        if name is not None:
-            # XXX circular reference
-            self._schema.addtype(self._schema)
         self._stack = [self._schema]
 
     def end_schema(self):