diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e74514d8..9a3f6fe95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] - YYYY-MM-DD +### Breaking Changes + +### New features + +### Bug fixes + +### Other changes + +* Closed #1178: Removed run-time dependency on asgiref. (#1183) ## [0.8.0] - 2024-03-04 diff --git a/shiny/_autoreload.py b/shiny/_autoreload.py index 255ceb9ab..b9c3646dd 100644 --- a/shiny/_autoreload.py +++ b/shiny/_autoreload.py @@ -8,17 +8,18 @@ import secrets import threading import webbrowser -from typing import Callable, Optional, cast - -import starlette.types -from asgiref.typing import ( - ASGI3Application, - ASGIReceiveCallable, - ASGISendCallable, - ASGISendEvent, - HTTPResponseStartEvent, - Scope, -) +from typing import TYPE_CHECKING, Callable, Optional, cast + +if TYPE_CHECKING: + import starlette.types + from asgiref.typing import ( + ASGI3Application, + ASGIReceiveCallable, + ASGISendCallable, + ASGISendEvent, + HTTPResponseStartEvent, + Scope, + ) from ._hostenv import get_proxy_url