diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 514e069f..dd02f0a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,23 +24,11 @@ jobs: - macos-latest - windows-latest python: - - '3.6' - '3.7' - '3.8' - '3.9' - '3.10' - # Python 3.6 is not available on Ubuntu 22.04, which is what - # ubuntu-latest points to as of Q4 2022¹, so replace that job with 3.6 - # on Ubuntu 20.04. - # - # ¹ - exclude: - - os: ubuntu-latest - python: '3.6' - include: - - os: ubuntu-20.04 - python: '3.6' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -205,11 +193,10 @@ jobs: - macos-latest - windows-latest python: - - '3.6' - '3.7' - '3.8' - '3.9' - # XXX TODO: Add 3.10 here once supported by Conda/Bioconda/Conda Forge. + - '3.10' runs-on: ${{ matrix.os }} defaults: run: diff --git a/devel/setup-venv b/devel/setup-venv index bc11cd72..8883be41 100755 --- a/devel/setup-venv +++ b/devel/setup-venv @@ -6,6 +6,6 @@ venv="$base/.venv" set -x rm -rf "$venv" -python3.6 -m venv "$venv" +python3.7 -m venv "$venv" "$venv"/bin/pip install --upgrade pip setuptools wheel pip-tools "$venv"/bin/pip install -e '.[dev]' diff --git a/doc/development.md b/doc/development.md index f071588a..c48c1d6a 100644 --- a/doc/development.md +++ b/doc/development.md @@ -2,7 +2,7 @@ Development of `nextstrain-cli` happens at . -We currently target compatibility with Python 3.6 and higher. +We currently target compatibility with Python 3.7 and higher. Versions for this project follow the [Semantic Versioning rules][]. @@ -84,7 +84,7 @@ There are also many [editor integrations for mypy][], and Pyright is integrated into VS Code's Python support. The [`typing_extensions`][] module should be used for features added to the -standard `typings` module after 3.6. +standard `typings` module after 3.7. We also use [Flake8][] for some static analysis checks focusing on runtime safety and correctness. You can run them like this: diff --git a/doc/installation.rst b/doc/installation.rst index 468de179..a576c58c 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -42,11 +42,11 @@ From PyPI --------- .. note:: - Nextstrain CLI is written in Python 3 and requires at least Python 3.6. There + Nextstrain CLI is written in Python 3 and requires at least Python 3.7. There are many ways to install Python 3 on Windows, macOS, or Linux, including the `official packages`_, `Homebrew`_ for macOS, and the `Anaconda Distribution`_. Details are beyond the scope of this guide, but make sure you install Python - 3.6 or higher. You may already have Python 3 installed, especially if you're on + 3.7 or higher. You may already have Python 3 installed, especially if you're on Linux. Check by running ``python --version`` or ``python3 --version``. .. _official packages: https://www.python.org/downloads/ diff --git a/mypy.ini b/mypy.ini index adf1f97f..410f9261 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,6 +1,6 @@ [mypy] # We currently aim for compat with 3.6. -python_version = 3.6 +python_version = 3.7 namespace_packages = True # Check function bodies which don't have a typed signature. This prevents a diff --git a/nextstrain/cli/aws/cognito/__init__.py b/nextstrain/cli/aws/cognito/__init__.py index 209361c9..afede953 100644 --- a/nextstrain/cli/aws/cognito/__init__.py +++ b/nextstrain/cli/aws/cognito/__init__.py @@ -5,6 +5,7 @@ import warnings # Ignore noisy warning from cryptography 37.0.0 and 39.0.0 about deprecated support for Python 3.6. +# TODO: Remove this now that we've dropped support for Python 3.6. with warnings.catch_warnings(): warnings.filterwarnings( "ignore", diff --git a/nextstrain/cli/util.py b/nextstrain/cli/util.py index 8e09c54a..4b69d8df 100644 --- a/nextstrain/cli/util.py +++ b/nextstrain/cli/util.py @@ -273,6 +273,8 @@ def capture_output(argv, extra_env: Mapping = {}): parameter wasn't added until Python 3.7 and we aim for compat with 3.6. When we bump our minimum Python version, we can remove this wrapper. + TODO: Remove this wrapper now that our minimum Python version is 3.7. + If an *extra_env* mapping is passed, the provided keys and values are overlayed onto the current environment. """ diff --git a/pyrightconfig.json b/pyrightconfig.json index b0631811..2f6861f4 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,5 +1,5 @@ { - "pythonVersion": "3.6", + "pythonVersion": "3.7", "include": ["nextstrain"], "ignore": [ "nextstrain/cli/markdown.py", diff --git a/setup.py b/setup.py index b2c1316e..d7c430d8 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,11 @@ def find_namespaced_packages(namespace): # Python 3 only "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + # No Python 3.11 yet? ], # Install a "nextstrain" program which calls nextstrain.cli.__main__.main() @@ -81,10 +85,9 @@ def find_namespaced_packages(namespace): ], }, - python_requires = '>=3.6', + python_requires = '>=3.7', install_requires = [ - "dataclasses; python_version < '3.7'", "docutils", "fasteners", "importlib_metadata; python_version < '3.8'",