]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-139646: fix typo in `pickletools` error message (GH-139647) (GH-139650)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 7 Oct 2025 18:19:24 +0000 (20:19 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 18:19:24 +0000 (20:19 +0200)
(cherry picked from commit 36a6c2cdfaddc4a82d14f2c84b04e05089802876)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
Lib/pickletools.py
Lib/test/test_pickletools.py

index 33a51492ea9c3b04e068aa41ac30f14c225f10c5..2ca6f2817c4975776697dbebf982c8ff8dc68bf4 100644 (file)
@@ -348,7 +348,7 @@ def read_stringnl(f, decode=True, stripquotes=True, *, encoding='latin-1'):
         for q in (b'"', b"'"):
             if data.startswith(q):
                 if not data.endswith(q):
-                    raise ValueError("strinq quote %r not found at both "
+                    raise ValueError("string quote %r not found at both "
                                      "ends of %r" % (q, data))
                 data = data[1:-1]
                 break
index 5cb9ce430b465797cbee53c1cf73bceadfa53b64..851bde5fde07f6930afe6ad6c24f36de6d22977b 100644 (file)
@@ -394,13 +394,13 @@ highest protocol among opcodes = 0
         self.check_dis_error(b'Sabc"\n.', '',
                              "no string quotes around b'abc\"'")
         self.check_dis_error(b"S'abc\n.", '',
-                             '''strinq quote b"'" not found at both ends of b"'abc"''')
+                             '''string quote b"'" not found at both ends of b"'abc"''')
         self.check_dis_error(b'S"abc\n.', '',
-                             r"""strinq quote b'"' not found at both ends of b'"abc'""")
+                             r"""string quote b'"' not found at both ends of b'"abc'""")
         self.check_dis_error(b"S'abc\"\n.", '',
-                             r"""strinq quote b"'" not found at both ends of b'\\'abc"'""")
+                             r"""string quote b"'" not found at both ends of b'\\'abc"'""")
         self.check_dis_error(b"S\"abc'\n.", '',
-                             r"""strinq quote b'"' not found at both ends of b'"abc\\''""")
+                             r"""string quote b'"' not found at both ends of b'"abc\\''""")
 
     def test_binstring(self):
         self.check_dis(b"T\x03\x00\x00\x00abc.", '''\