[Zope3-checkins] CVS: Packages/ZConfig - Config.py:1.14.10.1 Context.py:1.15.10.2
Fred L. Drake, Jr.
fred@zope.com
Tue, 10 Dec 2002 11:09:12 -0500
Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv884
Modified Files:
Tag: zconfig-schema-devel-branch
Config.py Context.py
Log Message:
Rip out more code intended only to support %import.
=== Packages/ZConfig/Config.py 1.14 => 1.14.10.1 ===
--- Packages/ZConfig/Config.py:1.14 Thu Dec 5 00:17:45 2002
+++ Packages/ZConfig/Config.py Tue Dec 10 11:09:12 2002
@@ -192,24 +192,6 @@
return s.split()
-class ImportingConfiguration(Configuration):
- def __init__(self, url):
- self._imports = []
- Configuration.__init__(self, None, None, None, url)
-
- def addImport(self, section):
- self._imports.append(section)
-
- def get(self, key, default=None):
- s = Configuration.get(self, key, default)
- if s is default:
- for config in self._imports:
- s = config.get(key, default)
- if s is not default:
- break
- return s
-
-
def asBoolean(s):
"""Convert a string value to a boolean value."""
ss = str(s).lower()
=== Packages/ZConfig/Context.py 1.15.10.1 => 1.15.10.2 ===
--- Packages/ZConfig/Context.py:1.15.10.1 Tue Dec 10 10:57:19 2002
+++ Packages/ZConfig/Context.py Tue Dec 10 11:09:12 2002
@@ -6,7 +6,7 @@
from ZConfig import loader
-from Config import Configuration, ImportingConfiguration
+from Config import Configuration
from Substitution import isname, substitute
@@ -20,16 +20,13 @@
# subclass-support API
- def createImportedSection(self, section, url):
- return ImportingConfiguration(url)
-
def createNestedSection(self, section, type, name, delegatename):
if name:
name = name.lower()
return Configuration(section, type.lower(), name, section.url)
def createToplevelSection(self, url):
- return ImportingConfiguration(url)
+ return Configuration(None, None, None, url)
def createResource(self, file, url):
return DefiningResource(file, url)