Skip to content

Pin Python below 3.14 to resolve OpenFF-related CI failures - #87

Merged
timbernat merged 4 commits into
mainfrom
openff-deps-pin
Jun 26, 2026
Merged

Pin Python below 3.14 to resolve OpenFF-related CI failures #87
timbernat merged 4 commits into
mainfrom
openff-deps-pin

Conversation

@timbernat

@timbernat timbernat commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR is a quick resolution to the repo-wide CI failures (beginning between 06/20 to 06/23) due to type errors caused by the interaction of Pydantic and openff.units within the openff-toolkit, as referenced in this PR.

Directly from the OpenFF maintainers:

Matt Thompson:
Pydantic 2.12 broke our ecosystem a few months ago and we've been (successfully!) down-pinning against it since then. The fulcrum of failure is combining openff.toolkit.Quantity with pydantic.BaseModel, which ends up with verbose and somewhat cryptic errors from Pydantic about arbitrary types not being allowed and/or schema not being defined on the Quantity class.
I have drafts of changes that will get our software working on 2.12+, which I hope to release early in July. If this sounds like it impacts you, please test my changes by installing against the two PRs below. An example of how to do this in conda environments can be found here. (So far, our ecosystem-level tests have not given us surprises!)

Mike Henry:
I wouldn't try using openff-toolkit with python 3.14 right now
The issue is probably some missing from future import annotations in the source code if you do want to hack on it
We have a bootstrapping problem with python 3.14 support, it is hard for us to test it and support it when our dependencies don't support python 3.14, so when support starts getting unblocked then we can start fixing it and supporting it.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • Update all shipped conda envs to pin Python >=3.12,<3.14
  • Fix repo-wide CI failures on notebook examples

Status

  • Update conda env YAMLs
  • Verify this change permits nbval notebook tests to pass again
  • Resolve examples #25

dwhswenson
dwhswenson previously approved these changes Jun 26, 2026

@dwhswenson dwhswenson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing blocking, but gentle recommendation to put the "why we pinned" as comments on the same line as the pin. It's less of a hassle later. (But better to explain than not to!)

Marking approve; changes optional.

Comment thread devtools/conda-envs/dev-env.yml Outdated
Comment thread devtools/conda-envs/release-env.yml Outdated
Comment thread devtools/conda-envs/test-env.yaml Outdated
Comment thread devtools/conda-envs/light-env.yml Outdated
Co-authored-by: David W.H. Swenson <david.swenson@omsf.io>
@timbernat

timbernat commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

@dwhswenson Thanks for the swift review! I've tested locally that this pin passes CI, but that won't reflect in this PR since the CI config in main is what will get run for testing (good security, but annoying for debug); am I clear to override and merge to check tests pass on that?

@timbernat
timbernat merged commit 378948b into main Jun 26, 2026
0 of 4 checks passed
@timbernat
timbernat deleted the openff-deps-pin branch June 26, 2026 02:24
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.

2 participants