enthought / enthought/traitsui
Make Qt WebEngine/WebKit an optional dependency for traitsui.api
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
This issue is for making Qt WebEngine/WebKit an optional dependency of `traitsui.api` such that this module can still be used as the convenient entry point when (1) HTMLEditor is not needed (2) Qt is required but Qt WebEngine/WebKit are not available.
More specifically, this can be done by making HTMLEditor an optional feature of `traitsui.api` conditional on whether Qt is used and WebEngine/WebKit is available.
Motivation:
- Qt WebKit has been deprecated in favour of WebEngine. Building (and importing) Qt WebEngine is a nontrivial business (currently PySide2 from EDM comes with neither). HTMLEditor is not as commonly required a feature.
Context:
- `traitsui.api` is provided for downstream projects to import various features of TraitsUI. This issue is only about the API module and keeping it convenient. Whether importing `traitsui.editors.html_editor` should fail when the web dependencies are missing is an orthogonal matter.
Related:
- ArrayEditor requires NumPy and is also an optional feature of `traitsui.api`. Currently a warning is emitted but it does seem noisy (see https://github.com/enthought/traitsui/issues/731)
- PythonEditor and PythonShell are optional features of `pyface.api` as well, see https://github.com/enthought/pyface/pull/796 (and its referenced issues)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.