From 39cebfb548b6271d8352011c4f10c94ab77e2dc9 Mon Sep 17 00:00:00 2001 From: Lucas <12496191+lucashuy@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:51:04 -0700 Subject: [PATCH] chore: Remove Python 3.7 support for pypi packaging (#6119) * Remove Python 3.7 support for pypi package * Update build test action to not install with 3.7 * Update ordering of installed Python versions for Docker test * Removed version pins for dev deps --- .github/workflows/build.yml | 11 ++++------- requirements/dev.txt | 12 ++++-------- setup.py | 5 ++--- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2df9355298..7c0da71a6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,6 @@ jobs: - ubuntu-latest - windows-latest python: - - "3.7" - "3.8" - "3.9" - "3.11" @@ -108,7 +107,6 @@ jobs: - ubuntu-latest - windows-latest python: - - "3.7" - "3.8" - "3.9" # folders that is commented below requires credentials, no need to spare time to run them @@ -195,7 +193,6 @@ jobs: - ubuntu-latest - windows-latest python: - - "3.7" - "3.8" - "3.9" - "3.11" @@ -227,11 +224,11 @@ jobs: with: # These are the versions of Python that correspond to the supported Lambda runtimes python-version: | - 3.11 - 3.10 - 3.9 - 3.8 3.7 + 3.8 + 3.9 + 3.10 + 3.11 - name: Stop Docker Linux if: ${{ matrix.os == 'ubuntu-latest' }} run: | diff --git a/requirements/dev.txt b/requirements/dev.txt index ed4b8ad2d5..712a607ea1 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,15 +1,13 @@ -r pre-dev.txt -coverage==7.2.7; python_version < "3.8" -coverage==7.3.2; python_version >= "3.8" +coverage==7.3.2 pytest-cov==4.1.0 # type checking and related stubs # mypy adds new rules in new minor versions, which could cause our PR check to fail # here we fix its version and upgrade it manually in the future -mypy==1.4.1; python_version < "3.8" -mypy==1.5.1; python_version >= "3.8" +mypy==1.5.1 types-pywin32==306.0.0.4 types-PyYAML==6.0.12.11 types-chevron==0.14.2.5 @@ -34,10 +32,8 @@ pytest-rerunfailures==12.0 # NOTE (hawflau): DO NOT upgrade pytest-metadata and pytest-json-report unless pytest-json-report addresses https://github.com/numirias/pytest-json-report/issues/89 pytest-metadata==2.0.4 pytest-json-report==1.5.0 -filelock==3.12.2; python_version < "3.8" -filelock==3.12.4; python_version >= "3.8" +filelock==3.12.4 # formatter -black==22.6.0; python_version < "3.8" -black==23.10.0; python_version >= "3.8" +black==23.10.0 psutil==5.9.6 diff --git a/setup.py b/setup.py index d1050860b6..4766a50973 100644 --- a/setup.py +++ b/setup.py @@ -53,8 +53,8 @@ def read_version(): license="Apache License 2.0", packages=find_packages(exclude=["tests.*", "tests", "installer.*", "installer", "schema.*", "schema"]), keywords="AWS SAM CLI", - # Support Python 3.7 or greater - python_requires=">=3.7, <=4.0, !=4.0", + # Support Python 3.8 or greater + python_requires=">=3.8, <=4.0, !=4.0", entry_points={"console_scripts": ["{}=samcli.cli.main:cli".format(cmd_name)]}, install_requires=read_requirements("base.txt"), extras_require={"pre-dev": read_requirements("pre-dev.txt"), "dev": read_requirements("dev.txt")}, @@ -68,7 +68,6 @@ def read_version(): "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.11",