Traits

Latest version: v6.4.3

Safety actively analyzes 628903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

7.0.0

-------------

TraitsUI 7.0.0 is a major release which focuses on modernization of the
codebase. This release includes updating the WxPython backend to support
WxPython 4, an effort led by Rob McMullen's first cut at support, with
help from a number of other people, particularly Per Brodtkorb. It also
updates the code to use new features of Traits 6, and just like Traits 6,
this release drops support for Python 2.

In addition to the modernization, this code fixes many bugs and adds some
useful new features, including:

- a DatetimeEditor to go with the new Datetime trait in Traits 6
- an API to add placeholder text to a TextEditor
- support for the LEDEditor in Qt

Finally, the documentation has been improved, adding sections about some
of the internals of the TraitsUI mechanisms. Additionally, the Examples,
Demos and Tutorials have been improved and cleaned-up, including fixing and
unifying the demo viewer codebase.

Thanks to Per Brodtkorb, Christian Brodbeck, Kit Choi, Mark Dickinson, Matt
Hancock, Sandhya Govindaraju, Midhun Madhusoodanan, Rob McMullen, Shoeb
Mohammed, Eric Olsen, Roberto Preste, reckoner, Jonathan Rocher, Scott
Talbert, Corran Webster.

Enhancements
~~~~~~~~~~~~
* Documentation improvements (720, 724, 723, 778)
* WxPython 4 compatibility and support (708, 736, 762, 772, 775, 776)
* Traits 6 compatibility and enhancements (689, 690, 693, 695, 713, 727, 770)
* Style improvements (648, 771)
* Add placeholder text option for TextEditor (735)
* Examples clean-up and unification (697, 702, 703, 705, 711, 712, 777)
* Add a DatetimeEditor (719, 730)
* Refactor and clean-up of base Editor class (685, 686, 688)
* Remove use of Category classes from TraitsUI (654)
* Add LEDEditor for Qt (635)
* Add 'docs' command to etstool.py (624)
* Add TabularAdapter to traitsui.api (627)
* Enhancements to CI and testing (683, 714, 740)

Fixes
~~~~~
* Documentation fixes (546, 766)
* Fix cgi.escape for Python 3.8 (780)
* Log exceptions in table sorting (751)
* Use TupleEditor for traits derived from BaseTuple (747)
* Fixes for Undo/Redo (733)
* Add explicit redraw for TableEditor selection (721)
* Fixes for Qt5 support (709)
* Fix bugs in color functions (707, 744)
* Fix importing of ProgressColumn and EditColumn (691)
* Set initial focus item correctly in Qt (602)
* Fix text elision test on some platforms (644)
* Fix a bug with TableEditor column clicking (669)
* Fix typo in progress column exception (662)

6.4.1

-------------

Released: 2022-08-12

This is a bugfix release that fixes wheel builds on Python 3.11 and
fixes some distribution and testing issues with typing stubs.

Fixes
~~~~~
* Update ``cibuildwheel`` to the latest version so that we get wheels for
Python 3.11. (1711)
* Rename ``requires_numpy_testing`` decorator to ``requires_numpy_typing``,
and have it check for ``numpy.typing``, not ``numpy.testing``. (1710)
* Fix missing ``numpy_examples`` directory in traits-stubs package data.
(1709)

6.4

are a couple of things to watch out for.

* Reminder: while the ``Either`` and ``Trait`` trait types are not yet formally
deprecated, the intention is to eventually deprecate and remove them.
Projects are encouraged to update their code to use ``Union`` instead.
* Similarly, any uses of the ``Unicode`` trait type in your project should
be replaced with ``Str``.
* Validation of items within a container (e.g., ``foos = List(MyTraitType)``)
now always matches the validation used for the item trait at top level (e.g.,
``foo = MyTraitType``). Previously, the validation methods used could differ,
thanks to a bug in the container implementations. For most trait types this
will make no difference, but for the ``Tuple`` trait type this change has the
consequence that lists will no longer be accepted as valid for ``Tuple``
traits inside list items. See issue 1619 and PR 1625 for more information.
* Related to the above: a top-level ``Tuple()`` trait declaration currently
accepts Python ``list`` objects, while a ``Tuple`` declaration with explicit
item types (for example ``Tuple(Int(), Int())``) does not. The support for
``list`` objects in plain ``Tuple()`` is deprecated, and will be removed in a
future version of Traits. See PR 1627 for more information.

Detailed PR-by-PR changes
~~~~~~~~~~~~~~~~~~~~~~~~~

The following people contributed code changes for this release:

* Caio Agiani
* Steve Allen
* Mark Dickinson
* Sai Rahul Poruri
* Corran Webster

