From 864c06e8c2ce3463a451000d5401a447291ebbee Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Fri, 17 Mar 2023 12:56:01 -0500 Subject: [PATCH 1/2] Remove Python 3.7 from setup.py and CI job matrices --- .github/workflows/checks.yml | 9 ++------- .github/workflows/notebooks-checks.yml | 5 +---- .github/workflows/raven-integration.yml | 8 ++------ setup.py | 3 +-- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 16ce8abb0..0573f9a45 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -30,10 +30,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: - - '3.7' - - '3.8' - - '3.9' + python-version: ['3.8', '3.9'] os: - linux - win64 @@ -91,9 +88,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: - - '3.7' - - '3.9' + python-version: ['3.8', '3.9'] os: - linux - win64 diff --git a/.github/workflows/notebooks-checks.yml b/.github/workflows/notebooks-checks.yml index 9373f153b..61a8f8ffb 100644 --- a/.github/workflows/notebooks-checks.yml +++ b/.github/workflows/notebooks-checks.yml @@ -38,10 +38,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: - - '3.7' - # - '3.8' - - '3.9' + python-version: ['3.8', '3.9'] os: - linux - win64 diff --git a/.github/workflows/raven-integration.yml b/.github/workflows/raven-integration.yml index e4ded1689..c5611b166 100644 --- a/.github/workflows/raven-integration.yml +++ b/.github/workflows/raven-integration.yml @@ -25,9 +25,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: - - '3.7' - - '3.8' + python-version: ['3.8'] os: - linux - win64 @@ -79,9 +77,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: - - '3.7' - - '3.8' + python-version: ['3.8'] os: - win64 include: diff --git a/setup.py b/setup.py index ac5b1b6e0..0153960ea 100644 --- a/setup.py +++ b/setup.py @@ -101,7 +101,6 @@ class SpecialDependencies: "Operating System :: Unix", "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 :: Implementation :: CPython", @@ -112,7 +111,7 @@ class SpecialDependencies: ], keywords="market simulation, chemical engineering, process modeling, hybrid power systems", packages=find_packages(), - python_requires=">=3.7, <4", + python_requires=">=3.8, <4", install_requires=[ "pytest", # we use jupyter notebooks From 6c7b883a24dc7866f59af8d77de860c66af918f2 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Fri, 17 Mar 2023 12:56:34 -0500 Subject: [PATCH 2/2] Remove import handling required for 3.7 compatibility --- .../storage/multiperiod_integrated_storage_usc.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/multiperiod_integrated_storage_usc.py b/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/multiperiod_integrated_storage_usc.py index 8f4e02e56..80d4084f8 100644 --- a/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/multiperiod_integrated_storage_usc.py +++ b/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/multiperiod_integrated_storage_usc.py @@ -24,10 +24,7 @@ __author__ = "Naresh Susarla and Soraya Rawlings" -try: - from importlib import resources # Python 3.8+ -except ImportError: - import importlib_resources as resources # Python 3.7 +from importlib import resources # Python 3.8+ from idaes.core.util import from_json, to_json import idaes.logger as idaeslog