diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 427ccfd5..656c8d7e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -58,7 +58,7 @@ jobs: strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] services: postgres: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 611473f3..f324ec7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] services: rabbitmq: diff --git a/pyproject.toml b/pyproject.toml index dd070e4a..33944c33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,6 @@ classifiers = [ 'License :: OSI Approved :: MIT License', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -28,7 +27,7 @@ classifiers = [ 'Programming Language :: Python :: 3.12', ] keywords = ['workflow', 'multithreaded', 'rabbitmq'] -requires-python = '>=3.7' +requires-python = '>=3.8' dependencies = [ 'kiwipy[rmq]~=0.8.3', 'nest_asyncio~=1.5,>=1.5.1', diff --git a/src/plumpy/events.py b/src/plumpy/events.py index 735fb3f6..60a5306e 100644 --- a/src/plumpy/events.py +++ b/src/plumpy/events.py @@ -55,8 +55,6 @@ def reset_event_loop_policy() -> None: cls = loop.__class__ del cls._check_running # type: ignore - # typo in Python 3.7 source - del cls._check_runnung # type: ignore del cls._nest_patched # type: ignore # pylint: enable=protected-access diff --git a/src/plumpy/process_states.py b/src/plumpy/process_states.py index da91b506..d962eb77 100644 --- a/src/plumpy/process_states.py +++ b/src/plumpy/process_states.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -import asyncio from enum import Enum import sys import traceback @@ -231,11 +230,6 @@ async def execute(self) -> State: # type: ignore # pylint: disable=invalid-over except Interruption: # Let this bubble up to the caller raise - except asyncio.CancelledError: # pylint: disable=try-except-raise - # note this re-raise is only required in python<=3.7, - # for python>=3.8 asyncio.CancelledError does not inherit from Exception, - # so will not be caught below - raise except Exception: # pylint: disable=broad-except excepted = self.create_state(ProcessState.EXCEPTED, *sys.exc_info()[1:]) return cast(State, excepted) diff --git a/src/plumpy/processes.py b/src/plumpy/processes.py index c9c1a118..b6e14ad9 100644 --- a/src/plumpy/processes.py +++ b/src/plumpy/processes.py @@ -1235,12 +1235,6 @@ async def step(self) -> None: except KeyboardInterrupt: # pylint: disable=try-except-raise raise - except asyncio.CancelledError: # pylint: disable=try-except-raise - # note this re-raise is only required in python<=3.7, - # where asyncio.CancelledError == concurrent.futures.CancelledError - # it is encountered when the run_task is cancelled - # for python>=3.8 asyncio.CancelledError does not inherit from Exception, so will not be caught below - raise except Exception: # pylint: disable=broad-except # Overwrite the next state to go to excepted directly next_state = self.create_state(process_states.ProcessState.EXCEPTED, *sys.exc_info()[1:])