diff options
| author | Steven Knight <knight@baldmt.com> | 2010-04-07 15:29:39 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2010-04-07 15:29:39 (GMT) |
| commit | ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42 (patch) | |
| tree | eb60dd8251a7fd064aa255309df2056dbf49a258 /src/engine/SCons/EnvironmentTests.py | |
| parent | 32d7c315d62846ea8febadcbb2c60cf9e3382cbf (diff) | |
| download | SCons-ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42.zip SCons-ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42.tar.gz SCons-ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42.tar.bz2 | |
Issue 2334: Use compatibility versions of collections.User{Dict,List,String}
instead of the deprecated User{Dict,List,String} modules. The two test
scripts that use User{List,String} fall back on ImportError by hand.
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
| -rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 3a2cd8a..0719853 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -25,13 +25,13 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import SCons.compat +import collections import copy import io import os import sys import TestCmd import unittest -import UserList from SCons.Environment import * import SCons.Warnings @@ -126,15 +126,15 @@ class Scanner: -class CLVar(UserList.UserList): +class CLVar(collections.UserList): def __init__(self, seq): if isinstance(seq, str): seq = seq.split() - UserList.UserList.__init__(self, seq) + collections.UserList.__init__(self, seq) def __add__(self, other): - return UserList.UserList.__add__(self, CLVar(other)) + return collections.UserList.__add__(self, CLVar(other)) def __radd__(self, other): - return UserList.UserList.__radd__(self, CLVar(other)) + return collections.UserList.__radd__(self, CLVar(other)) def __coerce__(self, other): return (self, CLVar(other)) @@ -1480,9 +1480,9 @@ def exists(env): assert b1 == b2, diff_dict(b1, b2) import UserDict - UD = UserDict.UserDict + UD = collections.UserDict import UserList - UL = UserList.UserList + UL = collections.UserList cases = [ 'a1', 'A1', 'a1A1', @@ -2152,9 +2152,9 @@ f5: \ """Test prepending to construction variables in an Environment """ import UserDict - UD = UserDict.UserDict + UD = collections.UserDict import UserList - UL = UserList.UserList + UL = collections.UserList cases = [ 'a1', 'A1', 'A1a1', |
