summaryrefslogtreecommitdiffstats
path: root/SCons/Executor.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-05-13 17:08:23 (GMT)
committerMats Wichmann <mats@linux.com>2020-05-13 17:10:42 (GMT)
commite4adb7000dd9cf3688771fd32d0bf52df4f9d58e (patch)
tree8826e5d1f1410c749e68f813f2b842c9c14c8820 /SCons/Executor.py
parent4795a9988303cabc0abf774f6f4f77bf2519a5f8 (diff)
downloadSCons-e4adb7000dd9cf3688771fd32d0bf52df4f9d58e.zip
SCons-e4adb7000dd9cf3688771fd32d0bf52df4f9d58e.tar.gz
SCons-e4adb7000dd9cf3688771fd32d0bf52df4f9d58e.tar.bz2
Eliminate Py2-compat with_metaclass jig
SCons has used a wrapper trick because the way a class declares it uses a metaclass differs between Py2 and Py3. Drop this usage and list the metaclass the Py3 way. Along the way, stop reusing the type class name as a parameter, as it might be confusing (SCons and packaging). Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Executor.py')
-rw-r--r--SCons/Executor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/SCons/Executor.py b/SCons/Executor.py
index fb2224f..e012ab6 100644
--- a/SCons/Executor.py
+++ b/SCons/Executor.py
@@ -35,7 +35,7 @@ from SCons.Debug import logInstanceCreation
import SCons.Errors
import SCons.Memoize
import SCons.Util
-from SCons.compat import with_metaclass, NoSlotsPyPy
+from SCons.compat import NoSlotsPyPy
class Batch(object):
"""Remembers exact association between targets
@@ -154,7 +154,7 @@ _execute_str_map = {0 : execute_null_str,
1 : execute_actions_str}
-class Executor(object, with_metaclass(NoSlotsPyPy)):
+class Executor(object, metaclass=NoSlotsPyPy):
"""A class for controlling instances of executing an action.
This largely exists to hold a single association of an action,
@@ -587,7 +587,7 @@ def get_NullEnvironment():
nullenv = NullEnvironment()
return nullenv
-class Null(object, with_metaclass(NoSlotsPyPy)):
+class Null(object, metaclass=NoSlotsPyPy):
"""A null Executor, with a null build Environment, that does
nothing when the rest of the methods call it.