Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: bare functions in callback registry on bogus unregister #10867

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

Merged
merged 3 commits into from
Oct 25, 2017

Conversation

tacaswell
Copy link
Contributor

7de483b added checking for the case
where the callback was wrapped by backcall, however if there are
un-wrapped functions registered and a non-registered function is
attempted to be unregistered then this fails by raise an uncaught
AttributeError.

Where should a test for this go?

7de483b added checking for the case
where the callback was wrapped by backcall, however if there are
un-wrapped functions registered and a non-registered function is
attempted to be unregistered then this fails by raise an uncaught
AttributeError.
@takluyver
Copy link
Member

Thanks! Tests in IPython.core.tests.test_events, please.

@tacaswell
Copy link
Contributor Author

I can drop the last commit if you want, just being a difficult busy body / making my editor less angry....

@tacaswell tacaswell force-pushed the fix_bare_function_unregister branch from 636adbf to b7d1abe Compare October 23, 2017 23:56
@takluyver takluyver added this to the 6.3 milestone Oct 24, 2017
@takluyver
Copy link
Member

The wrapping is fine, but can you fix the test? ;-)

@tacaswell tacaswell force-pushed the fix_bare_function_unregister branch from b7d1abe to 2494045 Compare October 24, 2017 13:27
@tacaswell
Copy link
Contributor Author

cargo-culted how to test raising....

@takluyver
Copy link
Member

Needs a bit more cargo ;-)

import nose.tools as nt

@tacaswell tacaswell force-pushed the fix_bare_function_unregister branch from 2494045 to 3abd0c2 Compare October 25, 2017 20:10
@tacaswell
Copy link
Contributor Author

3rd times the charm?

@takluyver
Copy link
Member

Seems it is!

@takluyver takluyver merged commit dfb4586 into ipython:master Oct 25, 2017
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