bpo-42737: Drop code generation for annotations with complex targets#23952
Conversation
|
I've updated the branch to the revert of PEP 563. |
pablogsal
left a comment
There was a problem hiding this comment.
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