Skip to content

gh-92986: Make level of ImportFrom not optional on ASDL #92987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

hauntsaninja
Copy link
Contributor

No description provided.

Copy link
Member

@isidentical isidentical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablogsal
Copy link
Member

This needs a news entry at the very least and also an entry in what's new as this is technically backwards incompatible no? Users not passing this in will be broken by the change if I am not mistaken

@hauntsaninja
Copy link
Contributor Author

hauntsaninja commented May 19, 2022

Yes, it is backwards incompatible (although in practice looks like people pass it). But looks like we have a test for allowing None https://bugs.python.org/issue13436:

def test_level_as_none(self):

Maybe we should close this and change ast.unparse instead?

@pablogsal
Copy link
Member

Maybe we should close this and change ast.unparse instead?

That would be my recommendation

@hauntsaninja hauntsaninja deleted the import-from-ast branch May 19, 2022 21:59
hauntsaninja added a commit to hauntsaninja/cpython that referenced this pull request May 19, 2022
This doesn't happen naturally, but is allowed by the ASDL and compiler.
We don't want to change ASDL for backward compatibility reasons
(python#57645, python#92987)
@hauntsaninja
Copy link
Contributor Author

Okay, opened a PR for ast.unparse at #92992

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 5, 2022
…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
(pythonGH-57645, pythonGH-92987)
(cherry picked from commit 200c9a8)

Co-authored-by: Shantanu <[email protected]>
isidentical pushed a commit that referenced this pull request Sep 5, 2022
This doesn't happen naturally, but is allowed by the ASDL and compiler.
We don't want to change ASDL for backward compatibility reasons
(#57645, #92987)
isidentical pushed a commit to isidentical/cpython that referenced this pull request Sep 5, 2022
…ythonGH-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
(pythonGH-57645, pythonGH-92987)
(cherry picked from commit 200c9a8)

Co-authored-by: Shantanu <[email protected]>
miss-islington added a commit that referenced this pull request Sep 5, 2022
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 200c9a8)

Co-authored-by: Shantanu <[email protected]>
isidentical added a commit that referenced this pull request Sep 6, 2022
) (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 200c9a8)

Co-authored-by: Shantanu <[email protected]>

Co-authored-by: Shantanu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants