Skip to content

Conversation

BobTheBuidler
Copy link
Contributor

@BobTheBuidler BobTheBuidler commented Jun 3, 2025

This PR adds 2 new weakref primitives for weakref.proxy (1 and 2 arg)

The C code generates correctly, but I'm not entirely sure why this test is failing. The weakly-proxied object is being destroyed too early, while there should still be a strong reference to it. It also fails if we use the builtin weakref.proxy, so I believe this might be exposing a reference counting bug unrelated to this PR.

@BobTheBuidler

This comment was marked as resolved.

@BobTheBuidler
Copy link
Contributor Author

Tests are fixed, this PR is now ready for review.

@BobTheBuidler
Copy link
Contributor Author

Thanks for the feedbacks, I've addressed all of them and this PR is again ready for review.

@BobTheBuidler BobTheBuidler requested a review from JukkaL August 17, 2025 16:24
@BobTheBuidler
Copy link
Contributor Author

Hmm.. what happened here? the testutil import broke the tests?

@BobTheBuidler
Copy link
Contributor Author

@JukkaL any idea why replacing pytest.raises with assertRaises is giving us all of these type-related errors?

its another typeshed thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants