Skip to content

Commit 6e2fc35

Browse files
mattwthompsonCopilotj-wags
authored
Drop support for Python 3.11 (#2174)
* Drop support for Python 3.11 * Constrain Python verion in docs build * Update README badge and add ruff target-version for Python 3.12+ Agent-Logs-Url: https://github.com/openforcefield/openff-toolkit/sessions/3eb020f9-690b-47f8-92b3-3c6415445f92 Co-authored-by: mattwthompson <7935382+mattwthompson@users.noreply.github.com> * Possibly update docstring * Fail faster * Revert "Fail faster" This reverts commit 6c9c2b3. * Update hooks * Enable more timing in logs * Apply suggestion from @j-wags * Apply suggestions from code review Co-authored-by: Matt Thompson <matt.thompson@openforcefield.org> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mattwthompson <7935382+mattwthompson@users.noreply.github.com> Co-authored-by: Jeff Wagner <jeffrey.wagner+github@openforcefield.org>
1 parent b56ac24 commit 6e2fc35

15 files changed

Lines changed: 40 additions & 50 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-latest, macos-latest]
26-
python-version: ["3.11", "3.12", "3.13"]
26+
python-version: ["3.12", "3.13"]
2727
rdkit: [true, false]
2828
openeye: [true, false]
2929
nagl: [true, false]
3030
exclude:
3131
- rdkit: false
3232
openeye: false
33-
- openeye: true
34-
python-version: "3.12"
3533
- openeye: true
3634
python-version: "3.13"
3735
- rdkit: false
@@ -153,7 +151,7 @@ jobs:
153151

154152
- name: Run notebooks in docs
155153
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
156-
run: python -m pytest -v --no-cov --nbval-lax docs/
154+
run: python -m pytest -v --durations=10 --no-cov --nbval-lax docs/
157155

158156
- name: Run examples in docstrings
159157
if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.nagl == true }}

.github/workflows/beta_rc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- ubuntu-latest
2121
- macos-latest
2222
python-version:
23-
- "3.11"
23+
- "3.12"
2424

2525
env:
2626
OE_LICENSE: ${{ github.workspace }}/oe_license.txt

.github/workflows/conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, macos-latest]
24-
python-version: ["3.11"]
24+
python-version: ["3.12"]
2525
openeye: ["true", "false"]
2626

