KEMBAR78
gh-132285: Fix that `__annotate__` is not deleted when `__annotations__` is deleted by sobolevn · Pull Request #132286 · python/cpython · GitHub
Skip to content

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Apr 8, 2025

@sobolevn sobolevn requested a review from JelleZijlstra as a code owner April 8, 2025 18:24
@bedevere-app bedevere-app bot added awaiting core review tests Tests in the Lib/test dir labels Apr 8, 2025
@sobolevn sobolevn force-pushed the issue-132285 branch 2 times, most recently from 13bb12e to 8e65065 Compare April 8, 2025 20:19
@JelleZijlstra
Copy link
Member

I think this actually behaves incorrectly. In https://peps.python.org/pep-0749/#effect-of-deleting-annotations we said that deleting __annotations__ should also delete __annotate__. type_set_annotations() tries to do that but it's buggy; do you want to fix it?

@sobolevn
Copy link
Member Author

sobolevn commented Apr 9, 2025

Yes, sure :)
Checking type_set_annotations

@sobolevn sobolevn changed the title gh-132285: Add a test when __annotations__ is deleted gh-132285: Fix that __annotate__ is not deleted when __annotations__ is deleted Apr 9, 2025
@sobolevn sobolevn removed the skip news label Apr 9, 2025
@sobolevn sobolevn requested a review from markshannon as a code owner April 9, 2025 09:37
@JelleZijlstra JelleZijlstra merged commit 2541103 into python:main Apr 9, 2025
46 checks passed
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants