From ca64c2dbd7bde0bbb985cb32403ce2a526b2a125 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 3 Nov 2023 10:25:47 -0700 Subject: [PATCH 1/2] Explicitly support Python 3.11 Add the PyPI Trove classifier and test in CI. Can't run test-dist for reasons similar to 02af3a1839fd10c09e3c79594caeb9b3f0550fc8. --- .github/workflows/ci.yaml | 2 ++ CHANGES.md | 5 +++-- setup.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f3c93561..75d69d4f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,7 @@ jobs: - '3.8' - '3.9' - '3.10' + - '3.11' runs-on: ${{ matrix.os }} defaults: @@ -214,6 +215,7 @@ jobs: - '3.8' - '3.9' - '3.10' + # XXX TODO: Add 3.11 here once supported by Augur: https://github.com/nextstrain/augur/issues/1334 runs-on: ${{ matrix.os }} defaults: run: diff --git a/CHANGES.md b/CHANGES.md index 71ef9e6e..12ef6cad 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,8 +13,9 @@ development source code and as such may not be routinely kept up to date. # __NEXT__ -This release drops support for Python versions 3.6 and 3.7. -([#325](https://github.com/nextstrain/cli/pull/325)) +This release drops support for Python versions 3.6 and 3.7 and adds support for +3.11. ([#325](https://github.com/nextstrain/cli/pull/325), +[#327](https://github.com/nextstrain/cli/pull/327)) ## Improvements diff --git a/setup.py b/setup.py index 29f8f1f6..863f0956 100644 --- a/setup.py +++ b/setup.py @@ -73,6 +73,7 @@ def find_namespaced_packages(namespace): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ], # Install a "nextstrain" program which calls nextstrain.cli.__main__.main() From b19007aca254ec0d432fbd4f523bca658cbbeeaf Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Mon, 6 Nov 2023 14:17:32 -0800 Subject: [PATCH 2/2] =?UTF-8?q?CI:=20Ignore=20expected=20Mypy=20error=20fo?= =?UTF-8?q?r=20Python=20=E2=89=A53.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems like Mypy is not smart enough to realize that the importlib_resources import is not used with these Python versions. --- nextstrain/cli/resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextstrain/cli/resources/__init__.py b/nextstrain/cli/resources/__init__.py index 4f43389d..cbdcac52 100644 --- a/nextstrain/cli/resources/__init__.py +++ b/nextstrain/cli/resources/__init__.py @@ -17,7 +17,7 @@ if sys.version_info >= (3, 11): from importlib.resources import files as _files, as_file as _as_file else: - from importlib_resources import files as _files, as_file as _as_file + from importlib_resources import files as _files, as_file as _as_file # type: ignore[import] from pathlib import Path from typing import ContextManager