From 16bb04a880cedbe215a3959816bf6e33f6200097 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Fri, 24 Mar 2023 14:09:06 +0000 Subject: [PATCH] Import Font and Color from traitsui, not traits (#558) This PR updates an example to import the `Font` and `Color` trait types from `traitsui.api` instead of from `traits.api`. The `Font` and `Color` traits in `traits.api` are deprecated. --- CHANGES.rst | 4 +++- .../workbench/AcmeLab/acme/workbench/acme_preferences_page.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5365345c0..a5f16c930 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,12 +7,14 @@ Version 7.0.1 Released: 2023-03-24 -This is a bugfix release whose sole purpose is to fix the Read the Docs +This is a bugfix release whose main purpose is to fix the Read the Docs build for the Envisage documentation. Fixes ----- * Fix the documentation build for Read the Docs. (#560) +* Fix example code that was importing ``Font`` and ``Color`` from Traits + instead of TraitsUI. (#558) Version 7.0.0 diff --git a/examples/legacy/workbench/AcmeLab/acme/workbench/acme_preferences_page.py b/examples/legacy/workbench/AcmeLab/acme/workbench/acme_preferences_page.py index 5d887258e..ec8b58826 100644 --- a/examples/legacy/workbench/AcmeLab/acme/workbench/acme_preferences_page.py +++ b/examples/legacy/workbench/AcmeLab/acme/workbench/acme_preferences_page.py @@ -13,8 +13,8 @@ # Enthought library imports. from apptools.preferences.ui.api import PreferencesPage -from traits.api import Color, Float, Font, Int -from traitsui.api import View +from traits.api import Float, Int +from traitsui.api import Color, Font, View class AcmePreferencesPage(PreferencesPage):