From 0d070597b482cafa8db814e9c8e74bf5f2a11c34 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Wed, 10 May 2023 19:21:47 -0300 Subject: [PATCH] style: Double backslashes in strings Not sure why, but if I change the DeprecationWarning filter to "error", I get a SyntaxError from the \[ because it is an invalid escape sequence. Not sure why that change triggers it, but "\[" and "\\[" are the same, so this is a no-op. --- ietf/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index 5af6c7530..c08918c7e 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -13,11 +13,11 @@ import warnings from typing import Any, Dict, List, Tuple # pyflakes:ignore warnings.simplefilter("always", DeprecationWarning) -warnings.filterwarnings("ignore", message="'urllib3\[secure\]' extra is deprecated") -warnings.filterwarnings("ignore", message="The logout\(\) view is superseded by") +warnings.filterwarnings("ignore", message="'urllib3\\[secure\\]' extra is deprecated") +warnings.filterwarnings("ignore", message="The logout\\(\\) view is superseded by") warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report") warnings.filterwarnings("ignore", message="Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated", module="bleach") -warnings.filterwarnings("ignore", message="HTTPResponse.getheader\(\) is deprecated", module='selenium.webdriver') +warnings.filterwarnings("ignore", message="HTTPResponse.getheader\\(\\) is deprecated", module='selenium.webdriver') try: import syslog syslog.openlog(str("datatracker"), syslog.LOG_PID, syslog.LOG_USER)