Uh oh!
There was an error while loading. Please reload this page.
gh-133644: remove PyWeakref_GetObject and PyWeakref_GET_OBJECT - #133657
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
UPDATE: I excluded manually projects which refer to the functions without using them. I also excluded This change is a little bit scary: 30 projects in PyPI top 8,000 projects refer to these 2 functions:
Details |
hugovk
commented
May 8, 2025
Pillow only uses How does the list change if you exclude |
vstinner
commented
May 8, 2025
Oh correct, I modified my script to exclude
I modified the list to manually exclude projects which only refer to these functions without using them. I also used the updated script to exclude pythoncapi_compat.h which excludes Pillow. The number of impacts projects moved from 38 to 27, it's better! |
…ted-weakrefs-133644
encukou
commented
Sep 22, 2025
@vstinner, could you share your script, or run it again? It looks like the situation is much better now. |
The scripts:
A code search on
Details |
vstinner
commented
Sep 22, 2025
Cython is not affected, the matching line comes from a compatibility layer. It defines |
encukou
commented
Sep 23, 2025
I found 4 projects (marked Others use
For
But it seems this might not be widely useful. |
vstinner
commented
Sep 23, 2025
@picnixz: Can you fix the merge conflict? |
picnixz
commented
Sep 23, 2025
Yes, I was waiting for a decision to be made before fixing it. Should I understand that we want to merge this PR soon? |
encukou
commented
Sep 23, 2025
+1 for removing this in the first alpha. |
…ted-weakrefs-133644
picnixz
commented
Sep 23, 2025
(FTR, the reason why I put my PRs into draft sometimes is because I'm worried that I messed up my merge commit. That way, I'm sure that I don't notify users by mistake) |
vstinner
left a comment
There was a problem hiding this comment.
Ok, let's remove it as soon as possible in the 3.15 dev cycle.
📚 Documentation preview 📚: https://cpython-previews--133657.org.readthedocs.build/