From a2e5d5501409067a0420ac51a09c725b1e0659d1 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Tue, 19 Sep 2023 14:51:19 +0200 Subject: [PATCH] Drop support for Python 3.7 --- .github/workflows/pytest.yaml | 3 +-- RELEASE_NOTES.rst | 1 + doc/install.rst | 5 +++++ ixmp/__init__.py | 6 +----- pyproject.toml | 6 ++---- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index cf0d92140..7615758eb 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -26,8 +26,7 @@ jobs: - ubuntu-latest - windows-latest python-version: - - "3.7" # Earliest version supported by ixmp - - "3.8" + - "3.8" # Earliest version supported by ixmp - "3.9" - "3.10" - "3.11" # Latest supported by ixmp diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index b7573fa42..aafecacbf 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -4,6 +4,7 @@ Next release .. All changes .. ----------- +- Support for Python 3.7 is dropped (:pull:`492`). - New :func:`.utils.discard_on_error` and matching argument to :meth:`.TimeSeries.transact` to avoid locking :class:`.TimeSeries` / :class:`.Scenario` on failed operations with :class:`.JDBCBackend` (:pull:`488`). .. _v3.7.0: diff --git a/doc/install.rst b/doc/install.rst index 1eeab697e..d7d0d7251 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -31,6 +31,11 @@ Use cases for installing ixmp directly include: Install system dependencies =========================== +Python +------ + +Python version 3.8 or later is required. + GAMS (required) --------------- diff --git a/ixmp/__init__.py b/ixmp/__init__.py index 9284fa64a..1c745a663 100644 --- a/ixmp/__init__.py +++ b/ixmp/__init__.py @@ -1,9 +1,5 @@ import logging - -try: - from importlib.metadata import PackageNotFoundError, version -except ImportError: # Python 3.7 - from importlib_metadata import PackageNotFoundError, version # type: ignore +from importlib.metadata import PackageNotFoundError, version from ixmp._config import config from ixmp.backend import BACKENDS, IAMC_IDX, ItemType diff --git a/pyproject.toml b/pyproject.toml index 1a75a90a6..7b6bc5fc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -29,11 +28,10 @@ classifiers = [ "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis", ] +requires-python = ">=3.8" dependencies = [ "click", - "genno <= 1.13; python_version < '3.8'", - "genno >= 1.16; python_version >= '3.8'", - "importlib_metadata; python_version < '3.8'", + "genno >= 1.16", "JPype1 >= 1.2.1", "openpyxl", "pandas >= 1.2",