diff --git a/CHANGES.txt b/CHANGES.txt
index b7e116c1b..dc659611b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Purge vim/emac local variable bloat.
- Implement type hints for Node subclasses.
- Ruff: Handle F401 exclusions more granularly, remove per-file exclusions.
+ - Deprecated Python 3.7 & 3.8 support.
From William Deegan:
- Fix SCons Docbook schema to work with lxml > 5
diff --git a/RELEASE.txt b/RELEASE.txt
index 3a6d20e32..ec388f08e 100644
--- a/RELEASE.txt
+++ b/RELEASE.txt
@@ -23,6 +23,8 @@ DEPRECATED FUNCTIONALITY
- List anything that's been deprecated since the last release
+- Deprecated Python 3.7 & 3.8 support.
+
CHANGED/ENHANCED EXISTING FUNCTIONALITY
---------------------------------------
diff --git a/ReleaseConfig b/ReleaseConfig
index c9b91232b..bf799da7b 100755
--- a/ReleaseConfig
+++ b/ReleaseConfig
@@ -38,7 +38,7 @@ version_tuple = (4, 10, 2, 'a', 0)
# cause a warning to be issued (assuming it's not disabled). These values are
# mandatory and must be present in the configuration file.
unsupported_python_version = (3, 7, 0)
-deprecated_python_version = (3, 7, 0)
+deprecated_python_version = (3, 9, 0)
# If release_date is (yyyy, mm, dd, hh, mm, ss), that is used as the release
# date and time. If release_date is (yyyy, mm, dd), it is used for the
diff --git a/SCons/ActionTests.py b/SCons/ActionTests.py
index 7b142be16..c07d5cd97 100644
--- a/SCons/ActionTests.py
+++ b/SCons/ActionTests.py
@@ -2360,9 +2360,6 @@ def mock_subprocess_run(*args, **kwargs):
@mock.patch("subprocess.run", mock_subprocess_run)
def test_scons_subproc_run(self):
"""Test the argument remapping options."""
- # set phony Python versions to trigger the logic in scons_subproc_run:
- # any version greater than 3.6, really
- save_info, sys.version_info = sys.version_info, (3, 11, 1)
env = Environment()
self.assertEqual(scons_subproc_run(env), {"check": False})
with self.subTest():
@@ -2381,25 +2378,6 @@ def test_scons_subproc_run(self):
{"text": True, "check": False},
)
- # 3.7:
- sys.version_info = (3, 7, 2)
- with self.subTest():
- self.assertEqual(
- scons_subproc_run(env, capture_output=True),
- {"capture_output": True, "check": False},
- )
- with self.subTest():
- self.assertEqual(
- scons_subproc_run(env, text=True),
- {"check": False, "text": True},
- )
- with self.subTest():
- self.assertEqual(
- scons_subproc_run(env, universal_newlines=True),
- {"universal_newlines": True, "check": False},
- )
- sys.version_info = save_info
-
if __name__ == "__main__":
unittest.main()
diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py
index 04a8ec81f..5ee0c8b49 100644
--- a/SCons/Script/Main.py
+++ b/SCons/Script/Main.py
@@ -68,7 +68,7 @@
# these define the range of versions SCons supports
minimum_python_version = (3, 7, 0)
-deprecated_python_version = (3, 7, 0)
+deprecated_python_version = (3, 9, 0)
# ordered list of SConstruct names to look for if there is no -f flag
KNOWN_SCONSTRUCT_NAMES = [
diff --git a/doc/man/scons.xml b/doc/man/scons.xml
index f7ab51fce..b3a336c55 100644
--- a/doc/man/scons.xml
+++ b/doc/man/scons.xml
@@ -103,6 +103,20 @@ support for &Python; 3.6 is removed.
The CPython project retired 3.6 in Sept 2021:
.
+
+Changed in version NEXT_RELEASE:
+support for &Python; 3.7 is deprecated and will be removed
+in a future &SCons; release.
+The CPython project retired 3.7 in June 2023:
+.
+
+
+Changed in version NEXT_RELEASE:
+support for &Python; 3.8 is deprecated and will be removed
+in a future &SCons; release.
+The CPython project retired 3.8 in Sept 2024:
+.
+
You set up an &SCons; build by writing a script
diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py
index 359095c64..e4da71847 100644
--- a/testing/framework/TestSCons.py
+++ b/testing/framework/TestSCons.py
@@ -58,8 +58,8 @@
# TODO: these need to be hand-edited when there are changes
python_version_unsupported = (3, 7, 0)
-python_version_deprecated = (3, 7, 0)
-python_version_supported_str = "3.7.0" # str of lowest non-deprecated Python
+python_version_deprecated = (3, 9, 0)
+python_version_supported_str = "3.9.0" # str of lowest non-deprecated Python
SConsVersion = default_version