fix: Replace deprecated .warn method with .warning (#34057)
The `logging.Logger.warn` method has been deprecated since Python 3.3 and is due to be removed all together in Python 3.13. See https://github.com/python/cpython/pull/105377 `logging.Logger.warning` is the preferred and recommended way to log warnings. Fixes https://github.com/openedx/public-engineering/issues/149 Co-authored-by: Lewis M. Kabui <lewisemm@users.noreply.github.com>
This commit is contained in:
@@ -402,7 +402,7 @@ def _check_user_auth_flow(site, user):
|
||||
# we don't record their e-mail in case there is sensitive info accidentally
|
||||
# in there.
|
||||
set_custom_attribute('login_tpa_domain_shortcircuit_user_id', user.id)
|
||||
log.warn("User %s has nonstandard e-mail. Shortcircuiting THIRD_PART_AUTH_ONLY_DOMAIN check.", user.id) # lint-amnesty, pylint: disable=deprecated-method
|
||||
log.warning("User %s has nonstandard e-mail. Shortcircuiting THIRD_PART_AUTH_ONLY_DOMAIN check.", user.id)
|
||||
return
|
||||
user_domain = email_parts[1].strip().lower()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user