[3.10] gh-100050: Fix an assertion error when raising unclosed parenthesis errors in the tokenizer (GH-100065) (#100073)

Automerge-Triggered-By: GH:pablogsal.
(cherry picked from commit 97e7004cfe48305bcd642c653b406dc7470e196d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 files changed