Skip to content

Infinite recursion in the tokeniser when showing warnings #99891

Closed
@pablogsal

Description

Turns out that showing warnings in the tokenizer is quite tricky because in the process of showing the warning we need to fetch the encoding which needs to tokenize the first two lines and if the warning is there that leads to an infinite loop. Check for instance with a file contaning:

0b1and x

Notice that this only happens when tokenizing files.

Linked PRs

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions