diff --git a/plugins/yjs/fps_yjs/routes.py b/plugins/yjs/fps_yjs/routes.py index eed7bf3d..957f900f 100644 --- a/plugins/yjs/fps_yjs/routes.py +++ b/plugins/yjs/fps_yjs/routes.py @@ -1,10 +1,8 @@ import asyncio -import re from datetime import datetime from pathlib import Path -from typing import Optional, Set, Tuple +from typing import Optional, Tuple -import fastapi from fastapi import APIRouter, Depends, WebSocketDisconnect from fps.hooks import register_router # type: ignore from fps_contents.routes import read_content, write_content # type: ignore @@ -27,14 +25,6 @@ class JupyterSQLiteYStore(SQLiteYStore): router = APIRouter() -def get_path_param_names(path: str) -> Set[str]: - return {name.split(":")[0] for name in re.findall("{(.*?)}", path)} - - -# FIXME: remove the patch when https://github.com/tiangolo/fastapi/pull/3879 is merged -fastapi.utils.get_path_param_names.__code__ = get_path_param_names.__code__ - - def to_datetime(iso_date: str) -> datetime: return datetime.fromisoformat(iso_date.rstrip("Z")) diff --git a/setup.cfg b/setup.cfg index ddf2ffc3..8b15160f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,6 +22,7 @@ package_dir = python_requires = >=3.7 install_requires = + fastapi >=0.82.0 fps >=0.0.19 fps-uvicorn >=0.0.19 fps-contents