ast.unparse in Python 3.9 currently can't handle the complex f-strings that astunparse can, see https://bugs.python.org/issue28002 as the relevant issue. It might make sense to contribute the changes you made to support this back upstream.
In the bugs.python.org issue I linked, I offered to make a PR to CPython based on your change (and giving you the credit, of course). If you're busy or you don't see this issue, that offer still stands, but the happiest thing might be if you submitted the PR yourself.
Hello again!
ast.unparse
in Python 3.9 currently can't handle the complex f-strings thatastunparse
can, see https://bugs.python.org/issue28002 as the relevant issue. It might make sense to contribute the changes you made to support this back upstream. In the bugs.python.org issue I linked, I offered to make a PR to CPython based on your change (and giving you the credit, of course). If you're busy or you don't see this issue, that offer still stands, but the happiest thing might be if you submitted the PR yourself.Let me know if you have any thoughts!