[issue46078] `ast.unparse` fails on `class C: i: int`… convert broken from `ast.AnnAssign` to `ast.Assign`

2021-12-14 Thread Samuel Marks
Samuel Marks added the comment: Just fixed the issue by using this value: ```py "```(None)```" if sys.version_info[:2] >= (3, 9) else "```None```" ``` -- stage: -> resolved status: open -> closed ___ Python tracker

[issue46078] `ast.unparse` fails on `class C: i: int`… convert broken from `ast.AnnAssign` to `ast.Assign`

2021-12-14 Thread theeshallnotknowethme
theeshallnotknowethme added the comment: This seems like just a problem of your library instead of a problem with Python. Are you sure this is the right place you're in? -- nosy: +February291948 ___ Python tracker

[issue46078] `ast.unparse` fails on `class C: i: int`… convert broken from `ast.AnnAssign` to `ast.Assign`

2021-12-14 Thread Samuel Marks
New submission from Samuel Marks : astor fails with: ``` File "python3.8/site-packages/astor/code_gen.py", line 63, in to_source generator.visit(node) File "python3.8/site-packages/astor/node_util.py", line 143, in visit return visitor(node) File "python3.8/site-packages/astor/code_