Skip to content

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

Merged
takluyver merged 3 commits into
ipython:masterfrom
tacaswell:fix_bare_function_unregister
Oct 25, 2017
Merged

takluyver merged 3 commits into
ipython:masterfrom
tacaswell:fix_bare_function_unregister

Conversation

@tacaswell

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@tacaswell

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

cargo-culted how to test raising....

@takluyver

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

3rd times the charm?

@takluyver

Copy link
Copy Markdown
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