]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992) (GH-96593)
authorBatuhan Taskaya <isidentical@gmail.com>
Tue, 6 Sep 2022 10:23:26 +0000 (13:23 +0300)
committerGitHub <noreply@github.com>
Tue, 6 Sep 2022 10:23:26 +0000 (13:23 +0300)
commita0848d169b6982394c539deead0de18f251dfc6d
treea5c1a9c5d25e3497e1b43d27a16a53314f8cc7cd
parent08d8058b79f6cddcc9621876dcd454fa367b9806
[3.11] gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992) (GH-96593)

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>
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]