ANN: Pyface 8.0.0 - Important Changes

20 views
Skip to first unread message

Corran Webster

unread,
Apr 6, 2023, 9:35:11 AM4/6/23
to Enthought Tool Suite users
Dear ETS Users,

I'm pleased to announce the release of Pyface 8.0.0.  This is a major release which includes a number of backwards-incompatible changes, but includes support for Python 3.11 and PySide 6.4 and 6.5.  You will likely need to take some action as a result of this release.

The most significant change in this release is that the Qt toolkit backend has been moved from the pyface.ui.qt4 package to the pyface.ui.qt package. The "qt4" namespace had been an ongoing source of confusion as Qt5 and Qt6 became the most popular versions of Qt in use. Because this change has the potential to cause significant backwards compatibility issues, this release includes import hooks to continue to support imports from pyface.ui.qt4... which can be enabled by:
  • using "qt4" for the ETS_TOOLKIT or ETSConfig.toolkit values.
  • setting the ETS_QT4_IMPORT environment variable to a non-empty value
  • explicitly adding the import hooks to sys.meta_path
In particular the environment variables allow users of ETS-based applications such as Mayavi to continue to use those applications with newer versions of Pyface until there is time to update their code to the new import locations.

We are planning a corresponding release of TraitsUI which makes a similar change next week.

Additionally this release uses the module-level __getattr__ system introduced in Python 3.7 to delay imports from the api modules which have side-effects, particularly toolkit selection. This means that you can, for example, import pyface.api and toolkit selection will be deferred until you actually request a class or object which is toolkit-dependent. Part of this included adding formal interfaces for ActionManager and its subclasses.

In addition this release:
  • adds support for Python 3.11 and drops support for Python 3.6
  • adds support for PySide 6.4+ and the new enum system
  • removes code supporting PyQt4, and supports more modern imports from
  • pyface.qt, such as pyface.qt.QtWidgets.
  • removes many things flagged as deprecated in Pyface 7
  • consistently add interface classes to api modules.
  • adds new Field subclasses, including an ImageField and LabelField
  • moves to a pyproject.toml-based packaging solution, removing setup.py
A full changelog is available in the Pyface Documentation.

-- Corran
Reply all
Reply to author
Forward
0 new messages