Skip to content
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

Publish NotifierNotFound in traits.observation.api #1498

Merged
merged 5 commits into from
Sep 7, 2021

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Sep 3, 2021

This PR makes NotifierNotFound importable from traits.observation.api, updates the documentation to note that NotifierNotFound can be raised, and adds a test for NotifierNotFound being raised.

It also renames the traits.observation._exception module to traits.observation.exception, in keeping with that package's conventions for public versus private objects.

Closes #1479.

Checklist

  • Tests
  • Update API reference (docs/source/traits_api_reference)
  • Update User manual (docs/source/traits_user_manual)
  • [ ] Update type annotation hints in traits-stubs N/A

traits/observation/api.py Outdated Show resolved Hide resolved
Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only concern is whether we should keep a dummy _exceptions module that imports from the new exceptions to support code that had to go rummaging around in private modules to get the exception objects.

I'm in two minds: it was private, so code doing this knew what it was getting into; on the other hand it was occasionally necessary due to the issue with the API, so helping code that was forced to do that might be polite.

@mdickinson
Copy link
Member Author

Only concern is whether we should keep a dummy _exceptions module that imports from the new exceptions

I think we should be fine without it. A search turned up no uses of NotifierNotFound in other public or private projects that I have access to.

@mdickinson mdickinson merged commit 9e865f2 into main Sep 7, 2021
@mdickinson mdickinson deleted the fix/make-notifier-not-found-public branch September 7, 2021 08:41
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.

NotifierNotFound from traits.observation is not in the public API
3 participants