From: stevenknight Date: Wed, 12 Feb 2003 13:05:31 +0000 (+0000) Subject: Remove deprecated features. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cd8101ecbf3f05679efed230e1cfee593de3cb41;p=scons.git Remove deprecated features. git-svn-id: http://scons.tigris.org/svn/scons/trunk@591 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/SConstruct b/SConstruct index 1edaff17..6b63ec9c 100644 --- a/SConstruct +++ b/SConstruct @@ -470,9 +470,9 @@ for p in [ scons ]: # to the directory in which setup.py exists. # setup_py = os.path.join(build, 'setup.py') - env.Update(PKG = pkg, - PKG_VERSION = pkg_version, - SETUP_PY = setup_py) + env.Replace(PKG = pkg, + PKG_VERSION = pkg_version, + SETUP_PY = setup_py) Local(setup_py) # diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 7533c9d1..944fcb67 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -16,6 +16,9 @@ RELEASE 0.12 - XXX to control how the Install() and InstallAs() Builders install files. The default INSTALL function now copies, not links, files. + - Remove deprecated features: the "name" argument to Builder objects, + and the Environment.Update() method. + RELEASE 0.11 - Tue, 11 Feb 2003 05:24:33 -0600 diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index ed2b767a..cf85a4a4 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -99,9 +99,6 @@ class DictCmdGenerator: def Builder(**kw): """A factory for builder objects.""" composite = None - if kw.has_key('name'): - SCons.Warnings.warn(SCons.Warnings.DeprecatedWarning, - "The use of the 'name' parameter to Builder() is deprecated.") if kw.has_key('generator'): if kw.has_key('action'): raise UserError, "You must not specify both an action and a generator." diff --git a/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py index 8b9bd943..76aa5c82 100644 --- a/src/engine/SCons/BuilderTests.py +++ b/src/engine/SCons/BuilderTests.py @@ -185,26 +185,6 @@ class BuilderTestCase(unittest.TestCase): assert target.name == uni('n16 n17') assert target.sources[0].name == uni('n18 n19') - def test_noname(self): - """Test deprecated warning for Builder name. - - Using the name argument for Builder() is deprectaed and the - user should receive a warning. - """ - SCons.Warnings.enableWarningClass(SCons.Warnings.DeprecatedWarning) - SCons.Warnings.warningAsException(1) - - try: - try: - b = SCons.Builder.Builder(name='foo') - except SCons.Warnings.DeprecatedWarning: - pass - else: - assert 0 - finally: - SCons.Warnings.suppressWarningClass(SCons.Warnings.DeprecatedWarning) - SCons.Warnings.warningAsException(0) - def test_action(self): """Test Builder creation diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 6356776c..97d20f93 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -220,11 +220,6 @@ class Environment: def Scanners(self): pass # XXX - def Update(self, **kw): - """A deprecated synonym for Replace(). - """ - apply(self.Replace, (), kw) - def Replace(self, **kw): """Replace existing construction variables in an Environment with new construction variables and/or values. diff --git a/test/option--warn.py b/test/option--warn.py index d69b6e9e..aa970fed 100644 --- a/test/option--warn.py +++ b/test/option--warn.py @@ -32,23 +32,25 @@ import TestCmd test = TestSCons.TestSCons(match = TestCmd.match_re_dotall) -test.write("SConstruct",""" -b=Builder(name='b', action='foo') -""") - -test.run(arguments='.', stderr=r""" -scons: warning: The use of the 'name' parameter to Builder\(\) is deprecated\. -File "SConstruct", line 2, in \? -""") - -test.run(arguments='--warn=no-deprecated .', stderr='') - -test.run(arguments='--warn=no-all .', stderr='') - -test.run(arguments='--warn=no-all --warn=deprecated .', stderr=r""" -scons: warning: The use of the 'name' parameter to Builder\(\) is deprecated\. -File "SConstruct", line 2, in \? -""") +# How to warn about deprecated features (whenever we have one again). +# +#test.write("SConstruct",""" +#b=Builder(name='b', action='foo') +#""") +# +#test.run(arguments='.', stderr=r""" +#scons: warning: The use of the 'name' parameter to Builder\(\) is deprecated\. +#File "SConstruct", line 2, in \? +#""") +# +#test.run(arguments='--warn=no-deprecated .', stderr='') +# +#test.run(arguments='--warn=no-all .', stderr='') +# +#test.run(arguments='--warn=no-all --warn=deprecated .', stderr=r""" +#scons: warning: The use of the 'name' parameter to Builder\(\) is deprecated\. +#File "SConstruct", line 2, in \? +#""") test.write("SConstruct",""" def build(target, source, env):