-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Optimize the numpy hook #542
Conversation
@mmckerns: The tests are failing because Lines 191 to 193 in bf0f4fa
But why on Earth are the tests of other PRs passing? Seems like a heisenbug... I see this same error on my machine. |
Obviously, the types should just be registered the once, so yeah checking if they are in the dispatch table is the right thing to do. Thanks for the PR. |
- Only type(obj) is passed to the numpy helper functions, and calling type() on a proxy of a deleted weakly-referenced object is safe. - Similarly, using "%r" for string substitution with a proxy of a deleted object is safe, so there's no need to have a 'R3' case in save_weakproxy() - Removed test cases from test_weakref.py related to Python 2 old-style classes - Fixed a bad use of 'NoReturn' instead of 'None' in logger.py
It was failing due to |
This doesn't make sense... The old versions of the Note: on my machine, with all Python versions, |
I have VMs for all supported platforms. The |
As this is now called from
Pickler.save()
, which can be called from a dozen to thousands of times for a single "dump":id(obj1.__bound_method__) == id(obj2.__bound_method__)
* bytype(obj1).__unbound_method__ is type(obj2).__unbound_method__)
(*) I was surprised that it worked at all, must be some kind of optimization but this is not described in the language.
Amend to #540