diff options
author | Maxwell G <maxwell@gtmx.me> | 2023-09-25 10:19:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 15:19:08 +0000 |
commit | 12611bfcddfe87e3bad90ef96a648acc2f1cebf3 (patch) | |
tree | 9d67371d56f1904f3098e9bf7668db71a8b631cc /pyproject.toml | |
parent | Bump cryptography from 41.0.3 to 41.0.4 (#16362) (diff) | |
download | synapse-12611bfcddfe87e3bad90ef96a648acc2f1cebf3.tar.xz |
Add support for pydantic v2 via pydantic.v1 compat module (#16332)
While maintaining support with pydantic v1.
Diffstat (limited to 'pyproject.toml')
-rw-r--r-- | pyproject.toml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pyproject.toml b/pyproject.toml index f69336a73f..ea55d81b13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -209,11 +209,11 @@ cryptography = ">=3.4.7" # ijson 3.1.4 fixes a bug with "." in property names ijson = ">=3.1.4" matrix-common = "^1.3.0" -# We need packaging.requirements.Requirement, added in 16.1. -packaging = ">=16.1" -# This is the most recent version of Pydantic with available on common distros. -# We are currently incompatible with >=2.0.0: (https://github.com/matrix-org/synapse/issues/15858) -pydantic = "^1.7.4" +# We need packaging.verison.Version(...).major added in 20.0. +packaging = ">=20.0" +# We support pydantic v1 and pydantic v2 via the pydantic.v1 compat module. +# See https://github.com/matrix-org/synapse/issues/15858 +pydantic = ">=1.7.4, <3" # This is for building the rust components during "poetry install", which # currently ignores the `build-system.requires` directive (c.f. @@ -321,6 +321,8 @@ all = [ isort = ">=5.10.1" black = ">=22.7.0" ruff = "0.0.290" +# Type checking only works with the pydantic.v1 compat module from pydantic v2 +pydantic = "^2" # Typechecking lxml-stubs = ">=0.4.0" |