summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-02-12 13:05:31 (GMT)
committerSteven Knight <knight@baldmt.com>2003-02-12 13:05:31 (GMT)
commitbdbeeed7d1492c270c24d809237eb5f724c7cbf5 (patch)
tree61a0120a0f03c1e875ad2ebc40af99229d793c62
parent5bbe45c7286f8e9e6d0139e611e0763681c2dd45 (diff)
downloadSCons-bdbeeed7d1492c270c24d809237eb5f724c7cbf5.zip
SCons-bdbeeed7d1492c270c24d809237eb5f724c7cbf5.tar.gz
SCons-bdbeeed7d1492c270c24d809237eb5f724c7cbf5.tar.bz2
Remove deprecated features.
-rw-r--r--SConstruct6
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Builder.py3
-rw-r--r--src/engine/SCons/BuilderTests.py20
-rw-r--r--src/engine/SCons/Environment.py5
-rw-r--r--test/option--warn.py36
6 files changed, 25 insertions, 48 deletions
diff --git a/SConstruct b/SConstruct
index 1edaff1..6b63ec9 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 7533c9d..944fcb6 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 ed2b767..cf85a4a 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 8b9bd94..76aa5c8 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 6356776..97d20f9 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 d69b6e9..aa970fe 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):