From d4230c05359b946413857e0291895bdc2ee7d462 Mon Sep 17 00:00:00 2001 From: David Brochart Date: Tue, 2 Jan 2024 09:39:31 +0100 Subject: [PATCH 1/2] Update pycrdt >=0.8.2 --- plugins/yjs/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/yjs/pyproject.toml b/plugins/yjs/pyproject.toml index 54b6dbe9..0895b4bd 100644 --- a/plugins/yjs/pyproject.toml +++ b/plugins/yjs/pyproject.toml @@ -8,7 +8,7 @@ description = "An FPS plugin for the Yjs API" keywords = [ "jupyter", "server", "fastapi", "plugins" ] requires-python = ">=3.8" dependencies = [ - "pycrdt >=0.7.2,<0.8.0", + "pycrdt >=0.8.2,<0.9.0", "jupyverse-api >=0.1.2,<1", ] dynamic = [ "version",] From 21709614679f69352c9fa971e601777b73dc89de Mon Sep 17 00:00:00 2001 From: David Brochart Date: Tue, 2 Jan 2024 11:38:45 +0100 Subject: [PATCH 2/2] Fix typing --- jupyverse_api/jupyverse_api/exceptions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jupyverse_api/jupyverse_api/exceptions.py b/jupyverse_api/jupyverse_api/exceptions.py index 81bc916e..7302b40e 100644 --- a/jupyverse_api/jupyverse_api/exceptions.py +++ b/jupyverse_api/jupyverse_api/exceptions.py @@ -1,4 +1,6 @@ -from fastapi import Request, Response +from typing import cast + +from fastapi import Request from fastapi.responses import RedirectResponse @@ -7,5 +9,6 @@ def __init__(self, redirect_to: str): self.redirect_to = redirect_to -async def _redirect_exception_handler(request: Request, exc: RedirectException) -> Response: +async def _redirect_exception_handler(request: Request, exc: Exception) -> RedirectResponse: + exc = cast(RedirectException, exc) return RedirectResponse(url=exc.redirect_to)