diff options
author | Mats Wichmann <mats@linux.com> | 2021-01-12 14:48:33 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-01-12 14:48:33 (GMT) |
commit | d3c6a4a199beff6e4d28725da9c0b0a052349359 (patch) | |
tree | a2945477ad09a708357c63137c015d667c1c93f2 /SCons/Node | |
parent | ce9c4fd98f8201ad9be1a1f4e99950e6070a51b1 (diff) | |
download | SCons-d3c6a4a199beff6e4d28725da9c0b0a052349359.zip SCons-d3c6a4a199beff6e4d28725da9c0b0a052349359.tar.gz SCons-d3c6a4a199beff6e4d28725da9c0b0a052349359.tar.bz2 |
Work around Py3.10 optimizing out a builder test
BuilderBase class traps __bool__ call and raises InternalError.
On Py 3.10a the unit test for this got optimized out, avoid this.
While we're at it, eliminate remaining references to __nonzero__,
which was a Py2-ism, replaced by __bool__.
Closes #3860
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Node')
-rw-r--r-- | SCons/Node/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SCons/Node/__init__.py b/SCons/Node/__init__.py index 3685af3..491c6b8 100644 --- a/SCons/Node/__init__.py +++ b/SCons/Node/__init__.py @@ -886,7 +886,7 @@ class Node(object, metaclass=NoSlotsPyPy): than simply examining the builder attribute directly ("if node.builder: ..."). When the builder attribute is examined directly, it ends up calling __getattr__ for both the __len__ - and __nonzero__ attributes on instances of our Builder Proxy + and __bool__ attributes on instances of our Builder Proxy class(es), generating a bazillion extra calls and slowing things down immensely. """ |