| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
dropped the use of stat.st_mtime, which returns a float,
didn't remeber to change the annotation back to int.
Added a couple of other return-type annotations.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Part of the change to restore mtime checking of symlinked sources
flipped from statobj[stat.ST_MTIME] to statobj.st_mtime. These return
"the same thing" but the latter returns a float instead of an int.
This had some unexpected side effects - like failing a half-dozen
testcases. In the interest of moving the bugfix along, revert this
piece and deal with it some other time.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base filesystem node class has getmtime() and getsize() functions.
Those were changed in an early commit to use the lstat() method if
the node represented a symbolic link. However, we actually want the
information of the file the symlink points to, or we can't detect
changes to the mtime or size of the underlying file, and miss rebuilds
if content-timestamp is used.
Added a testcase which shows the failure to rebuild from the symlinked
source.
Fixes #3880
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
| |
- super used where direct call to superclass existed
- convert a few older-style super() (two-argument) uses
- in a few places, where there was an intersection with a super change,
variables that override a builtin (e.g. "dict") were renamed.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Refactored code to match PR requirements
Changed result ==... result== to result in(...)
Updated the man page to reference the defaulting behavior for FIPS machines.
Updated a typo and design of change in the CHANGES.txt file
Made an ugly bit of code in Util.py that fixes it so python3.9 has MD5 support enabled in FIPS mode.
The code is much more ugly than before, with the tradeoff being it's testable and usable.
In python >= 3.9, SCons will now always default to MD5.
Next commit will work on getting the tests to auto-skip the md5-required steps on versions <= python 3.8.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Still failing on:
SCons/UtilTests.py
test/Configure/ConfigureDryRunError.py
test/Configure/implicit-cache.py
test/Configure/option--config.py
test/option/hash-format.py
test/option/option-n.py
test/question/Configure.py
These tests all have hardcoded md5 sums or use md5 directly
Next commit should fix it so the md5-specific tests are skipped if fips mode detected.
Also will figure out a way around the hardcoded m5sums.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An earlier change added "-> str" to get_max_drift_csig's function
sig. However, it can also return None, so the proper annotation
is "-> Optional[str]".
Also sorted the file inclusions.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Value defined this method, but the __init__ methos also
does "self.changed_since_last_build = 6" to set an index into
the decider map, meaning no instance of Value will ever see
that function. The map index will cause picking the "real" function,
changed_since_last_build_python(), which has identical impl to the now
removed method.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unfortunately, this made for more reformatting - sider complains
in some of these about indent not being a multiple of four because
one line of a block was touched, to eliminate had to reindent the whole
block, including all the lines not touched by the original commit.
Used a tool...
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Removed a number of imports reported as unused.
* Reorganize imports in a few places.
* Checker reported warnings problems ("Instantiating an exception,
but not raising it, has no effect"): serveral tool modules instantiated
a warning class thinking (?) it would issue the warning; changed these to
the standard use - calling the warn() function with the warnclass as an arg.
* Tool modules that were touched had the copyright header munging applied.
* Removed irritating "####" lines from gettext and msgfmt tools.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove obsolete __getslice__ and __setslice_ definitions
add Node.fs.scandir to call new (Py3.5) os.scandir
Node.fs.makedirs now passes the exist_ok flag
Cachedir creation now uses this fs.makedirs with exist_ok=True
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |\
| | |
| | | |
Teach the Python scanner to find generated files and directories
|
| | |\ |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
to NINJA_STATE.add_build(). Instead of only ones which weren't ninja files, nor conftest files
|
|/ / / |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
repeating it. Also use False return value to indicate false, instead of 0
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|\ \ \
| |/ / |
|
| |\ \
| | | |
| | | | |
Fix value node when used as part of a build on python3
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Fix invalid cache state when using SCons interactive mode
|
| | | | | |
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
SCons.Node.Node.clear() had code to clear cache-related state but it was only
clearing a non-unused variable _calculated_sig. Fix this by clearing the three
variables now used in practice by get_cachedir_bsig() and the functions that it
calls: `cachedir_csig`, `cachesig`, and `contentsig`. Also reset `cached` to 0
because the task scheduler depends on it but doesn't reset it.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
belt-and-suspenders: earlier check for file size should already
have filtered out the "not rexists" case, but just to be sure,
return NOFILE marker here as well.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #3014
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ \ \ \
| |/ / / |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A checker flagged the zip_longest/izip_longest workaround,
that's no longer needed. Similar for the shutil.SameFileError
piece, that's standard since 3.4 and doesn't need checking for.
The checker also complained about
return contents.decode('utf-8', error='backslashreplace')
the correct kward is errors, not error - corrected.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change exception type in a a couple of try block to what could
go wrong, Py3 would not raise UniCodeDecodeError for these cases
One try-import of StringIO module
sconsign does not need a decode that was claimed as compat hack
Remove some sys.version_info checks
Use more modern way to get Python details in test frawmework
AddMethod updated and RenameFunction dropped - it had become a one-liner
and had no clients other than AddMethod (never exposed as public)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Touches the first and second levels of SCons (except SCons.Tool),
not tests or docs which remain TODO.
Make sure docstring is first non-comment content, eliminate cases where
docstring is set elsewhere but assigns to __doc__ - this approach of
course worked inside Python, but confuses various tools.
Some module-level docstrings modified a bit, in particular
the convention of having the name of the module as the first line
is dropped, replaced by a summary description going there instead -
this improves the look in the API Docs, which otherwise display
something like:
SCons.Foo - SCons.Foo
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Eliminate unneeded imports, and a few unneeded statements -
usually "pass" where it is not syntactically needed.
A couple of import try blocks were eliminated or changed
when they're "cannot happen" due to current floor Python version.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
This change adds support for a new --hash-format parameter that can be used to
override the default hash format used by SCons. The default remains MD5, but
this allows consumers to opt into SHA1, SHA256, or any other hash algorithm
offered by their implementation of hashlib.
|
| |
| |
| |
| | |
Do the "* 1024" when setting File.md5_chunksize, not when using it later.
|
| |
| |
| |
| | |
I had forgotten that [ci skip] will cancel running tests...
|
| |
| |
| |
| | |
Try to clarify a few parts of the working of the test through comments.
|
| | |
|
| |
| |
| |
| |
| |
| | |
md5_chunksize is documented to be in kilobytes, but this function was using
it as though it is in bytes. This change fixes that, adding a test to confirm
the correct behavior for a few different cases.
|
| | |
|