Features
~~~~~~~~
* ``ETSConfig`` attributes now support deletion. This makes it easier to make
temporary changes to ``ETSConfig`` attributes during unit testing. (1670,
1686)
* ``Complex`` trait type validation is now more lenient: any type that
implements ``__complex__`` will be accepted. (1594)
* ``BaseFloat`` validation is now more lenient, and matches ``Float``
validation: ``BaseFloat`` now also accepts objects whose type has an
``__index__`` method. (1595)

Changes
~~~~~~~
* An ``enumerate`` alias has been removed from ``traits.trait_base``. In the
unlikely event of code that imports ``enumerate`` from ``traits.trait_base``,
use the built-in ``enumerate`` instead. (1681)
* Fast validation tuples ``int_fast_validate``, ``float_fast_validate`` and
``complex_fast_validate`` have been removed from the ``traits.trait_types``
module. (1601)

Fixes
~~~~~
* ``TraitListObject``, ``TraitDict`` object and ``TraitSetObject`` now use the
``validate`` method of the appropriate ``CTrait`` instances to validate
items, keys and values. Previously the handler's ``validate`` method was
used; this gave buggy behaviour in cases where the handler's ``validate``
method differed from the actual validation in use. (1625)
* Fix specification of ``default_value`` that incorrectly disregarded
``default_value_type``. (1631)
* Fix incorrect results from ``clone_traits`` applied to ``List``, ``Dict``
and ``Set`` traits. (1624)
* The ``find_resource`` and ``store_resource`` tests are now skipped
if the ``pkg_resources`` module is not present in the environment. (1679)
* An ``ETSConfig`` test has been renamed so that it's properly picked up
by the test runner. (1671)
* Fix some ``ETSConfig`` tests that assume unittest as the test runner. (1683)
* Rename various test-related classes to avoid pytest trying to harvest test
methods from them. (1684)
* Overriding a default for a ``List`` or other collection trait in a subclass
now works as expected. Previously, the behaviour was unusably buggy. (1645)

Deprecations
~~~~~~~~~~~~
* ``Tuple`` traits currently accept Python ``list`` objects in some (but
not all) circumstances. That feature is deprecated, and will be removed
in a future version of Traits. (1627)

Type stubs
~~~~~~~~~~
* Add stubs for ``Array``, ``ArrayOrNone``, and ``CArray``. (1682)
* Fix various stubs for ``traits.trait_types``; add stubs for
``traits.ctraits``. (1661)
* Fix that ``TraitError`` stubs weren't exposed at ``traits.api`` level.
(1658)
* Make ``Int`` and ``Float`` type stubs more accurate. (1656)
* Fix incorrect type stubs for the ``Dict`` trait type. (1655)

Documentation
~~~~~~~~~~~~~
* Make ``ETSConfig`` class documentation visible in the API docs. (1688)
* Add copy buttons to code samples in documentation. (1651, 1653)
* Document ``Date``, ``Datetime`` and ``Time`` trait types. (1641)
* Fix some missing mentions of ``Set`` in notification docs. (1618)
* Document the ``'some_trait.-'`` pattern for ``on_trait_change``. (1592)
* Document that ``Either`` should not be used in new code. (1699)
* Document that ``TraitPrefixMap`` and ``TraitPrefixList`` are deprecated.
(1702)
* Document that the Trait factory function should not be used in new code.
(1700)
* Miscellaneous minor fixes. (1583, 1611, 1652, 1680)

Build and continuous integration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Don't collect traits-stubs tests under pytest. As a result of this
and other fixes, the test suite now passes under pytest. (1690)
* Update ``etstool.py`` for Python 3.8 support. Python 3.8 is now the
default Python version for builds. (1694)
* Use PySide6 for Python >= 3.8 instead of PySide2 in CI testing. (1685)
* Add ``pyproject.toml`` files for both Traits and traits-stubs. (1689, 1676)
* Add Python 3.11 to some workflow runs. (1600, 1660, 1674)
* Add Python 3.10 to install-from-PyPI workflow. (1576)
* Allow running the main test workflow manually. (1607)
* Switch Slack channel used to report GitHub Actions failures. (1650)
* Exclude ``build`` directory in flake8 configuration. (1635)
* Re-include NumPy as a test dependency on Python 3.10. (1593)

Maintenance and refactoring
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ``.gitignore`` cleanup and updates. (1678, 1687)
* Return ``PyErr_Format`` calls in ``traits/ctraits.c``. (1640)
* Update copyright header end year to 2022. (1612)
* The ``ci-src-requirements.txt`` file isn't used; remove it. (1602)

6.4.0

-------------

Released: 2022-08-12

6.3.2

notifications from ``Property`` traits using the ``observe`` framework.


Fixes
~~~~~

* Fix that ``Property`` traits using ``observe`` metadata could be fired
twice in subclasses. (1587)

6.3.1

Traits 6.3.0 and Mayavi <= 4.7.3.

Fixes
~~~~~

* Make ``PrefixMap._map`` available again, for compatibility with Mayavi.
(1578)

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.