Skip to content

Commit 48fd6c2

Browse files
authored
chore: drop Python 3.9 support for running aws-lambda-builders (#847)
* chore: drop Python 3.9 support for running aws-lambda-builders - Update python_requires to >=3.10 - Remove Python 3.8 and 3.9 classifiers from setup.py - Remove 3.9 from CI test matrices (unit-functional, python-pip, python-uv) - Update black target_version to py310-py314 - Simplify requirements/dev.txt version conditionals Note: Building Lambda functions targeting the python3.9 runtime is still fully supported. This change only affects the minimum Python version required to run aws-lambda-builders itself. * black * rm 3.9
1 parent 853273e commit 48fd6c2

5 files changed

Lines changed: 16 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ jobs:
6565
- ubuntu-latest
6666
- windows-latest
6767
python:
68-
- "3.9"
6968
- "3.10"
7069
- "3.11"
7170
- "3.12"
@@ -262,7 +261,6 @@ jobs:
262261
- ubuntu-latest
263262
- windows-latest
264263
python:
265-
- "3.9"
266264
- "3.10"
267265
- "3.11"
268266
- "3.12"
@@ -291,7 +289,6 @@ jobs:
291289
- ubuntu-latest
292290
- windows-latest
293291
python:
294-
- "3.9"
295292
- "3.10"
296293
- "3.11"
297294
- "3.12"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ max-branches = 13
2020

2121
[tool.black]
2222
line-length = 120
23-
target_version = ['py37', 'py38', 'py39']
23+
target_version = ['py310', 'py311', 'py312', 'py313', 'py314']
2424
exclude = '''
2525
2626
(

requirements/dev.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
coverage==7.13.5; python_version>="3.10"
2-
coverage==7.10.7; python_version<"3.10"
1+
coverage==7.13.5
32
flake8==3.8.4
4-
pytest-cov==6.3.0; python_version>="3.9"
5-
pytest-cov==5.0.0; python_version<"3.9"
3+
pytest-cov==6.3.0
64

75
# Test requirements
86
pytest>=6.1.1
97
parameterized==0.9.0
108
pyelftools~=0.32 # Used to verify the generated Go binary architecture in integration tests (utils.py)
119

1210
# formatter
13-
black==26.3.1; python_version>="3.10"
14-
black==25.11.0; python_version<"3.10"
11+
black==26.3.1
1512
ruff==0.15.5

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def read_version():
4343
license="Apache License 2.0",
4444
packages=find_packages(exclude=["tests.*", "tests"]),
4545
keywords="AWS Lambda Functions Building",
46-
# Support 3.8 or greater
47-
python_requires=(">=3.8"),
46+
# Support 3.10 or greater
47+
python_requires=(">=3.10"),
4848
entry_points={"console_scripts": ["{}=aws_lambda_builders.__main__:main".format(cmd_name)]},
4949
install_requires=read_requirements("base.txt") + read_requirements("python_pip.txt"),
5050
extras_require={"dev": read_requirements("dev.txt")},
@@ -58,8 +58,6 @@ def read_version():
5858
"License :: OSI Approved :: Apache Software License",
5959
"Operating System :: OS Independent",
6060
"Programming Language :: Python",
61-
"Programming Language :: Python :: 3.8",
62-
"Programming Language :: Python :: 3.9",
6361
"Programming Language :: Python :: 3.10",
6462
"Programming Language :: Python :: 3.11",
6563
"Programming Language :: Python :: 3.12",

tests/unit/workflows/python_uv/test_packager.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,11 @@ def test_build_dependencies_pyproject_with_uv_lock(self):
219219
# Mock the uv export command
220220
self.mock_uv_runner._uv.run_uv_command.return_value = (0, b"", b"")
221221

222-
with patch("os.path.basename", return_value="pyproject.toml"), patch(
223-
"os.path.dirname", return_value=os.path.join("path", "to")
224-
), patch("os.path.exists") as mock_exists:
222+
with (
223+
patch("os.path.basename", return_value="pyproject.toml"),
224+
patch("os.path.dirname", return_value=os.path.join("path", "to")),
225+
patch("os.path.exists") as mock_exists,
226+
):
225227

226228
# Mock that uv.lock exists alongside pyproject.toml
227229
mock_exists.return_value = True
@@ -242,9 +244,11 @@ def test_build_dependencies_pyproject_with_uv_lock(self):
242244

243245
def test_build_dependencies_pyproject_without_uv_lock(self):
244246
"""Test that pyproject.toml without uv.lock uses standard pyproject build."""
245-
with patch("os.path.basename", return_value="pyproject.toml"), patch(
246-
"os.path.dirname", return_value=os.path.join("path", "to")
247-
), patch("os.path.exists") as mock_exists:
247+
with (
248+
patch("os.path.basename", return_value="pyproject.toml"),
249+
patch("os.path.dirname", return_value=os.path.join("path", "to")),
250+
patch("os.path.exists") as mock_exists,
251+
):
248252
# Mock that uv.lock does NOT exist alongside pyproject.toml
249253
mock_exists.return_value = False
250254

0 commit comments

Comments
 (0)