Content-Length: 290102 | pFad | https://github.com/python/cpython/issues/99891

ad Infinite recursion in the tokeniser when showing warnings · Issue #99891 · python/cpython · GitHub
Skip to content

Infinite recursion in the tokeniser when showing warnings #99891

Description

@pablogsal

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

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









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/99891

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy