Skip to content

SystemError when printing symbol table entry #109207

@yunline

Description

@yunline

Bug report

Bug description:

Platform: Windows10
Tested version: 3.10, 3.11, 3.12rc2

import symtable

script = "a=0"

symt = symtable.symtable(script, "test.py", "exec")
print(symt._table)
<symtable entry top(-1), line 0>OverflowError: Python int too large to convert to C long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "x:\python\oneliner\__develop\symt.py", line 8, in <module>
    print(symt._table)
SystemError: <built-in method write of _io.TextIOWrapper object at 0x000001508B5559A0> returned a result with an exception set

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixes3.13bugs and security fixesOS-windowseasytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions