diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-10 01:34:22 +0300 |
|---|---|---|
| committer | Gregory P. Smith <greg@krypto.org> | 2019-08-09 15:34:22 -0700 |
| commit | 4c5b6bac2408f879231c7cd38d67657dd4804e7c (patch) | |
| tree | 71c68d4bea17e42da6f071920c48c2492c77fe38 /Lib/test/test_fstring.py | |
| parent | 217077440a6938a0b428f67cfef6e053c4f8673c (diff) | |
| download | cpython-git-4c5b6bac2408f879231c7cd38d67657dd4804e7c.tar.gz | |
[3.8] bpo-32912: Revert SyntaxWarning on invalid escape sequences (GH-15142)
* bpo-32912: Revert warnings for invalid escape sequences.
DeprecationWarning will continue to be emitted for invalid escape sequences in string and bytes literals in 3.8 just as it did in 3.7.
SyntaxWarning may be emitted in the future. But per mailing list discussion, we don't yet know when because we haven't settled on how to do so in a non-disruptive manner.
Diffstat (limited to 'Lib/test/test_fstring.py')
| -rw-r--r-- | Lib/test/test_fstring.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index fb761441fc..49663923e7 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -649,7 +649,7 @@ non-important content self.assertEqual(f'2\x203', '2 3') self.assertEqual(f'\x203', ' 3') - with self.assertWarns(SyntaxWarning): # invalid escape sequence + with self.assertWarns(DeprecationWarning): # invalid escape sequence value = eval(r"f'\{6*7}'") self.assertEqual(value, '\\42') self.assertEqual(f'\\{6*7}', '\\42') |
