]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 5 Sep 2022 17:39:52 +0000 (10:39 -0700)
committerGitHub <noreply@github.com>
Mon, 5 Sep 2022 17:39:52 +0000 (10:39 -0700)
commit6cc31af657a0aaf5a8ba0564b35124f1ca542287
tree4b97e2e56a271e3f46b354722556a4db82811206
parente13f49a0bc253f1b8939fd505547986183761768
gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992)

This doesn't happen naturally, but is allowed by the ASDL and compiler.
We don't want to change ASDL for backward compatibility reasons
(GH-57645, GH-92987)
(cherry picked from commit 200c9a8da0e2b892c476807e986009c01327e781)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Lib/ast.py
Lib/test/test_unparse.py
Misc/NEWS.d/next/Library/2022-05-19-22-34-42.gh-issue-92986.e6uKxj.rst [new file with mode: 0644]