diff options
author | Mats Wichmann <mats@linux.com> | 2019-03-11 17:03:29 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2019-03-30 13:24:51 (GMT) |
commit | 97c7246f5efb311b007d7aa6b585aa6b47a17230 (patch) | |
tree | f9136f64653812657d161949a205fcec7dc1bf7c /test/option/debug-time.py | |
parent | a06f5a80a882e4e2e3937b375c4096605ae251d8 (diff) | |
download | SCons-97c7246f5efb311b007d7aa6b585aa6b47a17230.zip SCons-97c7246f5efb311b007d7aa6b585aa6b47a17230.tar.gz SCons-97c7246f5efb311b007d7aa6b585aa6b47a17230.tar.bz2 |
[WIP] [PY 3.8] fix more warnings
Several locations with simple usage of deprecated "imp" module
changed to use "importlib". These match with work in #3159,
but this is not a complete implementation of #3159.
More regex patterns are changed to be raw strings.
Some strings which did not seem appropriate to change to raw
strings (e.g. contain embedded tabs, which Python should honor)
had backslashes escaped to avoid accidental Python interpretation.
Example:
'\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />\n'
Python 3.8 was Warning \M was an unknown escape.
More open().write(), open().read() style usage changed to use
context managers so the file is closed.
WIP part: even with Python 3.7, the tests which call sconsign.py
fail; oddly they do not fail without the patch to compat.py.
sconsign.py does an import using imp module (which is what
generates the errors) so needs to be updated anyway. It does not
quite fit the "simple usage" pattern - can't do a simple relative
import since sconsign is normally located elsewhere in the tree than
the main scons code body.
With this version of the patch, 700 tests now pass with 3.8, and
Warning messages reduced to 2800 (current master has 200 pass,
9000 warns)
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/option/debug-time.py')
0 files changed, 0 insertions, 0 deletions