Pyface imports from non api modules
- Dominant language
- Python
- Stars
- 462
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
Ref: https://github.com/enthought/pyface/pull/866
With traits 6.2 we are explicitly stating in documentation that imports should come from api modules. Because of this I decided to run through pyface for any non api imports and this is the list I found:
From `traits.trait_base` there are imports of:
- ~[ ] `xgetattr`~ (see #1239)
- ~[ ] `xsetattr`~ (see #1239)
- [ ] `get_resource_path`
- [ ] `user_name_for`
- [ ] `traits_home`
~Additionally we import optional dependencies from `traits.testing.optional_dependencies`~ (pyface shouldn't do this)
From `traits.trait_list_object` we import `TraitsList` but this is a different `TraitList` from the one exposed in `traits.api`
~From `traits.version` we import `version`~
From `traits.util.resource` we import `get_path`
From `traitst.trait_notifiers` we import `set_ui_handler` and `ui_handler`
From `traitss.util.clean_strings` we import `python_name`
and from `traits.util.camel_case` we import `camel_case_to_words`
Some of these we may want to expose in an api module since they are being used? Others we may want to discourage their use in `pyface` since traits isn't meant to be a storage place for miscellaneous utilities. Or we may want to just leave them alone and break our own suggestion.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.