Skip to content

Commit f4b892c

Browse files
committed
Removing lazy import
1 parent e0fa539 commit f4b892c

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

bluesky_httpserver/app.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from fastapi.openapi.utils import get_openapi
1717

1818
from .authentication import ExternalAuthenticator, InternalAuthenticator
19+
from .authenticators import ProxiedOIDCAuthenticator
1920
from .console_output import CollectPublishedConsoleOutput, ConsoleOutputStream, SystemInfoStream
2021
from .core import PatchedStreamingResponse
2122
from .database.core import purge_expired
@@ -181,11 +182,6 @@ def build_app(authentication=None, api_access=None, resource_access=None, server
181182
# Authenticators provide Router(s) for their particular flow.
182183
# Collect them in the authentication_router.
183184

184-
# Lazy import: avoid importing authenticators at module import time so
185-
# that lightweight test doubles that pass fake authenticators don't
186-
# need heavy optional dependencies (e.g. python-jose, httpx).
187-
from .authenticators import ProxiedOIDCAuthenticator
188-
189185
for spec in authentication["providers"]:
190186
provider = spec["provider"]
191187
authenticator = spec["authenticator"]

bluesky_httpserver/database/orm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class Session(Timestamped, Base):
182182
# Free-form state supplied by the authenticator via UserSessionState.state
183183
# (e.g. an upstream OIDC access_token/refresh_token for OBO exchange).
184184
# Persisted so it survives across refresh_session calls; the values are
185-
# available to downstream services through Tiled access tokens.
185+
# available to downstream services through access tokens.
186186
state = Column(JSON, nullable=False, default=dict, server_default="{}")
187187

188188
principal = relationship("Principal", back_populates="sessions")

0 commit comments

Comments
 (0)