When ETS_TOOLKIT is not set, importing RGBAColorEditor from enable.trait_defs.ui.api gives different results depending on whether a previous import happens to have forced toolkit selection or not.
To reproduce: create an EDM environment containing Enable, PySide2, and dependencies, then compare:
mdickinson@mirzakhani ~ % python
Enthought Deployment Manager -- https://www.enthought.com
Python 3.6.13 |Enthought, Inc. (x86_64)| (default, Apr 13 2021, 19:22:11)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from enable.trait_defs.ui.api import RGBAColorEditor
>>> import traitsui.api
>>> RGBAColorEditor is None # Expected False
True
with
mdickinson@mirzakhani ~ % python
Enthought Deployment Manager -- https://www.enthought.com
Python 3.6.13 |Enthought, Inc. (x86_64)| (default, Apr 13 2021, 19:22:11)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import traitsui.api
>>> from enable.trait_defs.ui.api import RGBAColorEditor
>>> RGBAColorEditor is None # Get False, as expected
False
When
ETS_TOOLKITis not set, importingRGBAColorEditorfromenable.trait_defs.ui.apigives different results depending on whether a previous import happens to have forced toolkit selection or not.To reproduce: create an EDM environment containing Enable, PySide2, and dependencies, then compare:
with