GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Wrong error position for tokenizer errors reporting a range if the line contains non-ASCII characters · Issue #156894 · python/cpython Closed Labels 3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionThe tokenizer errors which report a range point at the wrong characters if the line contains non-ASCII characters before the error. >>> compile("aaaa = 00010", "<t>", "exec") File "<t>", line 1 aaaa = 00010 ^^^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers >>> compile("фффф = 00010", "<t>", "exec") File "<t>", line 1 фффф = 00010 ^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers Both lines should mark The same happens with incompatible string prefixes: >>> compile("фф = ub'a'", "<t>", "exec") File "<t>", line 1 фф = ub'a' ^^ SyntaxError: 'u' and 'b' prefixes are incompatible
The same class of bug was fixed for other errors in gh-102310 and gh-102312; these call sites were missed. The fix could be either to convert in Linked PRs
Reacted by Bartosz Sławecki Activity
MetadataMetadataAssigneesLabels3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |