| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
These two have been deprecated since 2010 (about SCons 2.0), commit
935e6985. Methods are removed, setoption for setting them removed, doc is
removed, tests are migrated to test/Removed/*/Old with a sconstest.skip
file so they don't run, and two new tests are added to confirm that
using the functions and setoptions generate exceptions.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
| |
"action_timestamps"
As per PR review
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These options have been deprecated since 2007. They were originally
announced to be disabled in SCons 2.0.0, but that didn't happen.
Left the deprecated-debug-options behavior is in, but the dictionary of
such options is now empty, and there's a new dict of removed options,
and presence in that dict raises an exception.
The four tests that were in test/Deprecated move to a new directory
test/Removed and are simplified just to make sure invocation errors
scons out. (git interprets most of these as remove/add for some reason)
These appear to have been already removed from docs, so no doc impact.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consistently use "not is" and "not in", many instances used
the form "not x is y" instead, which pylint objected to.
A couple of bare except clauses got a qualifier.
Files otherwise touched had trailing whitespace cleaned up as well.
These are all things that sider would complain about if a change
happened nearby, so this is pre-emptive.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most recent Python (3.8 alpha) spews warnings aplenty about two
subjects: unclosed files and strings which look like they have embedded
escapes that Python does not recognize. The latter are usually
regexes, and it provides a reminder that regular expressions should
normally be specified as raw strings, so Python does not attempt to
interpret them. Irritating is that even docstrings are flagged, it's
not obvious what the right answer is for a docstring which contains,
say, a Windows-style path with backslashes.
This converts a bunch of opens that are not closed into context
manager usage and regex patterns into raw strings.
This eliminate about 4000 warnings spewed by Py3.8 (9200 remain).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When scons exits, it wants to take the opportunity to print any
diagnostics and statistics that may have been requested, so the
main routine traps the various ways it can quit. If code somewhere
calls sys.exit(), that generates a SystemExit exception.
The handling of that has not been quite correct - it simply takes
the exception instance, saves it, and later quits with sys.exit(saved).
This seemingly works fine for all other tested versions of Python,
but has interesting side effects with PyPy3.
Per the Python documentation:
If the value is an integer, it specifies the system exit status
(passed to C’s exit() function); if it is None, the exit status
is zero; if it has another type (such as a string), the object’s
value is printed and the exit status is one.
And in fact, PyPy3 does this: if the original call to sys.exit
took a value of 2, then the SystemExit exception triggers with
a class instance which does have an exit code of 2, which turns
up if you take the string repr of the instance, but when passed
to the final sys.exit, as it's not an integer it *prints* the 2,
and returns with an exit code of 1, just as in the documentation snip.
Not really sure if PyPy3 is wrong here, or the other Pythons are
letting something slide, but it's an easy fix: save off the code
stored in the exception instance for later use as the exit code,
instead of using the instance itself for that.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
An earlier change updated some examples, this makes some tweaks to
the wording as well for Default, DEFAULT_TARGETS, etc. to clarify.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Existing Textfile and Substfile builders (and tool textfile)
are added to the defaults, so they do not need to be explicitly
specified in the tools list. The documentation sort of
implies these are default builders (by not saying anything)
so no doc change is made.
Fixes issue #3147
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Also handle_missing_SConscript(), internal interface added by
this patch series.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testcases added to confirm the behavior of: first attempt
to call a non-existent script gives a deprecation warning,
additional ones give plain warning; True/False values for
must_warn behave as expected; if scons default is changed
to exception the call fails but if must_warn=False it
still works.
Tweaked the logic to actually get that last bit to work.
Also minor doc update.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SConscript call now takes an optional must_exist flag, which defaults
to False for compatiility with current behavior. If True, an exception
is raised if the file is missing. To improve readability, the
decision is moved off to a new function rather than being inline in
_SConscript.
A global setting to control the overall behavior is also added.
A deprecation warning is added for the current behavior, which is
printed only once.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\
| |
| | |
Replace usage of unittest.TestSuite with unittest.main()
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
from documents. Also remove associated tests.
|
|
|
|
| |
on command line
|
|
|
|
|
|
|
|
|
| |
This fixes a regression introduced in scons-3.0.0, where
SConscripts containing python 2 print statements would cause
syntax errors even when executing scons with python 2.7.
This ensures backward compatibility, allowing users to build
legacy code with scons-3.0.0 without having to patch it.
|
| |
|
|
|
|
| |
could not be passed to SetOption
|
|
|
|
| |
could not be passed to SetOption
|
| |
|
| |
|
|
|
|
| |
test/packaging/rpm/internationalization.py was failing because an open in py3 without specified encoding with LANG=C was trying to decode the file as ascii and it contained unicode characters and was failing. So far I haven't found any tests failing from this change
|
| |
|
|
|
|
| |
threads
|
| |
|
| |
|
|\
| |
| |
| | |
exec() must take a string, not a file object.
|
| | |
|
|/ |
|
|\ |
|
| | |
|
|/
|
|
| |
optparse.Values is a classic class deepcopy works different than in py3 when it's a modern class (no more classic classes). The net of which is deepcopy will look for various methods to copy the objects state, __deepcopy__, something else, then __setstate__. When it checks for __setstate__ it trys on a blank SConsValue instance which doesn't have __defaults__ and so SConsValues ends up throwing a KeyError exception. deepcopy is looking for an AttributeError exception to know that __setstate__ is not available. Once it receives the appropriate exception, it then properly copies the object and scons interactive mode works with py3
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|