enthought / enthought/traitsui
Migrate use of Trait to Union
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Several uses of `Trait` is triggering deprecation warnings on Traits 6.1 (see https://github.com/enthought/traits/issues/1258)
(If I set `PYTHONWARNINGS` to "default" and run the test suite, I can see the deprecation warning.)
For example this:
https://github.com/enthought/traitsui/blob/806808f5ab9ab23e2f7fe5e5a874d5e19b200081/traitsui/qt4/color_trait.py#L100
We should be able to use `Union` for these use cases.
Note that `Union` is available from Traits 6.1, and currently TraitsUI hasn't dropped Traits 6.0.
It might be possible to put up a compatibility layer similar to this:
https://github.com/enthought/traitsui/blob/be3d68ad61ac80dea943c2c496f55b6f91dd75d6/traitsui/helper.py#L193-L200
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.