Skip to content

Commit bce9a50

Browse files
authored
Remove asgiref run-time dependency (#1183)
1 parent e51a344 commit bce9a50

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [UNRELEASED] - YYYY-MM-DD
99

10+
### Breaking Changes
11+
12+
### New features
13+
14+
### Bug fixes
15+
16+
### Other changes
17+
18+
* Closed #1178: Removed run-time dependency on asgiref. (#1183)
1019

1120
## [0.8.0] - 2024-03-04
1221

shiny/_autoreload.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
import secrets
99
import threading
1010
import webbrowser
11-
from typing import Callable, Optional, cast
12-
13-
import starlette.types
14-
from asgiref.typing import (
15-
ASGI3Application,
16-
ASGIReceiveCallable,
17-
ASGISendCallable,
18-
ASGISendEvent,
19-
HTTPResponseStartEvent,
20-
Scope,
21-
)
11+
from typing import TYPE_CHECKING, Callable, Optional, cast
12+
13+
if TYPE_CHECKING:
14+
import starlette.types
15+
from asgiref.typing import (
16+
ASGI3Application,
17+
ASGIReceiveCallable,
18+
ASGISendCallable,
19+
ASGISendEvent,
20+
HTTPResponseStartEvent,
21+
Scope,
22+
)
2223

2324
from ._hostenv import get_proxy_url
2425

0 commit comments

Comments
 (0)