@@ -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