[Checkins] SVN: zc.buildout/trunk/ removed remnants of extended-by implementation, raise a UserError if the option is encountered

Thomas Lotze tl at gocept.com
Thu Feb 17 01:27:07 EST 2011


Log message for revision 120410:
  removed remnants of extended-by implementation, raise a UserError if the option is encountered

Changed:
  U   zc.buildout/trunk/CHANGES.txt
  U   zc.buildout/trunk/src/zc/buildout/buildout.py
  U   zc.buildout/trunk/src/zc/buildout/extends-cache.txt

-=-
Modified: zc.buildout/trunk/CHANGES.txt
===================================================================
--- zc.buildout/trunk/CHANGES.txt	2011-02-17 02:53:27 UTC (rev 120409)
+++ zc.buildout/trunk/CHANGES.txt	2011-02-17 06:27:06 UTC (rev 120410)
@@ -20,6 +20,9 @@
 - In the download module, fixed the handling of directories that are pointed
   to by file-system paths and ``file:`` URLs.
 
+- Removed any traces of the implementation of ``extended-by``. Raise a
+  UserError if the option is encountered instead of ignoring it, though.
+
 1.5.2 (2010-10-11)
 ==================
 

Modified: zc.buildout/trunk/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.py	2011-02-17 02:53:27 UTC (rev 120409)
+++ zc.buildout/trunk/src/zc/buildout/buildout.py	2011-02-17 06:27:06 UTC (rev 120410)
@@ -1437,12 +1437,15 @@
         fp.close()
         os.remove(path)
 
-    extends = extended_by = None
+    extends = None
     for section in parser.sections():
         options = dict(parser.items(section))
         if section == 'buildout':
             extends = options.pop('extends', extends)
-            extended_by = options.pop('extended-by', extended_by)
+            if 'extended-by' in options:
+                raise zc.buildout.UserError(
+                    'No-longer supported "extended-by" option found in %s.' %
+                    filename)
         result[section] = options
 
     result = _annotate(result, filename)
@@ -1459,14 +1462,6 @@
                     downloaded))
         result = _update(eresult, result)
 
-    if extended_by:
-        self._logger.warn(
-            "The extendedBy option is deprecated.  Stop using it."
-            )
-        for fname in extended_by.split():
-            result = _update(
-                result,
-                _open(base, fname, seen, dl_options, override, downloaded))
     seen.pop()
     return result
 

Modified: zc.buildout/trunk/src/zc/buildout/extends-cache.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/extends-cache.txt	2011-02-17 02:53:27 UTC (rev 120409)
+++ zc.buildout/trunk/src/zc/buildout/extends-cache.txt	2011-02-17 06:27:06 UTC (rev 120410)
@@ -485,6 +485,25 @@
 >>> zc.buildout.download.Download.download = old_download
 
 
+The deprecated ``extended-by`` option
+-------------------------------------
+
+The ``buildout`` section used to recognise an option named ``extended-by``
+that was deprecated at some point and removed in the 1.5 line. Since ignoring
+this option silently was considered harmful as a matter of principle, a
+UserError is raised if that option is encountered now:
+
+>>> write(server_data, 'base.cfg', """\
+... [buildout]
+... parts =
+... extended-by = foo.cfg
+... """)
+>>> print system(buildout)
+While:
+  Initializing.
+Error: No-longer supported "extended-by" option found in http://localhost/base.cfg.
+
+
 Clean up
 --------
 



More information about the checkins mailing list