Skip to content

Commit

Permalink
Use typing_extensions and mock for Python 3.7 Protocol support
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders committed Sep 16, 2022
1 parent 561180e commit 31f7476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connexion/middleware/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pathlib
import typing as t

import typing_extensions as te
from starlette.types import ASGIApp, Receive, Scope, Send

from connexion.apis.abstract import AbstractSpecAPI
Expand All @@ -27,7 +28,7 @@ def add_api(
pass


class RoutedOperation(t.Protocol):
class RoutedOperation(te.Protocol):
def __init__(self, next_app: ASGIApp, **kwargs) -> None:
...

Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def read_version(package):
'werkzeug>=2.2.1,<3',
'starlette>=0.15,<1',
'httpx>=0.15,<1',
'typing-extensions>=4,<5',
'mock>=3,<4'
]

swagger_ui_require = 'swagger-ui-bundle>=0.0.2,<0.1'
Expand Down

0 comments on commit 31f7476

Please sign in to comment.