From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 4 May 2021 02:17:23 +0000 (-0700) Subject: fix enum and backslash warnings (GH-25861) (GH-25871) X-Git-Tag: v3.10.0b2~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d194e1eb93e0ab47b63190eeae0dd6dde63ea34d;p=thirdparty%2FPython%2Fcpython.git fix enum and backslash warnings (GH-25861) (GH-25871) - Enum warning in test_faulthandler - backslash warning in test_ipaddress (cherry picked from commit 652bcd9f9cd2ed89b5fa958f8456556aa43b48cc) Co-authored-by: Ethan Furman Co-authored-by: Ethan Furman --- diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 648624482e55..29a70857930c 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -663,7 +663,7 @@ class FaultHandlerTests(unittest.TestCase): import sys all_threads = {all_threads} - signum = {signum} + signum = {signum:d} unregister = {unregister} chain = {chain} filename = {filename!r} diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py index cdd9880c3c17..90559ce1242c 100644 --- a/Lib/test/test_ipaddress.py +++ b/Lib/test/test_ipaddress.py @@ -97,7 +97,7 @@ class CommonTestMixin_v4(CommonTestMixin): def test_leading_zeros(self): # bpo-36384: no leading zeros to avoid ambiguity with octal notation - msg = "Leading zeros are not permitted in '\d+'" + msg = "Leading zeros are not permitted in '\\d+'" addresses = [ "000.000.000.000", "192.168.000.001",