Skip to content

Bump minimum Python version to 3.10#524

Draft
victorlin wants to merge 11 commits intomasterfrom
victorlin/update-python-versions
Draft

Bump minimum Python version to 3.10#524
victorlin wants to merge 11 commits intomasterfrom
victorlin/update-python-versions

Conversation

@victorlin
Copy link
Copy Markdown
Member

@victorlin victorlin commented Apr 29, 2026

Description of proposed changes

Drop support for end of life Python versions 3.8 and 3.9.

Changes broken into multiple to follow the pattern in #325.

Related issue(s)

Checklist

  • Checks pass
  • Update changelog
  • Open separate PR for Python 3.14 support (0758741)

@victorlin victorlin self-assigned this Apr 29, 2026
Comment thread .github/workflows/ci.yaml
Comment on lines 323 to +325
- uses: ./src/.github/actions/setup-integration-tests
with:
python-version: '3.9'
python-version: '3.10'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test-standalone is failing with ModuleNotFoundError: No module named 'importlib_resources' after changing setup-integration-tests to use Python 3.10. I expected the module to be available from Augur's bioconda recipe, but it is indeed not listed as a dependency:

$ micromamba repoquery depends augur=33.1.0 -c conda-forge -c bioconda --json \
  | jq -r '.result.pkgs[] | select(.name == "augur") | .depends[]'
pyyaml
mafft
iqtree
fasttree
seqkit
raxml
vcftools
python >=3.10
packaging >=19.2
cvxopt >=1.1.9,<2
scipy >=1.0.0,<2
biopython >=1.80,<2
pyfastx >=1.0.0,<3
treetime >=0.11.2,<0.12
bcbio-gff >=0.7.1,<0.8
networkx >=2.5,<4
python-calamine >=0.2.0
sqlite >=3.39,<4
jsonschema >=4.18.0,<5
xopen >=2.0.0,<3
pandas >=1.4.0,<3
referencing >=0.29.1,<1
isodate >=0.6.0,<0.8
numpy >=1.0.0,<3

This is because the augur package is noarch and does not respect selectors such as [py<311]. From conda-forge docs on noarch:

The noarch: python directive, in the build section, makes pure-Python packages that only need to be built once.
In order to qualify as a noarch python package, all of the following criteria must be fulfilled:

  • No python version specific requirements

It had previously worked with <3.10 because importlib-resources was pulled in by another dependency.

I'll make a PR to fix this in the bioconda recipe.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victorlin victorlin force-pushed the victorlin/update-python-versions branch from 86f5544 to b1594df Compare May 1, 2026 17:50
victorlin added 9 commits May 1, 2026 12:34
Update python_requires in setup.py, PyPI classifiers, and documentation
to reflect the new minimum version of Python 3.10.

Subsequent commits will remove the 3.8 and 3.9-specific workarounds.
Removed two now-unnecessary ignore markers. Also added an explicit
flush() method to LinePrefixer (reasoning in comment).
Both TypeAlias and EllipsisType are available in the standard library as
of Python 3.10, which is now our minimum supported version.
urllib3 isn't used directly by the code so I'm not sure why these were
added. Removing them to get rid of the Python 3.8 and 3.9 specific
dependencies.
pytest 7.0.0 had a bug on Python 3.9; since 3.9 is no longer supported
this workaround is no longer needed.
Path.is_relative_to() is now always available with a minimum Python
version of 3.10.
Replace the runtime version check with a constant "options" string.

Python 3.10 changed the default argument group title from "optional
arguments" to "options" (cpython#23858). Since 3.10 is now our minimum,
the version guard is no longer needed.
Remove the reference to 3.9 which is no longer supported.
@victorlin victorlin force-pushed the victorlin/update-python-versions branch from b1594df to a6a479c Compare May 1, 2026 19:54
@victorlin victorlin changed the title Update Python versions Bump minimum Python version to 3.10 May 1, 2026
victorlin added 2 commits May 1, 2026 12:57
This reverts "Suppress warning from cryptography about deprecated Python
3.8 support" (8987cfd) since 3.8 is no longer supported.
@victorlin victorlin force-pushed the victorlin/update-python-versions branch from a6a479c to 59ad251 Compare May 1, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.8 deprecation warning from cryptography

1 participant