-
-
Notifications
You must be signed in to change notification settings - Fork 26k
FIX Fix available_if with bounded methods #23077
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
Conversation
Non-regression test for #21344. | ||
""" | ||
est = AvailableParameterEstimator(available=True) | ||
pickle.dumps(est.available_func) |
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.
Could we make the round-trip by loading the pickle as well?
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.
LGTM pending @glemaitre 's point.
In effd281, I introduced some state so we can check that the road-tripped pickled method keeps the state of the object. |
Thanks LGTM. |
Reference Issues/PRs
Fixes #21344
What does this implement/fix? Explain your changes.
I think using
MethodType
is the recommended way to bound a method descriptor in Python.Adding to milestone 1.1 since #21344 is on the milestone.