Commit e6245154 authored by Jim Fulton's avatar Jim Fulton

Author: Thomas Lotze <tl@gocept.com>

Date:   Thu Feb 17 06:27:06 2011 +0000
removed remnants of extended-by implementation, raise a UserError if
the option is encountered

Cherry-picked from svntrunk.
parent e4ceb0ac
...@@ -28,6 +28,9 @@ New features: ...@@ -28,6 +28,9 @@ New features:
- Make sure to download extended configuration files only once per buildout - Make sure to download extended configuration files only once per buildout
run even if they are referenced multiple times (patch by Rafael Monnerat). run even if they are referenced multiple times (patch by Rafael Monnerat).
- Removed any traces of the implementation of ``extended-by``. Raise a
UserError if the option is encountered instead of ignoring it, though.
Bugs fixed: Bugs fixed:
- In the download module, fixed the handling of directories that are pointed - In the download module, fixed the handling of directories that are pointed
......
...@@ -1343,12 +1343,15 @@ def _open(base, filename, seen, dl_options, override, downloaded): ...@@ -1343,12 +1343,15 @@ def _open(base, filename, seen, dl_options, override, downloaded):
fp.close() fp.close()
os.remove(path) os.remove(path)
extends = extended_by = None extends = None
for section in parser.sections(): for section in parser.sections():
options = dict(parser.items(section)) options = dict(parser.items(section))
if section == 'buildout': if section == 'buildout':
extends = options.pop('extends', extends) 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[section] = options
result = _annotate(result, filename) result = _annotate(result, filename)
...@@ -1365,14 +1368,6 @@ def _open(base, filename, seen, dl_options, override, downloaded): ...@@ -1365,14 +1368,6 @@ def _open(base, filename, seen, dl_options, override, downloaded):
downloaded)) downloaded))
result = _update(eresult, result) 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() seen.pop()
return result return result
......
...@@ -486,6 +486,25 @@ Unused options for buildout: 'bar' 'foo'. ...@@ -486,6 +486,25 @@ Unused options for buildout: 'bar' 'foo'.
>>> zc.buildout.download.Download.download = old_download >>> 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 Clean up
-------- --------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment