From 40c6fae3ae7f76e90ac72b03aa0c81bb7893f77e Mon Sep 17 00:00:00 2001 From: James Butler Date: Sat, 7 Dec 2024 09:52:49 -0500 Subject: [PATCH] Drop support for python 3.7 Python 3.7 went end-of-life on June 27th 2023. See https://endoflife.date/python. There is not a Python 3.7 for arm64 using the macos-latest runner for light-the-torch tests.yml workflow. --- .github/actions/setup-dev-env/action.yml | 2 +- .github/workflows/tests.yml | 1 - light_the_torch/_compat.py | 8 -------- light_the_torch/_utils.py | 2 +- pyproject.toml | 4 +--- scripts/check_pytorch_package_indices.py | 1 - 6 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 light_the_torch/_compat.py diff --git a/.github/actions/setup-dev-env/action.yml b/.github/actions/setup-dev-env/action.yml index 146a3d2..8242f18 100644 --- a/.github/actions/setup-dev-env/action.yml +++ b/.github/actions/setup-dev-env/action.yml @@ -3,7 +3,7 @@ description: "Setup development environment" inputs: python-version: - default: "3.7" + default: "3.8" runs: using: composite diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4fdee7f..93347c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,6 @@ jobs: - windows-latest - macos-latest python-version: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/light_the_torch/_compat.py b/light_the_torch/_compat.py deleted file mode 100644 index 7aeb237..0000000 --- a/light_the_torch/_compat.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -if sys.version_info >= (3, 8): - import importlib.metadata as importlib_metadata -else: - import importlib_metadata - -__all__ = ["importlib_metadata"] diff --git a/light_the_torch/_utils.py b/light_the_torch/_utils.py index ae37c8d..71a3725 100644 --- a/light_the_torch/_utils.py +++ b/light_the_torch/_utils.py @@ -8,7 +8,7 @@ from pip._vendor.packaging.requirements import Requirement -from ._compat import importlib_metadata +import importlib.metadata as importlib_metadata class UnexpectedInternalError(Exception): diff --git a/pyproject.toml b/pyproject.toml index 082f87a..3d631f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,6 @@ classifiers = [ "Environment :: GPU :: NVIDIA CUDA", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -34,10 +33,9 @@ classifiers = [ "Topic :: System :: Installation/Setup", "Topic :: Utilities", ] -requires-python = ">= 3.7" +requires-python = ">= 3.8" dependencies = [ "pip >=22.3, <23.3", - "importlib_metadata ; python_version < '3.8'", ] dynamic = ["version"] diff --git a/scripts/check_pytorch_package_indices.py b/scripts/check_pytorch_package_indices.py index b808c68..d1c181b 100755 --- a/scripts/check_pytorch_package_indices.py +++ b/scripts/check_pytorch_package_indices.py @@ -23,7 +23,6 @@ "torchrec", "torchrec-cpu", "torchrec_nightly", - "torchrec_nightly_3.7_cu11.whl", "torchrec_nightly_3.8_cu11.whl", "torchrec_nightly_3.9_cu11.whl", "torchrec_nightly_cpu",