set stacklevel for oauth_scopes deprecation warning

so it's visible where the deprecated API is called
This commit is contained in:
Min RK
2022-10-05 16:07:48 -07:00
parent 7a6c2038d8
commit 63c391641a

View File

@@ -349,7 +349,9 @@ class HubAuth(SingletonConfigurable):
@property
def oauth_scopes(self):
warnings.warn(
"HubAuth.oauth_scopes is deprecated in JupyterHub 3.0. Use .access_scopes"
"HubAuth.oauth_scopes is deprecated in JupyterHub 3.0. Use .access_scopes",
DeprecationWarning,
stacklevel=2,
)
return self.access_scopes