enthought / enthought/traitsui
False positives for traitsui.editors DeprecationWarning
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.