Skip to content

Commit dc05f3a

Browse files
committed
feat: Add DeprecationWarning when wrong type passed as http client session
1 parent 9e3667d commit dc05f3a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

xbox/webapi/authentication/manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ def __init__(
3333
redirect_uri: str,
3434
scopes: Optional[List[str]] = None,
3535
):
36+
if not isinstance(client_session, (SignedSession, httpx.AsyncClient)):
37+
raise DeprecationWarning(
38+
"""Xbox WebAPI changed to use SignedSession (wrapped httpx.AsyncClient).
39+
Please check the documentation"""
40+
)
41+
3642
self.session: SignedSession = client_session
3743
self._client_id: str = client_id
3844
self._client_secret: str = client_secret

0 commit comments

Comments
 (0)