From 5b58efa489ed83374a5e2be464203caf665f616e Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Fri, 10 Apr 2026 13:14:22 -0400 Subject: [PATCH 1/5] Drop support for Python 3.7, 3.8, and 3.9 --- .github/workflows/pytest.yml | 4 ++-- README.rst | 2 +- pyproject.toml | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index f723aac6..d5cd2edd 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -19,10 +19,10 @@ concurrency: jobs: unit-test: name: Run unit tests - runs-on: ubuntu-22.04 # 3.7 needs 22.04, can move to -latest when we drop 3.7 support + runs-on: ubuntu-latest strategy: matrix: - python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python: ["3.10", "3.11", "3.12"] steps: - name: Set up Python ${{ matrix.python }} diff --git a/README.rst b/README.rst index 51a30f54..77e9a856 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ historical look back of the housekeeping data. Dependencies ------------ -This code targets Python 3.7+. +This code targets Python 3.10+. * `so3g`_ - Required for using the HK Aggregator Agent. * `crossbar`_ (optional) - The supported WAMP router. Controllable via diff --git a/pyproject.toml b/pyproject.toml index 797ae9a9..caa80d99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,15 +10,12 @@ name = "ocs" dynamic = ["version"] description = "Observatory Control System" readme = "README.rst" -requires-python = ">=3.7" +requires-python = ">=3.10" classifiers = [ "Framework :: Twisted", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -27,7 +24,7 @@ classifiers = [ dependencies = [ "autobahn", "deprecation", - "importlib_metadata;python_version<\"3.10\"", + "importlib_metadata", "influxdb", "influxdb-client[ciso]", "numpy", From 147dbe161e6a7fc6d5e790357fba5b337662e11f Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Fri, 10 Apr 2026 13:15:45 -0400 Subject: [PATCH 2/5] Remove <3.10 check on plugins --- docs/developer/writing-plugins.rst | 6 ++---- ocs/agent_cli.py | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/developer/writing-plugins.rst b/docs/developer/writing-plugins.rst index 3d0207ff..207c5b99 100644 --- a/docs/developer/writing-plugins.rst +++ b/docs/developer/writing-plugins.rst @@ -115,10 +115,8 @@ running: .. code-block:: python import sys - if sys.version_info < (3, 10): - from importlib_metadata import entry_points - else: - from importlib.metadata import entry_points + + from importlib.metadata import entry_points discovered_plugins = entry_points(group='ocs.plugins') print(discovered_plugins) diff --git a/ocs/agent_cli.py b/ocs/agent_cli.py index bcad8a97..fc7383a4 100755 --- a/ocs/agent_cli.py +++ b/ocs/agent_cli.py @@ -5,10 +5,7 @@ import sys import warnings -if sys.version_info < (3, 10): - from importlib_metadata import entry_points -else: - from importlib.metadata import entry_points +from importlib.metadata import entry_points from ocs import site_config From e03f7195f718f00ffaac2fc0614c79b259c85cfc Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Fri, 10 Apr 2026 13:16:57 -0400 Subject: [PATCH 3/5] Add support and testing for Python 3.13 and 3.14 --- .github/workflows/pytest.yml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d5cd2edd..c9effc8a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.10", "3.11", "3.12"] + python: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Set up Python ${{ matrix.python }} diff --git a/pyproject.toml b/pyproject.toml index caa80d99..13f3a1f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,8 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Astronomy", ] dependencies = [ From cab7ae48de876cb85bffeccc6d8b1b02a924ffe3 Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Fri, 10 Apr 2026 13:23:10 -0400 Subject: [PATCH 4/5] Remove 3.14 support A bit too early for this, so3g doesn't support 3.14 yet. --- .github/workflows/pytest.yml | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index c9effc8a..9d358f39 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python: ["3.10", "3.11", "3.12", "3.13"] steps: - name: Set up Python ${{ matrix.python }} diff --git a/pyproject.toml b/pyproject.toml index 13f3a1f6..568086f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,6 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Astronomy", ] dependencies = [ From 9fd09a15c70d3a87385b3f8beda612634dbf169e Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Fri, 10 Apr 2026 16:07:53 -0400 Subject: [PATCH 5/5] Drop importlib_metadata entirely It was needed for Python <3.10. Beyond that we use the native importlib. --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 568086f7..2a18d435 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ classifiers = [ dependencies = [ "autobahn", "deprecation", - "importlib_metadata", "influxdb", "influxdb-client[ciso]", "numpy",