You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The lines in tokens from tokenize.generate_tokens incorrectly indicate multiple lines. #104972
The line attribute in tokens returned by tokenize.generate_tokens incorrectly indicate multiple lines. The tokens should have an invariant that using the .start and .end attributes to index into the .line attribute will produce the .string attribute.
Activity
nedbat commentedon May 26, 2023
The tip of 3.12 shows one more style of change, due to omitting the newlines from
.line:pablogsal commentedon May 26, 2023
CC: @mgmacias95
pythongh-104972: Ensure that line attributes in tokens in the tokeniz…
pythongh-104972: Ensure that line attributes in tokens in the tokeniz…
pythongh-104972: Ensure that line attributes in tokens in the tokeniz…
pythongh-104972: Ensure that line attributes in tokens in the tokeniz…
gh-104972: Ensure that line attributes in tokens in the tokenize modu…
pythongh-104972: Ensure that line attributes in tokens in the tokeniz…
pablogsal commentedon May 26, 2023
@nedbat can you check with
mainnow?[3.12] gh-104972: Ensure that line attributes in tokens in the tokeni…
terryjreedy commentedon May 26, 2023
If you set automerge on the backport, the usual test-hypothesis failure disabled it. I merged it.
nedbat commentedon May 26, 2023
@pablogsal Gorgeous! Thanks for the quick turnaround.
pablogsal commentedon May 26, 2023
Thanks a lot @terryjreedy !