@@ -220,8 +220,8 @@ netaddr = ">=0.7.18"
220220Jinja2 = " >=3.0"
221221# 3.2.0 updates collections.abc imports to avoid Python 3.10 incompatibility.
222222bleach = " >=3.2.0"
223- # We use `assert_never`, which were added in ` typing-extensions` 4.1.
224- typing-extensions = " >=4.1"
223+ # pydantic 2.12 depends on typing-extensions>=4.14.1
224+ typing-extensions = " >=4.14. 1"
225225# We enforce that we have a `cryptography` version that bundles an `openssl`
226226# with the latest security patches.
227227cryptography = " >=3.4.7"
@@ -230,9 +230,10 @@ ijson = ">=3.1.4"
230230matrix-common = " ^1.3.0"
231231# We need packaging.verison.Version(...).major added in 20.0.
232232packaging = " >=20.0"
233- # We support pydantic v1 and pydantic v2 via the pydantic.v1 compat module.
234- # See https://github.com/matrix-org/synapse/issues/15858
235- pydantic = " >=1.7.4, <3"
233+ pydantic = [
234+ { version = " ~=2.8" , python = " <3.14" },
235+ { version = " ~=2.12" , python = " >=3.14" },
236+ ]
236237
237238# This is for building the rust components during "poetry install", which
238239# currently ignores the `build-system.requires` directive (c.f.
@@ -335,8 +336,6 @@ all = [
335336# can bump versions without having to update the content-hash in the lockfile.
336337# This helps prevents merge conflicts when running a batch of dependabot updates.
337338ruff = " 0.12.10"
338- # Type checking only works with the pydantic.v1 compat module from pydantic v2
339- pydantic = " ^2"
340339
341340# Typechecking
342341lxml-stubs = " >=0.4.0"
0 commit comments