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

False positives for traitsui.editors DeprecationWarning #2047

Open
mdickinson opened this issue Apr 24, 2024 · 0 comments
Open

False positives for traitsui.editors DeprecationWarning #2047

mdickinson opened this issue Apr 24, 2024 · 0 comments
Labels
difficulty: easy Issues which don't need much/any context about the package. type: bug

Comments

@mdickinson
Copy link
Member

There's currently a DeprecationWarning issued if one tries to import editors from traitsui.editors instead of from traitsui.editors.api. However, the criterion for issuing the warning is a little too broad: the check is if name in traitsui.editors.api.__dict__, and this picks up things like the __warningsregistry__ attribute. This results in the warning being issued unexpectedly (e.g., as a result of the warnings machinery accessing the traitsui.editors.__warningsregistry).

This may be a use-case for adding an __all__ to traits.editors.api. Or we could tighten up the check.

@mdickinson mdickinson added type: bug difficulty: easy Issues which don't need much/any context about the package. labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy Issues which don't need much/any context about the package. type: bug
Projects
None yet
Development

No branches or pull requests

1 participant