-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix confusing weakref constructor overload #2832
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
Fix confusing weakref constructor overload #2832
Conversation
6e40ad0
to
8827a95
Compare
Looks good to me. I'll globally test this (without the default constructor) to see if anyone is relying on it, mostly out of interest. Preserving the default constructor seems best irrespectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Google-global testing this as-is (without the default constructor) came back green. Might be nice to add something along the lines of "very unlikely to be useful but supplied for backward compatibility" in a comment when you put back the default constructor.
If we want to do that, I think we should go with an official deprecation, but I'm fine just being fully backward compatible and pushing the "let's make all |
I added |
I think we went over all bits and pieces, then :-) Let's close another PR and issue. Thanks, all! |
Description
Fixes #2536, where the two
weakref
constructors fromhandle
andobject
do different things.Demonstrated by failing tests in the first commit, fixed in the second one.
Suggested changelog entry: