Skip to content

Commit 4027776

Browse files
author
Jens Kürten
committed
fix: wsgiref.types not available in python 3.10
1 parent 0080c43 commit 4027776

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

csfunctions/devserver.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@
3535
import os
3636
import time
3737
from collections.abc import Iterable
38-
from wsgiref.types import StartResponse, WSGIEnvironment
38+
from typing import TYPE_CHECKING
3939

4040
from werkzeug.serving import run_simple
4141
from werkzeug.wrappers import Request, Response
4242

4343
from csfunctions.handler import FunctionNotRegistered, execute
4444

45+
if TYPE_CHECKING:
46+
# these annotations are not available in python 3.10
47+
from wsgiref.types import StartResponse, WSGIEnvironment
48+
4549

4650
def _is_error_response(function_response: str | dict):
4751
"""

0 commit comments

Comments
 (0)