From 5262931dcfbff0d78bc044bda0de9469abe438b9 Mon Sep 17 00:00:00 2001 From: Andrew Gorcester Date: Tue, 20 Nov 2018 12:57:25 -0800 Subject: [PATCH] Fix deprecation warning [(#1801)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1801) logging.warn -> logging.warning to fix "DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead" --- samples/snippets/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/handler.py b/samples/snippets/handler.py index 9986eab85..7b4e50f21 100644 --- a/samples/snippets/handler.py +++ b/samples/snippets/handler.py @@ -36,7 +36,7 @@ def use_logging_handler(): text = 'Hello, world!' # Emits the data using the standard logging module - logging.warn(text) + logging.warning(text) # [END logging_handler_usage] print('Logged: {}'.format(text))