| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
dropping < py 3.5
|
|
|
|
|
|
|
|
| |
These are of the kind that would not be fixed by a code reformat
(Black). These should all be trivial. They're nearly all in unit tests
(all but two), since I haven't cleaned up as many there in the past.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Except for Platform/win32.py, the engine code no longer
called insecure/deprecated tempfile.mktemp. That location
is now also changed to use better methods. A couple of
vestiges of old ways (like in comments) cleaned out.
A couple of unit tests also converted - these don't have
any impact on the scons engine, of course.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop unneeded parens.
Drop trailing semicolons.
Triple double-quote docstrings.
Regexes drop unneeded escapes.
Spaces around parens, braces: remove/add.
Some one-tuples get their missing closing comma.
A couple of sets use set init syntax {foo} instead of set([iter]) now.
And a fiddle in Node to reduce lookup time on md5 signature functions
(came about because of a line-too-long issue, initially)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ |
|
| |
| |
| |
| | |
This hopefully will fix one unit test that validates that it's a class.
|
| |
| |
| |
| |
| |
| |
| | |
Python 2 enables handle inheritance by default for child processes. It wasn't
until Python 3.4 that it was disabled. This causes problems because if a Python
action is writing to a file and a child process is spawned at that exact
moment, builds fail because of sharing issues.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* context managers on file r/w + use shutil.copy where it makes sense.
* lxml wants (demands?) that xml files be processed as bytes
* for the phase where we gen the entity files, read as text anyway
* Need to solve a problem where the generated xml is putting the \n in
literally, not evaluating it.
* Fix some examples broken for py3
* Fix more octal constant instances
* Cleanups suggested by PyCharm: staticmethods, two blanks
before class definition, others.
This addresses issues called out in #3300, but is not a complete
solution because the actual doc build step still fails with the
epydoc failures (which aren't directly because of Py3; epydoc
build doesn't work any better on my system with Py3, even with
the forked version with patches).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
File closes in msvs tool
Context manager in rpm tool
Dummy compiler, assembler scripts can be called in unexpected
ways (namely by gcc tool init), which passes --version flag.
don't take exception on the getopt call.
Try again to undo my breakage of _subproc, which was failing on Win+PY27
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
On a linux host (missing some things that may be on the Travis CI
setup), Py3.8a3 now shows 19 fails, 1048 pass, with 84 Warning: messages.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|\
| |
| |
| | |
into fix_3350_mslink_tempfile_join_char
|
| | |
|
| | |
|
|\ \
| |/
|/|
| | |
fix_3350_mslink_tempfile_join_char
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Assorted fixups: exception types, redefined functions, globals, etc.
Some old code removed to resolve issues (hashlib is always present on
modern Pythons; no longer need the code for 2.5-and-earlier optparse).
cmp is not a builtin function in Py3, drop one (unused) use; replace one.
Fix another instance of renaming to SConsEnvironmentError.
TODO flagged some instances of doing a raise without argument but not
inside a try block - this is not considered legal, since raise
with no argument is for re-raising an exception, but I don't know
exactly how to resolve this in these cases. Also flagged an instance
of raising an int instead of an exception class. We can either leave
these as markers or update the PR.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
| |
item placed into a TEMPFILE. Previously hardcoded as a bytearray space, now it is overridden by msvc and mslink tools
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Add windows default paths to lex tool
|
| |
| |
| |
| | |
nounistd on windows. also more testing
|
|/
|
|
|
|
|
| |
TEMPFILEEXTENSION in class TempFileMunge docstring should be
TEMPFILESUFFIX to match the code
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
Testing "if not prefix" would return false if an empty string
is passed, but that setting should be valid.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
Per review comments, subst either return the right thing or None,
use this are the way to test for setting default instead of has_key.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
All the other file extension variables end in SUFFIX, so change
this new one to match for consistency. Added doc entry.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the patch (adjusted) from issue #2341: instead of hardcoding
the filename extenstion for the tempfile to help with linking
on Windows targets, allow some variability.
Current marked WIP because there are some other comments in
the issue tracker that can maybe be flushed out by submitting
this PR, and there are no tests (should presumably go in
test/TEMPFILEPREFIX.py, or a new test TEMPFILEEXTENSION.py)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
| |
Py 3.4 and above do this by default
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by PyCharm. Includes three "real" changes:
1. src/engine/SCons/Node/__init__.py has a print statement in a function
which references 'self', but there is no 'self' defined (it is not
a method in a class). Guessing it should have been 'node'.
2. src/engine/SCons/Environment.py makes a call using 'kwbd' which is not
defined, looks like a copy-paste error and should be 'bd'.
3. src/engine/SCons/Tool/JavaCommon.py splits 'file', which is not
defined, was evidently supposed to be 'fn'.
These should be double-checked.
The rest are purely syntax: whitespace, dropping trailing semicolons,
using "is" to test for None, simplifying comparisons, normalizing
docstring commenting ("always triple double quotes"), unneeded
backslashes.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
Code inspection reveals this problem (4 instances):
Class 'OSError' does not define '__getitem__' so the [] operator cannot be used on its instances.
Use e.errno for e[0] and e.strerror for e[1].
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
A number of places "append to the beginning", a better
word to use here is "prepend". This is a documentation
issue only, no executable statements are affected.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
created from paths in /etc/paths and /etc/paths.d/* will be appended to the Environment's PATH. This allows tests (and builds) to work on (at least) on mac systems using macports
|
| |
|
| |
|
| |
|
|
|
|
| |
both py3 and py2
|
|\
| |
| |
| | |
python3 support for win32.py
|