Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported Python versions to drop 3.6, include 3.9 and 3.10 #822

Merged
merged 4 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.7', '3.8', '3.9', '3.10']
defaults:
run:
shell: bash -l {0}
Expand All @@ -26,7 +26,7 @@ jobs:
- run: pytest -c pytest.python3.ini --cov-report=xml --cov=augur
- run: cram --shell=/bin/bash tests/functional/*.t tests/builds/*.t
- run: bash tests/builds/runner.sh
- if: github.repository == 'nextstrain/augur' && matrix.python-version == 3.8
- if: github.repository == 'nextstrain/augur' && matrix.python-version == 3.10
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 2
python:
version: 3.6
version: 3.7
install:
- method: pip
path: .
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/DEV_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please see the [project board](https://github.com/orgs/nextstrain/projects/6) fo

## Contributing code

We currently target compatibility with Python 3.6 and higher. As Python releases new versions,
We currently target compatibility with Python 3.7 and higher. As Python releases new versions,
the minimum target compatibility may be increased in the future.

Versions for this project, Augur, from 3.0.0 onwards aim to follow the
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ mamba install -c conda-forge -c bioconda augur

## Using pip from PyPi

Augur is written in Python 3 and requires at least Python 3.6.
Augur is written in Python 3 and requires at least Python 3.7.
It's published on [PyPi](https://pypi.org) as [nextstrain-augur](https://pypi.org/project/nextstrain-augur), so you can install it with `pip` like so:

```bash
Expand Down
17 changes: 11 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
import setuptools
import sys

min_version = (3, 6)
py_min_version = (3, 7) # minimal supported python version
since_augur_version = (14, 0) # py_min_version is required since this augur version

if sys.version_info < min_version:
if sys.version_info < py_min_version:
error = """
Beginning with augur 7.0.0, Python {0} or above is required.
Beginning with augur {0}, Python {1} or above is required.
You are using Python {2}.

This may be due to an out of date pip.

Make sure you have pip >= 9.0.1.
""".format('.'.join(str(n) for n in min_version)),
""".format('.'.join(str(n) for n in since_augur_version),
'.'.join(str(n) for n in py_min_version),
'.'.join(str(n) for n in sys.version_info[:3]))
sys.exit(error)

base_dir = Path(__file__).parent.resolve()
Expand Down Expand Up @@ -45,7 +49,7 @@
},
packages = setuptools.find_packages(),
package_data = {'augur': ['data/*']},
python_requires = '>={}'.format('.'.join(str(n) for n in min_version)),
python_requires = '>={}'.format('.'.join(str(n) for n in py_min_version)),
install_requires = [
"bcbio-gff >=0.6.0, ==0.6.*",
"biopython >=1.67, !=1.77, !=1.78",
Expand Down Expand Up @@ -87,9 +91,10 @@

# 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",
],
# Install an "augur" program which calls augur.__main__.main()
# https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation
Expand Down