Closed hrnciar closed 1 year ago
Most of the test failures aren't astroid failures, so this is probably just about Python 3.12.
It looks like this is caused by f-strings having actual tokens now, e.g. this code:
foo = f'a {b} c {d} e'
is tokenized as:
0,0-0,0: ENCODING 'utf-8'
1,0-1,3: NAME 'foo'
1,4-1,5: OP '='
1,6-1,8: FSTRING_START "f'"
1,8-1,10: FSTRING_MIDDLE 'a '
1,10-1,11: OP '{'
1,11-1,12: NAME 'b'
1,12-1,13: OP '}'
1,13-1,16: FSTRING_MIDDLE ' c '
1,16-1,17: OP '{'
1,17-1,18: NAME 'd'
1,18-1,19: OP '}'
1,19-1,21: FSTRING_MIDDLE ' e'
1,21-1,22: FSTRING_END "'"
1,22-1,23: NEWLINE '\n'
2,0-2,0: ENDMARKER ''
Hello,
I'd like to ask for help, in Fedora, we are rebuilding all Python packages with the upcoming Python 3.12.0. I've tested astroid from the main branch (last commit https://github.com/pylint-dev/astroid/commit/8d57ce2f3e226c2ac3cdd7f6a57dac2dd5ec5a4b at this time) and it works with 3.12, but asttokens fails with following failures. Thank you.