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
bpo-42737: Drop code generation for annotations with complex targets #23952
Conversation
Misc/NEWS.d/next/Core and Builtins/2020-12-26-10-37-41.bpo-42737.x4y0ok.rst
Outdated
Show resolved
Hide resolved
|
I've updated the branch to the revert of PEP 563. |
Misc/NEWS.d/next/Core and Builtins/2021-04-22-22-48-30.bpo-42737.lsJ7pD.rst
Outdated
Show resolved
Hide resolved
Thanks, @isidentical for the PR. I think we are missing some tests that exercise the fix, no?
test_annotation_with_complex_target is checking a syntax error, which I don't understand fully since the point of this is to drop side effects like [][print('Hi!')]: int
|
When you're done making the requested changes, leave the comment: |
No, it is to drop the side effect of the annotation part not the target part. See https://bugs.python.org/issue42737#msg383819 |
Apologies, I have copied a bad example from the issue. But shoudn't we add some test checking that either we don't generate bytecode or that some side effect call or similar is never triggered. Unfortunately I don't see how the syntaxError is relevant in that test |
The previous version was testing those, though since the |
|
Fantastic, thanks for explaining! |
|
@isidentical: Status check is done, and it's a failure |
2 similar comments
|
@isidentical: Status check is done, and it's a failure |
|
@isidentical: Status check is done, and it's a failure |
https://bugs.python.org/issue42737
Automerge-Triggered-By: GH:isidentical