From ab13931014a0b4d6d5bc66bd6192e44a38ce2bac Mon Sep 17 00:00:00 2001 From: Daniel Harding Date: Thu, 5 Sep 2024 14:08:01 +0300 Subject: [PATCH] Fix SyntaxWarning from update message The use of backslashes in the ASCII-art "Update" banner results in an "invalid escape sequence" SyntaxWarning under Python 3.12. Fix by changing the banner string to a raw string (which ignores backslashes). --- notebook/notebookapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 5c00d18f80..16f9513f1f 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -185,7 +185,7 @@ def __init__(self, jupyter_app, kernel_manager, contents_manager, if settings['autoreload']: log.info('Autoreload enabled: the webapp will restart when any Python src file changes.') - print(""" + print(r""" _ _ _ _ | | | |_ __ __| |__ _| |_ ___ | |_| | '_ \/ _` / _` | _/ -_)