Skip to content

Conversation

@anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Oct 13, 2025

Update the codebase to be compatible with Python 3.14. This just involved bumping some dependency versions. Builds on the Pydantic v2 work (#19071) from @V02460.

pyO3 was updated from 0.25.1 -> 0.26.0 using the migration guide.

For the other dependency bumps, see each commit for its explanation.

Edit: Actually, the pyO3 version bump shouldn't be required as pyO3 0.25.0 supports Python 3.14. The portdb failing workflow which prompted me to bump it is somehow using pyO3 0.24.1, even though our Cargo.toml states pyO3 0.25.1. So I have no idea what's going on there. Caching perhaps?

Yep, looks like caching. Explained in #19117 (comment). I'm minded to keep the pyO3 version bump, especially as nearly all Linux distros that package pyO3 have 0.26.0+, instead of 0.25.0+.

Fixes #19122. Should address #19117.

@anoadragon453 anoadragon453 changed the title Try Python 3.14 in CI Python 3.14 support Oct 31, 2025
zope-interface 8.0.0 was the first to introduce support for Python 3.14.
On the previous version, we received a segfault when running tests. This
was due to `jsonschema`, which is one of the packages that has rpds-py
as a dependency. I've filed an upstream bug to have them raise the
minimum supported `rpds-py` version:
python-jsonschema/jsonschema#1426. That issue
also includes more details on the segfault, if you're curious.

0.25.0 is the first version to support Python 3.14, which we now
support. Hence making it the minimum.
Comment on lines +174 to +177
# 0.25.0 is the first version to support Python 3.14.
# We can remove this once https://github.com/python-jsonschema/jsonschema/issues/1426 is fixed
# and included in a release.
rpds-py = ">=0.25.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

python-jsonschema/jsonschema#1426 is now fixed but I don't see a recent release so I'm guessing we still need this

@@ -0,0 +1 @@
Add support for Python 3.14. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this fixes #19117

(update PR description)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that will be fixed by just clearing our caches (or otherwise getting CI to use the right PyO3 version (0.25.0+)). But this PR will invalidate the Rust cache, so technically it'll likely fix it too.

I'd like to merge this PR and check CI passes with the old runner before closing that issue.

@@ -0,0 +1 @@
Add support for Python 3.14. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this fixes #19122

(update PR description)

Copy link
Member Author

@anoadragon453 anoadragon453 Nov 3, 2025

Choose a reason for hiding this comment

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

That will be fixed by updating zope-interface, yes.

@anoadragon453 anoadragon453 merged commit 69bab78 into develop Nov 3, 2025
44 checks passed
@anoadragon453 anoadragon453 deleted the anoa/python_3_14 branch November 3, 2025 11:54
Comment on lines 38 to 39
# For PRs, we only run each type of test with the oldest Python version supported (which
# is Python 3.10 right now)
Copy link
Contributor

Choose a reason for hiding this comment

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

This behavior means it's hard to catch when things are going wrong in the latest Python versions -> #19132

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.

check-sampleconfig CI job failing: zope.interface.exceptions.InvalidInterface: Concrete attribute, __classdictcell__

3 participants