@@ -322,27 +322,31 @@ def get_attribute_value(self, django_field, attributes, attribute_mapping):
322
322
warnings .warn (
323
323
"get_attribute_value() is deprecated, look at the Saml2Backend on how to subclass it" ,
324
324
DeprecationWarning ,
325
+ stacklevel = 2 ,
325
326
)
326
327
return self ._get_attribute_value (django_field , attributes , attribute_mapping )
327
328
328
329
def get_django_user_main_attribute (self ):
329
330
warnings .warn (
330
331
"get_django_user_main_attribute() is deprecated, look at the Saml2Backend on how to subclass it" ,
331
332
DeprecationWarning ,
333
+ stacklevel = 2 ,
332
334
)
333
335
return self ._user_lookup_attribute
334
336
335
337
def get_django_user_main_attribute_lookup (self ):
336
338
warnings .warn (
337
339
"get_django_user_main_attribute_lookup() is deprecated, look at the Saml2Backend on how to subclass it" ,
338
340
DeprecationWarning ,
341
+ stacklevel = 2 ,
339
342
)
340
343
return getattr (settings , "SAML_DJANGO_USER_MAIN_ATTRIBUTE_LOOKUP" , "" )
341
344
342
345
def get_user_query_args (self , main_attribute ):
343
346
warnings .warn (
344
347
"get_user_query_args() is deprecated, look at the Saml2Backend on how to subclass it" ,
345
348
DeprecationWarning ,
349
+ stacklevel = 2 ,
346
350
)
347
351
return {
348
352
self .get_django_user_main_attribute ()
@@ -353,20 +357,23 @@ def configure_user(self, user, attributes, attribute_mapping):
353
357
warnings .warn (
354
358
"configure_user() is deprecated, look at the Saml2Backend on how to subclass it" ,
355
359
DeprecationWarning ,
360
+ stacklevel = 2 ,
356
361
)
357
362
return self ._update_user (user , attributes , attribute_mapping )
358
363
359
364
def update_user (self , user , attributes , attribute_mapping , force_save = False ):
360
365
warnings .warn (
361
366
"update_user() is deprecated, look at the Saml2Backend on how to subclass it" ,
362
367
DeprecationWarning ,
368
+ stacklevel = 2 ,
363
369
)
364
370
return self ._update_user (user , attributes , attribute_mapping )
365
371
366
372
def _set_attribute (self , obj , attr , value ):
367
373
warnings .warn (
368
374
"_set_attribute() is deprecated, look at the Saml2Backend on how to subclass it" ,
369
375
DeprecationWarning ,
376
+ stacklevel = 2 ,
370
377
)
371
378
return set_attribute (obj , attr , value )
372
379
@@ -375,5 +382,6 @@ def get_saml_user_model():
375
382
warnings .warn (
376
383
"_set_attribute() is deprecated, look at the Saml2Backend on how to subclass it" ,
377
384
DeprecationWarning ,
385
+ stacklevel = 2 ,
378
386
)
379
387
return Saml2Backend ()._user_model
0 commit comments