-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize stat usage #4627
base: master
Are you sure you want to change the base?
Modernize stat usage #4627
Conversation
Hmmm, problems went undetected because my dev machine wasn't reporting results properly due to previous virtualenv damage I thought I'd finished repairing. Will sort out shortly. |
Ah... affects sconsign - |
89f40b5
to
68e41a9
Compare
Since Python 2.2, the object returned by an os.stat() call presents attributes matching the 10-tuple of stat values. Use these instead of indexing into the tuple. As usual for non-removed tests, minor tweaks made if needed - copyright header and DefautlEnvironment() call for performance. Signed-off-by: Mats Wichmann <[email protected]>
If a stat_result object's st_*time attributes are used, a float is returned instead of an int. Adjust sconsign test regexes to optionally accept a .digits tail of the number. Confirmed this works for both indexed attributes (which return an int) and named attributes (float). Signed-off-by: Mats Wichmann <[email protected]>
68e41a9
to
162cdcc
Compare
@mwichmann I merged from main with the intent to clear up the failing ninja tests and get an all pass on the CI tests. |
Since Python 2.2, the object returned by an
os.stat()
call presents attributes matching the 10-tuple ofstat
values. Use these instead of indexing into the tuple (which is now considered "backwards-compatibility" mode).As usual for non-removed tests, minor tweaks made if needed - copyright header and
DefautlEnvironment()
call for performance.This change has no visibility into docs.
Contributor Checklist:
CHANGES.txt
andRELEASE.txt
(and read theREADME.rst
).