Skip to content

Commit b3a39a3

Browse files
authored
Merge branch 'master' into maint/sconsign
2 parents 4fc13f6 + 2b73157 commit b3a39a3

22 files changed

+885
-662
lines changed

CHANGES.txt

+22-1
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,32 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
5353
- Fix of the --debug=sconscript option to return exist statements when using return
5454
statement with stop flag enabled
5555

56+
From Prabhu S. Khalsa:
57+
- Fix typo in user documentation (issue #4458)
58+
59+
From Andrew Morrow:
60+
- The NewParallel scheduler is now the default, the `tm_v2` flag is removed,
61+
and the old scheduler is opt-in under `--experimental=legacy_sched`. Additionally,
62+
the new scheduler is now used for -j1 builds as well.
63+
- A python interpreter with support for the `threading` package is now required,
64+
and this is enforced on startup. SCons currently sets its minimum supported
65+
Python to 3.6, and it was not until Python 3.7 where `threading` became
66+
default supported. In practice, we expect most real world Python 3.6 deployments
67+
will have `threading` support enabled, so this will not be an issue.
68+
- CacheDir writes no longer happen within the taskmaster critical section,
69+
and therefore can run in parallel with both other CacheDir writes and the
70+
taskmaster DAG walk.
71+
5672
From Mats Wichmann:
5773
- Add support for Python 3.13 (as of alpha 2). So far only affects
5874
expected bytecodes in ActionTests.py.
5975
- sconsign cleanup - remove some dead code, minor manpage tweaks.
76+
- Be more cautious about encodings fetching command output on Windows.
77+
Problem occurs in piped-spawn scenario, used by Configure tests.
78+
Fixes #3529.
79+
- Clarify/fix documentation of Scanners in User Guide and Manpage.
80+
Fixes #4468.
81+
- Add Pseudo() to global functions, had been omitted. Fixes #4474.
6082

6183

6284
RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700
@@ -7948,4 +7970,3 @@ A brief overview of important functionality available in release 0.01:
79487970
- Linux packages available in RPM and Debian format.
79497971

79507972
- Windows installer available.
7951-

CONTRIBUTING.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,13 +297,13 @@ You may specifically list one or more tests to be run::
297297

298298
$ python runtest.py SCons/BuilderTests.py
299299

300-
$ python runtest.py test/option-j.py test/Program.py
300+
$ python runtest.py test/option/option-j.py test/Program.py
301301

302302
You also use the ``-f`` option to execute just the tests listed in a specified
303303
text file::
304304

305305
$ cat testlist.txt
306-
test/option-j.py
306+
test/option/option-j.py
307307
test/Program.py
308308
$ python runtest.py -f testlist.txt
309309

RELEASE.txt

+16-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
3333
that the generated function argument list matches the function's
3434
prototype when including a header file. Fixes GH Issue #4320
3535
- Now supports pre-release Python 3.13
36+
- Support for Python versions without support for the `threading` package has been removed
3637

3738
FIXES
3839
-----
@@ -49,12 +50,24 @@ FIXES
4950
- MSVS: Fix the msvs project generation test scripts so that "false positive" tests
5051
results are not possible when the initial build is successful and the command-line
5152
build of the project file fails.
53+
- On Windows platform, when collecting command output (Configure checks),
54+
make sure decoding of bytes doesn't fail.
55+
- Documentation indicated that both Pseudo() and env.Pseudo() were usable,
56+
but Pseudo() did not work; is now enabled.
5257

5358
IMPROVEMENTS
5459
------------
5560

5661
- Use of NotImplemented instead of NotImplementedError for special methods
5762
of _ListVariable class
63+
- The NewParallel scheduler is now the default, the `tm_v2` flag is removed,
64+
and the old scheduler is opt-in under `--experimental=legacy_sched`. Additionally,
65+
the new scheduler is now used for -j1 builds as well.
66+
NOTE: This should significantly improve SCons performance for larger parallel builds
67+
(Larger -j values)
68+
- CacheDir writes no longer happen within the taskmaster critical section, and therefore
69+
can run in parallel with both other CacheDir writes and the taskmaster DAG walk.
70+
5871

5972
PACKAGING
6073
---------
@@ -64,9 +77,9 @@ PACKAGING
6477
DOCUMENTATION
6578
-------------
6679

67-
- List any significant changes to the documentation (not individual
68-
typo fixes, even if they're mentioned in src/CHANGES.txt to give
69-
the contributor credit)
80+
- Fixed the Scanner examples in the User Guide to be runnable and added
81+
some more explantion. Clarified discussion of the scanner function in
82+
the Scanner Objects section of the manpage.
7083

7184
DEVELOPMENT
7285
-----------

SCons/Platform/win32.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,18 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
165165
# and do clean up stuff
166166
if stdout is not None and not stdoutRedirected:
167167
try:
168-
with open(tmpFileStdoutName) as tmpFileStdout:
169-
stdout.write(tmpFileStdout.read())
168+
with open(tmpFileStdoutName, "rb") as tmpFileStdout:
169+
output = tmpFileStdout.read()
170+
stdout.write(output.decode(stdout.encoding, "replace"))
170171
os.remove(tmpFileStdoutName)
171172
except OSError:
172173
pass
173174

174175
if stderr is not None and not stderrRedirected:
175176
try:
176-
with open(tmpFileStderrName) as tmpFileStderr:
177-
stderr.write(tmpFileStderr.read())
177+
with open(tmpFileStderrName, "rb") as tmpFileStderr:
178+
errors = tmpFileStderr.read()
179+
stderr.write(errors.decode(stderr.encoding, "replace"))
178180
os.remove(tmpFileStderrName)
179181
except OSError:
180182
pass

SCons/SConf.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,9 @@ def display_cached_string(self, bi) -> None:
251251
def failed(self):
252252
# check, if the reason was a ConfigureDryRunError or a
253253
# ConfigureCacheError and if yes, reraise the exception
254-
exc_type = self.exc_info()[0]
254+
exc_type, exc, _ = self.exc_info()
255255
if issubclass(exc_type, SConfError):
256-
# TODO pylint E0704: bare raise not inside except
257-
raise
256+
raise exc
258257
elif issubclass(exc_type, SCons.Errors.BuildError):
259258
# we ignore Build Errors (occurs, when a test doesn't pass)
260259
# Clear the exception to prevent the contained traceback

SCons/Script/Main.py

+7
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,13 @@ def main() -> None:
14471447
sys.stderr.write("scons: *** Minimum Python version is %d.%d.%d\n" %minimum_python_version)
14481448
sys.exit(1)
14491449

1450+
try:
1451+
import threading
1452+
except ImportError:
1453+
msg = "scons: *** SCons version %s requires a Python interpreter with support for the `threading` package"
1454+
sys.stderr.write(msg % SConsVersion)
1455+
sys.exit(1)
1456+
14501457
parts = ["SCons by Steven Knight et al.:\n"]
14511458
try:
14521459
import SCons

SCons/Script/SConsOptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
diskcheck_all = SCons.Node.FS.diskcheck_types()
4242

43-
experimental_features = {'warp_speed', 'transporter', 'ninja', 'tm_v2'}
43+
experimental_features = {'warp_speed', 'transporter', 'ninja', 'legacy_sched'}
4444

4545

4646
def diskcheck_convert(value):

SCons/Script/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ def Variables(files=None, args=ARGUMENTS):
343343
'Local',
344344
'ParseDepends',
345345
'Precious',
346+
'Pseudo',
346347
'PyPackageDir',
347348
'Repository',
348349
'Requires',

0 commit comments

Comments
 (0)