From 029cfaf046f720b632f279d19fad8bbb57d1aade Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 15 Feb 2023 22:57:14 +0000 Subject: [PATCH] Pull in updated canonicaljson lib so the protocol check just works --- poetry.lock | 6 +++--- synapse/__init__.py | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5ffb592d835a..6956c651f41e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -147,14 +147,14 @@ dev = ["Sphinx (==4.3.2)", "black (==22.3.0)", "build (==0.8.0)", "flake8 (==4.0 [[package]] name = "canonicaljson" -version = "1.6.4" +version = "1.6.5" description = "Canonical JSON" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "canonicaljson-1.6.4-py3-none-any.whl", hash = "sha256:55d282853b4245dbcd953fe54c39b91571813d7c44e1dbf66e3c4f97ff134a48"}, - {file = "canonicaljson-1.6.4.tar.gz", hash = "sha256:6c09b2119511f30eb1126cfcd973a10824e20f1cfd25039cde3d1218dd9c8d8f"}, + {file = "canonicaljson-1.6.5-py3-none-any.whl", hash = "sha256:806ea6f2cbb7405d20259e1c36dd1214ba5c242fa9165f5bd0bf2081f82c23fb"}, + {file = "canonicaljson-1.6.5.tar.gz", hash = "sha256:68dfc157b011e07d94bf74b5d4ccc01958584ed942d9dfd5fdd706609e81cd4b"}, ] [package.dependencies] diff --git a/synapse/__init__.py b/synapse/__init__.py index d2b8758f9689..fbfd506a43d0 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -64,9 +64,7 @@ try: from canonicaljson import set_json_library - # type-ignore: I think there has been a regression in mypy 1.0.0 in how it checks - # modules against Protocols. - set_json_library(json) # type: ignore[arg-type] + set_json_library(json) except ImportError: pass