8000 fix: Replace deprecated .warn method with .warning (#34057) · openedx/edx-platform@780e908 · GitHub
[go: up one dir, main page]

Skip to content

Commit 780e908

Browse files
authored
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 python/cpython#105377 `logging.Logger.warning` is the preferred and recommended way to log warnings. Fixes openedx/public-engineering#149 Co-authored-by: Lewis M. Kabui <lewisemm@users.noreply.github.com>
1 parent 692b3ac commit 780e908

File tree

1 file changed

+1
-1
lines changed
  • openedx/core/djangoapps/user_authn/views

1 file changed

+1
-1
lines changed

openedx/core/djangoapps/user_authn/views/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def _check_user_auth_flow(site, user):
402402
# we don't record their e-mail in case there is sensitive info accidentally
403403
# in there.
404404
set_custom_attribute('login_tpa_domain_shortcircuit_user_id', user.id)
405-
log.warn("User %s has nonstandard e-mail. Shortcircuiting THIRD_PART_AUTH_ONLY_DOMAIN check.", user.id) # lint-amnesty, pylint: disable=deprecated-method
405+
log.warning("User %s has nonstandard e-mail. Shortcircuiting THIRD_PART_AUTH_ONLY_DOMAIN check.", user.id)
406406
return
407407
user_domain = email_parts[1].strip().lower()
408408

0 commit comments

Comments
 (0)
0