Skip to content

Commit 603725f

Browse files
authored
Merge pull request SCons#4464 from acmorrow/flip-sched-default
Make the NewParallel scheduler the default, even for -j1 builds
2 parents c452f92 + 36b6ab7 commit 603725f

File tree

12 files changed

+518
-516
lines changed

12 files changed

+518
-516
lines changed

CHANGES.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
5656
From Prabhu S. Khalsa:
5757
- Fix typo in user documentation (issue #4458)
5858

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+
5969
From Mats Wichmann:
6070
- Add support for Python 3.13 (as of alpha 2). So far only affects
6171
expected bytecodes in ActionTests.py.
@@ -7950,4 +7960,3 @@ A brief overview of important functionality available in release 0.01:
79507960
- Linux packages available in RPM and Debian format.
79517961

79527962
- Windows installer available.
7953-

RELEASE.txt

Lines changed: 1 addition & 0 deletions
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
-----

SCons/SConf.py

Lines changed: 2 additions & 3 deletions
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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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):

0 commit comments

Comments
 (0)