From fdc9107996c779e31fd8b3fdd615f019713d5fa1 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Fri, 14 Jul 2023 10:16:46 +0100 Subject: [PATCH] Remove support for Python 3.8 --- .github/workflows/code.yml | 9 ++------- docs/developer/how-to/pin-requirements.rst | 2 +- docs/developer/tutorials/dev-install.rst | 2 +- docs/user/tutorials/installation.rst | 2 +- pyproject.toml | 7 +++---- src/tickit/core/management/event_router.py | 2 +- src/tickit/utils/compat/functools_compat.py | 14 -------------- 7 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 src/tickit/utils/compat/functools_compat.py diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 155ac04cf..d6f567415 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -35,13 +35,8 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] # can add windows-latest, macos-latest - python: ["3.8", "3.9", "3.10"] - install: ["-e .[dev]"] - # Make one version be non-editable to test both paths of version code - include: - - os: "ubuntu-latest" - python: "3.8" - install: ".[dev]" + python: ["3.9", "3.10"] + install: [".[dev]", "-e .[dev]"] runs-on: ${{ matrix.os }} env: diff --git a/docs/developer/how-to/pin-requirements.rst b/docs/developer/how-to/pin-requirements.rst index 89639623a..6791659a6 100644 --- a/docs/developer/how-to/pin-requirements.rst +++ b/docs/developer/how-to/pin-requirements.rst @@ -46,7 +46,7 @@ of the dependencies and sub-dependencies with pinned versions. You can download any of these files by clicking on them. It is best to use the one that ran with the lowest Python version as this is more likely to be compatible with all the versions of Python in the test matrix. -i.e. ``requirements-test-ubuntu-latest-3.8.txt`` in this example. +i.e. ``requirements-test-ubuntu-latest-3.9.txt`` in this example. Applying the lock file ---------------------- diff --git a/docs/developer/tutorials/dev-install.rst b/docs/developer/tutorials/dev-install.rst index 2d6f9f3c5..06ce6b054 100644 --- a/docs/developer/tutorials/dev-install.rst +++ b/docs/developer/tutorials/dev-install.rst @@ -16,7 +16,7 @@ Install dependencies -------------------- You can choose to either develop on the host machine using a `venv` (which -requires python 3.8 or later) or to run in a container under `VSCode +requires python 3.9 or later) or to run in a container under `VSCode `_ .. tab-set:: diff --git a/docs/user/tutorials/installation.rst b/docs/user/tutorials/installation.rst index 6a0c4e173..e7c3a4d78 100644 --- a/docs/user/tutorials/installation.rst +++ b/docs/user/tutorials/installation.rst @@ -4,7 +4,7 @@ Installation Check your version of python ---------------------------- -You will need python 3.8 or later. You can check your version of python by +You will need python 3.9 or later. You can check your version of python by typing into a terminal:: $ python3 --version diff --git a/pyproject.toml b/pyproject.toml index a91cd1323..1a7109713 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ name = "tickit" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ] @@ -28,7 +27,7 @@ dependencies = [ dynamic = ["version"] license.file = "LICENSE" readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.9" [project.optional-dependencies] dev = [ @@ -127,8 +126,8 @@ skipsdist=True # Don't create a virtualenv for the command, requires tox-direct plugin direct = True passenv = * -allowlist_externals = - pytest +allowlist_externals = + pytest pre-commit mypy sphinx-build diff --git a/src/tickit/core/management/event_router.py b/src/tickit/core/management/event_router.py index 48dcd662e..f7193cc24 100644 --- a/src/tickit/core/management/event_router.py +++ b/src/tickit/core/management/event_router.py @@ -1,9 +1,9 @@ from collections import defaultdict, deque +from functools import cached_property from typing import DefaultDict, Dict, Iterable, Mapping, Optional, Set, Union, overload from tickit.core.components.component import ComponentConfig from tickit.core.typedefs import ComponentID, ComponentPort, PortID -from tickit.utils.compat.functools_compat import cached_property #: A mapping of component output ports to component input ports with defaults Default_Wiring_Struct = DefaultDict[ diff --git a/src/tickit/utils/compat/functools_compat.py b/src/tickit/utils/compat/functools_compat.py deleted file mode 100644 index 5ff606a1b..000000000 --- a/src/tickit/utils/compat/functools_compat.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys -import warnings - -if sys.version_info >= (3, 8): - from functools import cached_property -elif sys.version_info >= (3, 5): - cached_property = property - warnings.warn( - "Property caching is not performed when running with python versions prior to" - + "3.8. Performance may be degraded.", - RuntimeWarning, - ) - -__all__ = ["cached_property"]