diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Action.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/ActionTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Builder.py | 8 | ||||
-rw-r--r-- | src/engine/SCons/BuilderTests.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 10 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 6 | ||||
-rw-r--r-- | src/engine/SCons/Node/FS.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/Dir.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/LaTeX.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/ScannerTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/__init__.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Script/SConsOptions.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/intelc.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/javac.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/packaging/rpm.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/textfile.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Util.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Variables/VariablesTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/compat/_scons_sets.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/dblite.py | 2 |
20 files changed, 33 insertions, 33 deletions
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index 6b04612..e121752 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -1150,7 +1150,7 @@ class ListAction(ActionBase): for act in self.list: for var in act.get_varlist(target, source, env, executor): result[var] = True - return result.keys() + return list(result.keys()) class ActionCaller: """A class for delaying calling an Action function with specific diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py index 4ffbdec..f31d7da 100644 --- a/src/engine/SCons/ActionTests.py +++ b/src/engine/SCons/ActionTests.py @@ -152,7 +152,7 @@ class Environment: def get(self, key, value=None): return self.d.get(key, value) def items(self): - return self.d.items() + return list(self.d.items()) def Dictionary(self): return self.d def Clone(self, **kw): diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index 6317a44..2e068c2 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -138,7 +138,7 @@ class DictCmdGenerator(SCons.Util.Selector): self.source_ext_match = source_ext_match def src_suffixes(self): - return self.keys() + return list(self.keys()) def add_action(self, suffix, action): """Add a suffix-action pair to the mapping. @@ -173,7 +173,7 @@ class DictCmdGenerator(SCons.Util.Selector): raise UserError("Ambiguous suffixes after environment substitution: %s == %s == %s" % (e.args[0], e.args[1], e.args[2])) if ret is None: raise UserError("While building `%s' from `%s': Don't know how to build from a source file with suffix `%s'. Expected a suffix in this list: %s." % \ - (repr(list(map(str, target))), repr(list(map(str, source))), ext, repr(self.keys()))) + (repr(list(map(str, target))), repr(list(map(str, source))), ext, repr(list(self.keys())))) return ret class CallableSelector(SCons.Util.Selector): @@ -440,8 +440,8 @@ class BuilderBase: name (if there is one) or the name of the class (by default).""" try: - index = env['BUILDERS'].values().index(self) - return env['BUILDERS'].keys()[index] + index = list(env['BUILDERS'].values()).index(self) + return list(env['BUILDERS'].keys())[index] except (AttributeError, KeyError, TypeError, ValueError): try: return self.name diff --git a/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py index 50cf778..b1443bc 100644 --- a/src/engine/SCons/BuilderTests.py +++ b/src/engine/SCons/BuilderTests.py @@ -124,7 +124,7 @@ class Environment: def has_key(self, item): return item in self.d def keys(self): - return self.d.keys() + return list(self.d.keys()) def get(self, key, value=None): return self.d.get(key, value) def Override(self, overrides): @@ -135,7 +135,7 @@ class Environment: def _update(self, dict): self.d.update(dict) def items(self): - return self.d.items() + return list(self.d.items()) def sig_dict(self): d = {} for k,v in self.items(): d[k] = v diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index d9db852..7dc20dc 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -395,7 +395,7 @@ class SubstitutionEnvironment: # Freeze the keys of self._special_set in a list for use by # methods that need to check. (Empirically, list scanning has # gotten better than dict.has_key() in Python 2.5.) - self._special_set_keys = self._special_set.keys() + self._special_set_keys = list(self._special_set.keys()) def __cmp__(self, other): return cmp(self._dict, other._dict) @@ -446,7 +446,7 @@ class SubstitutionEnvironment: return self._dict.__contains__(key) def items(self): - return self._dict.items() + return list(self._dict.items()) def arg2nodes(self, args, node_factory=_null, lookup_list=_null, **kw): if node_factory is _null: @@ -984,9 +984,9 @@ class Base(SubstitutionEnvironment): variables = kw['options'] del kw['options'] self.Replace(**kw) - keys = kw.keys() + keys = list(kw.keys()) if variables: - keys = keys + variables.keys() + keys = keys + list(variables.keys()) variables.Update(self) save = {} @@ -2250,7 +2250,7 @@ class OverrideEnvironment(Base): return d def items(self): """Emulates the items() method of dictionaries.""" - return self.Dictionary().items() + return list(self.Dictionary().items()) # Overridden private construction environment methods. def _update(self, dict): diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 99b3d93..ddaa2ef 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -40,7 +40,7 @@ def diff_env(env1, env2): s1 = "env1 = {\n" s2 = "env2 = {\n" d = {} - for k in env1._dict.keys() + env2._dict.keys(): + for k in list(env1._dict.keys()) + list(env2._dict.keys()): d[k] = None for k in sorted(d.keys()): if k in env1: @@ -60,7 +60,7 @@ def diff_dict(d1, d2): s1 = "d1 = {\n" s2 = "d2 = {\n" d = {} - for k in d1.keys() + d2.keys(): + for k in list(d1.keys()) + list(d2.keys()): d[k] = None for k in sorted(d.keys()): if k in d1: @@ -250,7 +250,7 @@ class SubstitutionTestCase(unittest.TestCase): """Test the SubstitutionEnvironment items() method """ env = SubstitutionEnvironment(XXX = 'x', YYY = 'y') - items = env.items() + items = list(env.items()) assert items == [('XXX','x'), ('YYY','y')], items def test_arg2nodes(self): diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index b961092..3175328 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -1905,7 +1905,7 @@ class Dir(Base): in any way (or ignored, passing None is common). """ entries = self.entries - names = entries.keys() + names = list(entries.keys()) names.remove('.') names.remove('..') func(arg, self, names) diff --git a/src/engine/SCons/Scanner/Dir.py b/src/engine/SCons/Scanner/Dir.py index 3a0767a..f02904f 100644 --- a/src/engine/SCons/Scanner/Dir.py +++ b/src/engine/SCons/Scanner/Dir.py @@ -101,7 +101,7 @@ def scan_in_memory(node, env, path=()): # mixed Node types (Dirs and Files, for example) has a Dir as # the first entry. return [] - entry_list = sorted(filter(do_not_scan, entries.keys())) + entry_list = sorted(filter(do_not_scan, list(entries.keys()))) return [entries[n] for n in entry_list] # Local Variables: diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index 622f2a3..904d612 100644 --- a/src/engine/SCons/Scanner/LaTeX.py +++ b/src/engine/SCons/Scanner/LaTeX.py @@ -164,7 +164,7 @@ class LaTeX(SCons.Scanner.Base): 'bibliographystyle': 'BSTINPUTS', 'usepackage': 'TEXINPUTS', 'lstinputlisting': 'TEXINPUTS'} - env_variables = SCons.Util.unique(keyword_paths.values()) + env_variables = SCons.Util.unique(list(keyword_paths.values())) def __init__(self, name, suffixes, graphics_extensions, *args, **kw): diff --git a/src/engine/SCons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py index 922c221..a356308 100644 --- a/src/engine/SCons/Scanner/ScannerTests.py +++ b/src/engine/SCons/Scanner/ScannerTests.py @@ -244,7 +244,7 @@ class BaseTestCase(unittest.TestCase): dict = {} dict[s] = 777 i = hash(id(s)) - h = hash(dict.keys()[0]) + h = hash(list(dict.keys())[0]) self.failUnless(h == i, "hash Scanner base class expected %s, got %s" % (i, h)) diff --git a/src/engine/SCons/Scanner/__init__.py b/src/engine/SCons/Scanner/__init__.py index 3cfe4b7..dcee1f1 100644 --- a/src/engine/SCons/Scanner/__init__.py +++ b/src/engine/SCons/Scanner/__init__.py @@ -170,7 +170,7 @@ class Base: if skeys is _null: if SCons.Util.is_Dict(function): - skeys = function.keys() + skeys = list(function.keys()) else: skeys = [] self.skeys = skeys @@ -281,7 +281,7 @@ class Selector(Base): def __init__(self, dict, *args, **kw): Base.__init__(self, None, *args, **kw) self.dict = dict - self.skeys = dict.keys() + self.skeys = list(dict.keys()) def __call__(self, node, env, path = ()): return self.select(node)(node, env, path) diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index 246d4eb..7f78a71 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -604,7 +604,7 @@ def Parser(version): debug_options = ["count", "explain", "findlibs", "includes", "memoizer", "memory", "objects", "pdb", "presub", "stacktrace", - "time"] + deprecated_debug_options.keys() + "time"] + list(deprecated_debug_options.keys()) def opt_debug(option, opt, value, parser, debug_options=debug_options, diff --git a/src/engine/SCons/Tool/intelc.py b/src/engine/SCons/Tool/intelc.py index fffda70..9f782ee 100644 --- a/src/engine/SCons/Tool/intelc.py +++ b/src/engine/SCons/Tool/intelc.py @@ -69,7 +69,7 @@ def uniquify(s): u = {} for x in s: u[x] = 1 - return u.keys() + return list(u.keys()) def linux_ver_normalize(vstr): """Normalize a Linux compiler version number. @@ -118,7 +118,7 @@ def check_abi(abi): abi = valid_abis[abi] except KeyError: raise SCons.Errors.UserError("Intel compiler: Invalid ABI %s, valid values are %s"% \ - (abi, valid_abis.keys())) + (abi, list(valid_abis.keys()))) return abi def vercmp(a, b): diff --git a/src/engine/SCons/Tool/javac.py b/src/engine/SCons/Tool/javac.py index 6cc0779..6692a97 100644 --- a/src/engine/SCons/Tool/javac.py +++ b/src/engine/SCons/Tool/javac.py @@ -85,7 +85,7 @@ def emit_java_classes(target, source, env): find_java_files(result, dirpath, filenames) entry.walk(find_java_files, result) - slist.extend(result.keys()) + slist.extend(list(result.keys())) else: raise SCons.Errors.UserError("Java source must be File or Dir, not '%s'" % entry.__class__) diff --git a/src/engine/SCons/Tool/packaging/rpm.py b/src/engine/SCons/Tool/packaging/rpm.py index 7480542..d5c1c71 100644 --- a/src/engine/SCons/Tool/packaging/rpm.py +++ b/src/engine/SCons/Tool/packaging/rpm.py @@ -333,7 +333,7 @@ class SimpleTagCompiler: def strip_country_code(tag): return tag[:-2] - replacements = self.tagset.items() + replacements = list(self.tagset.items()) str = "" #domestic = [ (k,v) for k,v in replacements if not is_international(k) ] diff --git a/src/engine/SCons/Tool/textfile.py b/src/engine/SCons/Tool/textfile.py index 5733014..8dc8f4b 100644 --- a/src/engine/SCons/Tool/textfile.py +++ b/src/engine/SCons/Tool/textfile.py @@ -89,7 +89,7 @@ def _action(target, source, env): else: d = env['SUBST_DICT'] if is_Dict(d): - d = d.items() + d = list(d.items()) elif is_Sequence(d): pass else: diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 1167f3a..d11d779 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -1085,7 +1085,7 @@ class OrderedDict(UserDict): return dict def items(self): - return list(zip(self._keys, self.values())) + return list(zip(self._keys, list(self.values()))) def keys(self): return self._keys[:] @@ -1212,7 +1212,7 @@ def unique(s): except TypeError: pass # move on to the next method else: - return u.keys() + return list(u.keys()) del u # We can't hash all the elements. Second fastest is to sort, diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py index 4fa0879..6df1571 100644 --- a/src/engine/SCons/Variables/VariablesTests.py +++ b/src/engine/SCons/Variables/VariablesTests.py @@ -70,7 +70,7 @@ class VariablesTestCase(unittest.TestCase): "42", check, lambda x: int(x) + 12) - keys = opts.keys() + keys = list(opts.keys()) assert keys == ['VAR1', 'VAR2'], keys def test_Add(self): diff --git a/src/engine/SCons/compat/_scons_sets.py b/src/engine/SCons/compat/_scons_sets.py index 54450b3..0fde994 100644 --- a/src/engine/SCons/compat/_scons_sets.py +++ b/src/engine/SCons/compat/_scons_sets.py @@ -90,7 +90,7 @@ class BaseSet(object): __str__ = __repr__ def _repr(self, sort_them=False): - elements = self._data.keys() + elements = list(self._data.keys()) if sort_them: elements.sort() return '%s(%r)' % (self.__class__.__name__, elements) diff --git a/src/engine/SCons/dblite.py b/src/engine/SCons/dblite.py index 71aaff3..4f19ce6 100644 --- a/src/engine/SCons/dblite.py +++ b/src/engine/SCons/dblite.py @@ -151,7 +151,7 @@ class dblite: self._needs_sync = 0001 def keys(self): - return self._dict.keys() + return list(self._dict.keys()) def has_key(self, key): return key in self._dict |