Remove deprecated features.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 12 Feb 2003 13:05:31 +0000 (13:05 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 12 Feb 2003 13:05:31 +0000 (13:05 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@591 fdb21ef1-2011-0410-befe-b5e4ea1792b1

SConstruct
src/CHANGES.txt
src/engine/SCons/Builder.py
src/engine/SCons/BuilderTests.py
src/engine/SCons/Environment.py
test/option--warn.py

index 1edaff17b3ec9be4432bb302e3f71c56f4e21c08..6b63ec9c87fc0472187e9ab62b21f30538dcf207 100644 (file)
@@ -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)
 
     #
index 7533c9d141b1e92aca05d6c10569b54354341522..944fcb6795fbe65bc7c7da8b37bc7ae22549bb05 100644 (file)
@@ -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
index ed2b767a5a3275126413ab6ddcf6c7643cf53505..cf85a4a4b6252384c8f6c32f4441a6585e71ad15 100644 (file)
@@ -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."
index 8b9bd943903025019a858ec08a8935a18e31e7c7..76aa5c82fbcbe744091e93316cb674ac71472725 100644 (file)
@@ -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
 
index 6356776c3d986b78ea08d9b9000ad05bbf8eaf27..97d20f93b2c876926b21635db8137b9680ac3854 100644 (file)
@@ -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.
index d69b6e9ed1c0f22883d30cecbc94b9b40dfd7289..aa970fed8ee5fc6aa277f7cb81592d2c26d0dcbb 100644 (file)
@@ -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):