2727
env:

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: [ubuntu-latest, macos-latest]
27-
python-version: ["3.11", "3.12"]
27+
python-version: [ "3.12"]
2828
rdkit: [true, false]
2929
openeye: [true, false]
3030
nagl: [true, false]

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33
files: ^pyproject.toml|openff|(^examples/((?!deprecated).)*$)|^docs|(^utilities/((?!deprecated).)*$)
44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
6-
rev: v0.15.9
6+
rev: v0.15.12
77
hooks:
88
- id: ruff-format
99
- id: ruff-check
@@ -14,6 +14,6 @@ repos:
1414
- id: blacken-docs
1515
files: ^docs/.*\.(rst|md)$
1616
- repo: https://github.com/tox-dev/pyproject-fmt
17-
rev: v2.21.0
17+
rev: v2.21.1
1818
hooks:
1919
- id: pyproject-fmt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
| :------ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
33
| **Latest Release** | [![Last release tag](https://img.shields.io/github/release-pre/openforcefield/openff-toolkit.svg)](https://github.com/openforcefield/openff-toolkit/releases) [![Commits since release](https://img.shields.io/github/commits-since/openforcefield/openff-toolkit/0.18.0.svg)](https://github.com/openforcefield/openff-toolkit/releases/tag/0.18.0)[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.17525527.svg)](https://doi.org/10.5281/zenodo.17525527)
44
| **Communication** | [![docs stable](https://img.shields.io/badge/docs-stable-5077AB.svg?logo=read%20the%20docs)](https://open-forcefield-toolkit.readthedocs.io/) [![user & dev discussions](https://img.shields.io/badge/user%20%26%20dev%20discussions-GitHub-red?logo=github)](https://github.com/openforcefield/discussions/discussions) |
5-
| **Foundation** | [![license](https://img.shields.io/github/license/openforcefield/openff-toolkit.svg)](https://opensource.org/licenses/MIT) [![platforms](https://img.shields.io/badge/Platforms-Linux%2C%20MacOS-orange.svg)](https://open-forcefield-toolkit.readthedocs.io/en/stable/installation.html) [![python](https://img.shields.io/badge/python-3.11%2C%203.12%2C%203.13-blue.svg)](https://open-forcefield-toolkit.readthedocs.io/en/stable/installation.html) [![Funding](https://img.shields.io/badge/Funding-Open%20Force%20Field%20Consortium-brightgreen.svg)](http://openforcefield.org) |
5+
| **Foundation** | [![license](https://img.shields.io/github/license/openforcefield/openff-toolkit.svg)](https://opensource.org/licenses/MIT) [![platforms](https://img.shields.io/badge/Platforms-Linux%2C%20MacOS-orange.svg)](https://open-forcefield-toolkit.readthedocs.io/en/stable/installation.html) [![python](https://img.shields.io/badge/python-3.12%2C%203.13-blue.svg)](https://open-forcefield-toolkit.readthedocs.io/en/stable/installation.html) [![Funding](https://img.shields.io/badge/Funding-Open%20Force%20Field%20Consortium-brightgreen.svg)](http://openforcefield.org) |
66
| **Installation** | [![Releases](https://img.shields.io/badge/obtain-latest-green.svg)](https://github.com/openforcefield/openff-toolkit/releases) [![Conda](https://img.shields.io/conda/v/conda-forge/openff-toolkit.svg)](https://anaconda.org/conda-forge/openff-toolkit) [![Last updated](https://anaconda.org/conda-forge/openff-toolkit/badges/latest_release_relative_date.svg)](https://anaconda.org/conda-forge/openff-toolkit) [![Anaconda Cloud downloads](https://anaconda.org/conda-forge/openff-toolkit/badges/downloads.svg)](https://anaconda.org/conda-forge/openff-toolkit) |
77

88
# The Open Force Field toolkit

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- sphinx-notfound-page
1414
- sphinx=6
1515
# conda build dependencies
16-
- python <3.13
16+
- python =3.12
1717
- setuptools
1818
- numpy
1919
- openmm

docs/releasehistory.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w
1616

1717
### Behavior changes
1818

19+
- [PR #2174](https://github.com/openforcefield/openff-toolkit/pull/2174): Drop support for Python 3.11
20+
1921
### Bugfixes
2022

2123
### New features

docs/users/developing.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ Widget state can also be saved programmatically by executing the notebook with [
427427
## Supported Python versions
428428

429429
The OpenFF Toolkit roughly follows [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html).
430-
As of April 2023 this means Python 3.9-3.10 are officially supported (3.11 is missing some upstream dependencies).
431430
We develop, test, and distribute on macOS and Linux-based operating systems.
432431
We do not currently support Windows.
433432
Some CI builds run using only RDKit as a backend, some run using only OpenEye Toolkits, and some run using both installed at once.
@@ -440,14 +439,12 @@ The CI matrix is currently as follows:
440439
+-----------------------+------------+-----------+-------------+------------+-----------+-------------+
441440
| | RDKit | OpenEye | RDKit + OE | RDKit | OpenEye | RDKit + OE |
442441
+=======================+============+===========+=============+============+===========+=============+
443-
| Python 3.8 and older | No support after April 2023 |
442+
| Python 3.11 and older | No support after April 2026 |
444443
+-----------------------+------------+-----------+-------------+------------+-----------+-------------+
445-
| Python 3.9 | **Test** | **Test** | **Test** | **Test** | **Test** | **Test** |
444+
| Python 3.12 | **Test** | **Test** | **Test** | **Test** | **Test** | **Test** |
446445
+-----------------------+------------+-----------+-------------+------------+-----------+-------------+
447-
| Python 3.10 | **Test** | Skip | Skip | **Test** | Skip | Skip |
446+
| Python 3.13 | **Test** | Skip | Skip | **Test** | Skip | Skip |
448447
+-----------------------+------------+-----------+-------------+------------+-----------+-------------+
449-
| Python 3.11 | **Test** | Skip | Skip | **Test** | Skip | Skip |
450-
+-----------------------+------------+-----------+-------------+------------+-----------+-------------+
451-
| Python 3.12 and newer | Pending official releases and upstream support |
448+
| Python 3.14 and newer | Pending official releases and upstream support |
452449
+-----------------------+------------+-----------+-------------+------------+-----------+-------------+
453450
```

openff/toolkit/topology/molecule.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
Any,
4141
Literal,
4242
TextIO,
43-
TypeAlias,
4443
TypeVar,
4544
Union,
4645
overload,
@@ -105,8 +104,8 @@
105104

106105
# TODO: These aliases are duplicated in a few places, might make sense to consolidate them
107106
# into a single location, but that'd weirdly nudge them towards first-class existence
108-
TKR: TypeAlias = ToolkitRegistry | ToolkitWrapper
109-
MoleculeLike: TypeAlias = Union["Molecule", "FrozenMolecule", "_SimpleMolecule"]
107+
type TKR = ToolkitRegistry | ToolkitWrapper
108+
type MoleculeLike = "Molecule" | "FrozenMolecule" | "_SimpleMolecule"
110109
FM = TypeVar("FM", bound="FrozenMolecule")
111110
P = TypeVar("P", bound="Particle")
112111
A = TypeVar("A", bound="Atom")

0 commit comments

Comments
 (0)