diff options
Diffstat (limited to 'src/engine/SCons/Subst.py')
-rw-r--r-- | src/engine/SCons/Subst.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py index 9888e8d..a0a4859 100644 --- a/src/engine/SCons/Subst.py +++ b/src/engine/SCons/Subst.py @@ -30,9 +30,8 @@ from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import collections import re -import UserList -import UserString import SCons.Errors @@ -120,7 +119,7 @@ def quote_spaces(arg): else: return str(arg) -class CmdStringHolder(UserString.UserString): +class CmdStringHolder(collections.UserString): """This is a special class used to hold strings generated by scons_subst() and scons_subst_list(). It defines a special method escape(). When passed a function with an escape algorithm for a @@ -128,7 +127,7 @@ class CmdStringHolder(UserString.UserString): proper escape sequences inserted. """ def __init__(self, cmd, literal=None): - UserString.UserString.__init__(self, cmd) + collections.UserString.__init__(self, cmd) self.literal = literal def is_literal(self): @@ -195,15 +194,15 @@ class NLWrapper: _create_nodelist = _gen_nodelist -class Targets_or_Sources(UserList.UserList): +class Targets_or_Sources(collections.UserList): """A class that implements $TARGETS or $SOURCES expansions by in turn wrapping a NLWrapper. This class handles the different methods used to access the list, calling the NLWrapper to create proxies on demand. - Note that we subclass UserList.UserList purely so that the + Note that we subclass collections.UserList purely so that the is_Sequence() function will identify an object of this class as a list during variable expansion. We're not really using any - UserList.UserList methods in practice. + collections.UserList methods in practice. """ def __init__(self, nl): self.nl = nl @@ -594,7 +593,7 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv # Subst_List_Strings[strSubst] = 1 # import SCons.Debug # SCons.Debug.caller_trace(1) - class ListSubber(UserList.UserList): + class ListSubber(collections.UserList): """A class to construct the results of a scons_subst_list() call. Like StringSubber, this class binds a specific construction @@ -611,7 +610,7 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv internally. """ def __init__(self, env, mode, conv, gvars): - UserList.UserList.__init__(self, []) + collections.UserList.__init__(self, []) self.env = env self.mode = mode self.conv = conv @@ -734,7 +733,7 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv """Arrange for the next word to start a new line. This is like starting a new word, except that we have to append another line to the result.""" - UserList.UserList.append(self, []) + collections.UserList.append(self, []) self.next_word() def this_word(self): |