Skip to content

Commit f99beef

Browse files
authored
Fix deprecation warning
In sagemath, while doctesting `src/sage/repl/ipython_kernel/install.py`: > DeprecationWarning: invalid escape sequence '\s' The solution is to make the regex a raw string.
1 parent 3e0e92d commit f99beef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/auth/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def set_login_cookie(cls, handler, user_id=None):
112112
handler.set_secure_cookie(handler.cookie_name, user_id, **cookie_options)
113113
return user_id
114114

115-
auth_header_pat = re.compile('token\s+(.+)', re.IGNORECASE)
115+
auth_header_pat = re.compile(r'token\s+(.+)', re.IGNORECASE)
116116

117117
@classmethod
118118
def get_token(cls, handler):

0 commit comments

Comments
 (0)