Skip to content

RGBAColorEditor import doesn't force toolkit selection #913

@mdickinson

Description

@mdickinson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions