Skip to content

typo in pickletools.py error message #139646

Description

@yihong0618

Bug report

Bug description:

I searched code base and issue seems its a typo in error message

strinq -> string

diff --git a/Lib/pickletools.py b/Lib/pickletools.py
index bcddfb722b..254b6c7fcc 100644
--- a/Lib/pickletools.py
+++ b/Lib/pickletools.py
@@ -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
diff --git a/Lib/test/test_pickletools.py b/Lib/test/test_pickletools.py
index a178d3353e..cf99087462 100644
--- a/Lib/test/test_pickletools.py
+++ b/Lib/test/test_pickletools.py
@@ -384,13 +384,13 @@ def test_string_without_quotes(self):
         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.", '''\

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 6, 2025
  2. changed the title [-]typo in pickletools.py[/-] [+]typo in pickletools.py error message[/+] on Oct 6, 2025
  3. added a commit that references this issue on Oct 6, 2025
  4. added 2 commits that reference this issue on Oct 6, 2025
  5. picnixz commented on Oct 6, 2025

    @picnixz
    Member

    I'm holding off the backports so that we keep 3.13 and 3.14 in a consistent state before the release tomorrow. This can go into 3.13.9 and 3.14.1.

  6. added a commit that references this issue on Oct 7, 2025
  7. added 2 commits that reference this issue on Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions