Skip to content

Commit 7877823

Browse files
authored
Merge pull request #4826 from Repiteo/deprecate-python
Deprecate Python 3.7 & 3.8 support
2 parents 8722f6e + 431d2b3 commit 7877823

File tree

12 files changed

+46
-43
lines changed

12 files changed

+46
-43
lines changed

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ NOTE: The 4.0.0 release of SCons dropped Python 2.7 support. Use 3.1.2 if
88
Python 2.7 support is required (but note old SCons releases are unsupported).
99
NOTE: Since SCons 4.3.0, Python 3.6.0 or above is required.
1010
NOTE: Since SCons 4.9.0, Python 3.7.0 or above is required.
11-
11+
NOTE: The last release to support Python 3.7 or Python 3.8 is NEXT_RELEASE.
1212

1313
RELEASE VERSION/DATE TO BE FILLED IN LATER
1414

@@ -26,6 +26,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
2626
- Purge vim/emac local variable bloat.
2727
- Implement type hints for Node subclasses.
2828
- Ruff: Handle F401 exclusions more granularly, remove per-file exclusions.
29+
- Deprecated Python 3.7 & 3.8 support.
2930

3031
From William Deegan:
3132
- Fix SCons Docbook schema to work with lxml > 5

README-SF.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Execution Requirements
5050
Running SCons requires Python 3.7 or higher. There should be no other
5151
dependencies or requirements to run standard SCons.
5252

53+
The last release to support Python 3.7 or Python 3.8 is NEXT_RELEASE.
5354
The last release to support Python 3.6 was 4.8.1.
5455
The last release to support Python 3.5 was 4.2.0.
5556

README-local

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ EXECUTION REQUIREMENTS
4646
Running SCons requires Python 3.7 or higher. There should be no other
4747
dependencies or requirements to run standard SCons.
4848

49+
The last release to support Python 3.7 or Python 3.8 is NEXT_RELEASE.
4950
The last release to support Python 3.6 was 4.8.1.
5051
The last release to support Python 3.5 was 4.2.0.
5152

53+
5254
The default SCons configuration assumes use of the Microsoft Visual C++
5355
compiler suite on WIN32 systems (either through the Visual Studio
5456
product, or through the separate Build Tools), and assumes a C compiler

README-package.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Execution Requirements
8383
Running SCons requires Python 3.7 or higher. There should be no other
8484
dependencies or requirements to run standard SCons.
8585

86+
The last release to support Python 3.7 or Python 3.8 is NEXT_RELEASE.
8687
The last release to support Python 3.6 was 4.8.1.
8788
The last release to support Python 3.5 was 4.2.0.
8889

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Execution Requirements
8686
Running SCons requires Python 3.7 or higher. There should be no other
8787
dependencies or requirements to run standard SCons.
8888

89+
The last release to support Python 3.7 or Python 3.8 is NEXT_RELEASE.
8990
The last release to support Python 3.6 was 4.8.1.
9091
The last release to support Python 3.5 was 4.2.0.
9192

RELEASE.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ DEPRECATED FUNCTIONALITY
2323

2424
- List anything that's been deprecated since the last release
2525

26+
- Deprecated Python 3.7 & 3.8 support.
27+
2628
CHANGED/ENHANCED EXISTING FUNCTIONALITY
2729
---------------------------------------
2830

ReleaseConfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ version_tuple = (4, 10, 2, 'a', 0)
3838
# cause a warning to be issued (assuming it's not disabled). These values are
3939
# mandatory and must be present in the configuration file.
4040
unsupported_python_version = (3, 7, 0)
41-
deprecated_python_version = (3, 7, 0)
41+
deprecated_python_version = (3, 9, 0)
4242

4343
# If release_date is (yyyy, mm, dd, hh, mm, ss), that is used as the release
4444
# date and time. If release_date is (yyyy, mm, dd), it is used for the

SCons/ActionTests.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,9 +2360,6 @@ def mock_subprocess_run(*args, **kwargs):
23602360
@mock.patch("subprocess.run", mock_subprocess_run)
23612361
def test_scons_subproc_run(self):
23622362
"""Test the argument remapping options."""
2363-
# set phony Python versions to trigger the logic in scons_subproc_run:
2364-
# any version greater than 3.6, really
2365-
save_info, sys.version_info = sys.version_info, (3, 11, 1)
23662363
env = Environment()
23672364
self.assertEqual(scons_subproc_run(env), {"check": False})
23682365
with self.subTest():
@@ -2381,25 +2378,6 @@ def test_scons_subproc_run(self):
23812378
{"text": True, "check": False},
23822379
)
23832380

2384-
# 3.7:
2385-
sys.version_info = (3, 7, 2)
2386-
with self.subTest():
2387-
self.assertEqual(
2388-
scons_subproc_run(env, capture_output=True),
2389-
{"capture_output": True, "check": False},
2390-
)
2391-
with self.subTest():
2392-
self.assertEqual(
2393-
scons_subproc_run(env, text=True),
2394-
{"check": False, "text": True},
2395-
)
2396-
with self.subTest():
2397-
self.assertEqual(
2398-
scons_subproc_run(env, universal_newlines=True),
2399-
{"universal_newlines": True, "check": False},
2400-
)
2401-
sys.version_info = save_info
2402-
24032381

24042382
if __name__ == "__main__":
24052383
unittest.main()

SCons/Script/Main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
# these define the range of versions SCons supports
7070
minimum_python_version = (3, 7, 0)
71-
deprecated_python_version = (3, 7, 0)
71+
deprecated_python_version = (3, 9, 0)
7272

7373
# ordered list of SConstruct names to look for if there is no -f flag
7474
KNOWN_SCONSTRUCT_NAMES = [

doc/man/scons.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ support for &Python; 3.6 is removed.
103103
The CPython project retired 3.6 in Sept 2021:
104104
<ulink url="https://peps.python.org/pep-0494"/>.
105105
</para>
106+
<para>
107+
<emphasis>Changed in version NEXT_RELEASE:</emphasis>
108+
support for &Python; 3.7 is deprecated and will be removed
109+
in a future &SCons; release.
110+
The CPython project retired 3.7 in June 2023:
111+
<ulink url="https://peps.python.org/pep-0537"/>.
112+
</para>
113+
<para>
114+
<emphasis>Changed in version NEXT_RELEASE:</emphasis>
115+
support for &Python; 3.8 is deprecated and will be removed
116+
in a future &SCons; release.
117+
The CPython project retired 3.8 in Sept 2024:
118+
<ulink url="https://peps.python.org/pep-0569"/>.
119+
</para>
106120

107121
<para>
108122
You set up an &SCons; build by writing a script

0 commit comments

Comments
 (0)