Skip to content

Commit 02030e9

Browse files
committed
Merge remote-tracking branch into oauth2
2 parents 9013cb0 + e724682 commit 02030e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

msal/oauth2cli/authcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def obtain_auth_code(listen_port, auth_uri=None):
3737
:return: Hang indefinitely, until it receives and then return the auth code.
3838
"""
3939
exit_hint = "Visit http://localhost:{p}?code=exit to abort".format(p=listen_port)
40-
logger.warn(exit_hint)
40+
logger.warning(exit_hint)
4141
if auth_uri:
4242
page = "http://localhost:{p}?{q}".format(p=listen_port, q=urlencode({
4343
"text": "Open this link to sign in. You may use incognito window",

tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def load_conf(filename):
4949
with open(filename) as f:
5050
conf = json.load(f)
5151
except:
52-
logger.warn("Unable to open/read JSON configuration %s" % filename)
52+
logger.warning("Unable to open/read JSON configuration %s" % filename)
5353
raise
5454
openid_configuration = {}
5555
try:
@@ -59,7 +59,7 @@ def load_conf(filename):
5959
discovery_uri = conf["oidp"] + '/.well-known/openid-configuration'
6060
openid_configuration.update(requests.get(discovery_uri).json())
6161
except:
62-
logger.warn("openid-configuration uri not accesible: %s", discovery_uri)
62+
logger.warning("openid-configuration uri not accesible: %s", discovery_uri)
6363
openid_configuration.update(conf.get("openid_configuration", {}))
6464
if openid_configuration.get("device_authorization_endpoint"):
6565
# The following urljoin(..., ...) trick allows a "path_name" shorthand
@@ -143,10 +143,10 @@ def test_device_flow(self):
143143
"enter the code {user_code} to authenticate.".format(**flow))
144144
except KeyError: # Some IdP might not be standard compliant
145145
msg = flow["message"] # Not a standard parameter though
146-
logger.warn(msg) # We avoid print(...) b/c its output would be buffered
146+
logger.warning(msg) # Avoid print(...) b/c its output would be buffered
147147

148148
duration = 30
149-
logger.warn("We will wait up to %d seconds for you to sign in" % duration)
149+
logger.warning("We will wait up to %d seconds for you to sign in" % duration)
150150
flow["expires_at"] = time.time() + duration # Shorten the time for quick test
151151
result = self.client.obtain_token_by_device_flow(flow)
152152
self.assertLoosely(

0 commit comments

Comments
 (0)