From 176fac7360f3797cb637d8fd9d90ba05c3fbe548 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 28 Jul 2023 14:20:05 -0400 Subject: [PATCH] Work in Python 3.8. --- src/allmydata/storage/http_server.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/allmydata/storage/http_server.py b/src/allmydata/storage/http_server.py index cf0e6dbb4..66b0dd6de 100644 --- a/src/allmydata/storage/http_server.py +++ b/src/allmydata/storage/http_server.py @@ -4,7 +4,17 @@ HTTP server for storage. from __future__ import annotations -from typing import Any, Callable, Union, cast, Optional, TypeVar, Sequence, Protocol +from typing import ( + Any, + Callable, + Union, + cast, + Optional, + TypeVar, + Sequence, + Protocol, + Dict, +) from typing_extensions import ParamSpec, Concatenate from functools import wraps from base64 import b64decode @@ -115,7 +125,7 @@ class BaseApp(Protocol): P = ParamSpec("P") T = TypeVar("T") -SecretsDict = dict[Secrets, bytes] +SecretsDict = Dict[Secrets, bytes] App = TypeVar("App", bound=BaseApp)