Releases: enthought/traits
Traits 6.2.0
Traits 6.2 is the latest feature release in the Traits 6 series, with several
improvements and fixes over Traits 6.1.
Highlights of this release
- The Traits examples are now distributed as part of the Traits egg, and
are contributed to theetsdemoapplication. (The latter can be
installed from PyPI withpip install etsdemo.) - Performance of the
observeframework has been significantly improved. - It's no longer necessary to specify a trait comparison mode of
ComparisonMode.identitywhen usingobserveto observe items
in aList,DictorSet. - Support for Python 3.5 has been dropped.
- When importing from Traits, you should always import from one of the
api
modules (for example,traits.api,traits.adaptation.api, etc.) This
recommendation has now been made explicit in the documentation. If you find
something you need that's not available from one of theapimodules,
please let the Traits developers know.
Detailed PR-by-PR changes
More than 60 PRs went into this release. The following people contributed to
this release:
- Aaron Ayres
- Alexandre Chabot-Leclerc
- Kit Choi
- Mark Dickinson
- Kevin Duff
- Glen Granzow
- Matt Hancock
- Rahul Poruri
- Eric Prestat
- Kuya Takami
- Hugo van Kemenade
- Aditya Vats
- Corran Webster
Features
- The
Propertytrait type now supports theobservekeyword. (#1175,
#1400) - Add
|=support to TraitDict for Python 3.9 and later. (#1306) - Add casting keyword to numeric array types. (#547)
- The Traits examples are now part of the Traits package, and so are
contributed toetsdemo. (#1275) - The Traits examples package now includes a beginner's tutorial. (#1061)
Performance
- Parsing of the
observestring was previously a performance bottleneck.
This has been fixed, by removing some redundant parsing calls and by caching
parsing results. (#1343, #1344, #1345)
Changes
- The
NoDefaultSpecifiedconstant (used as a default value for
theTraitTypedefault_valueargument) is now public, made
available fromtraits.api. (#1384, #1380, #1378) - The deprecation of the
TraitMaptrait type has been reversed, because
there are existing uses ofTraitMapthat are hard to replace.
Nevertheless, it is still not recommended to useTraitMapin new code.
UseMapinstead. (#1365) - An attempt to use
PrefixListwith an empty list, orPrefixMapor
Mapwith an empty dictionary, now raisesValueError. As a result,
the default default value (which used to beNone) is always valid.
(#1351) TraitListEventarguments are now keyword only. (#1346)- It's no longer necessary to specify a trait comparison mode of
ComparisonMode.identitywhen usingobserveto observe items
in aList,DictorSet. (#1165, #1328, #1240)
Deprecations
- The
FunctionandMethodtrait types are deprecated. Use
CallableorInstanceinstead. (#1399, #1397) - The
editparameter toconfigure_traitshas been deprecated. (#1311) - The
UnittestTools._catch_warningsfunction has been deprecated. (#1310) - The use of the
CHECK_INTERFACESglobal variable for automated
interface checking has been deprecated. (#1231)
Fixes
- Non-
TraitErrorexceptions raised duringTuplevalidation are now
propagated. Previously they were converted intoTraitError. (#1393) - Dynamic
RangeandEnumtraits are now properly validated
when inside a container (for exampleTupleorList). Previously
no validation was performed. (#1388, #1392) - Remove the unused module-level constant
traits.has_traits.EmptyList.
(#1366) - Don't hard-code class names in
__repr__implementations of
TraitListEvent,TraitSetEventandTraitDictEvent. (#1335) - Don't notify on empty
update\ s ofDicttraits. (#1308) - Fix exception raised when assigning a NumPy array to a
List
trait. (#1278) - Fix uses of deprecated
logger.warnfunction. (#1283) - Fix a bad
Instancetrait declaration for a private trait in
the_TraitChangeCollectorclass. (#1411)
Documentation
- Add "Tutorial" section to the main documentation, based on the
newtraits.examplestutorial content. (#1374) - Clarify that only the
apimodules should be used for imports. (#1387) - Update copyright header end years. (#1376)
- Update contents of
image_LICENSE.txt. (#1362) - Remove mentions of the removed functions
adaptsandimplementsfrom
the examples and tutorial. (#1367) - Move Traits introduction description to
index.rst. (#1358) - Fix path to Enthought logo when building docset. (#1285)
- Fix the
trait_documenterextension to be less fragile. (#1247) - Add user manual documentation for the
Instancetrait type. (#1395) - Document that the
List,DictandSettrait types copy on
assignment. (#1402) - Various other minor improvements, typo fixes, and other documentation fixes.
(#1396, #1383, #1381, #1384, #1292, #1355, #1350, #1319, #1292, #1401)
Cleanup and other maintenance
- Remove dead code. (#1281)
- Update
superusage to the usual Python 3 argument-less pattern. (#1280) - Remove per-import
# noqacomments inapimodules in favour of
per-file ignores in theflake8configuration. (#1269) - Remove out-of-date and non-functional coverage badge from README. (#1263)
- Rename
_i_observablemodule toi_observable. (#1296) - Refactor and simplify method checks. (#1176)
- Fix typo in optional_dependencies comment. (#1235)
- Use ComparisonMode constants instead of magic numbers. (#1229)
Test suite
- Prevent test_enum failures if traitsui or GUI toolkit are not installed.
(#1349) - Tests that require
pkg_resourcesare skipped ifsetuptoolsis not
installed. (#1301) - Fix an order-dependency bug in the
test_subclasses_weakrefregression
test. (#1290) - Fix a typo in a test method name. (#1309)
- Various additional or improved tests for existing code.
(#1359, #1336, #1330, #1248, #1225, #1208, #1209)
Build and development workflow changes
- Traits now uses GitHub Actions for continuous integration. The Travis CI
and Appveyor configurations have been removed. (#1296, #1360) - CI runs are no longer based on EDM. (#878)
- New CI run for the core test suite, without any optional dependencies.
(#1314) - Test Python 3.9 in the continuous integration (and drop tests for Python
3.5 and older). (#1326, #1313, , #1303) - Make
traits.examplesinto a package. (#1348) - Make examples directories
flake8-clean. (#1353) - Fix examples packaging nit. (#1363)
- Support
-hfor getting help inetstool.py. (#1347) - Add
shellcommand toetstool.py. (#1293) - Use the
flake8_etspackage in place of the localcopyright_header
package.
Thecopyright_headerpackage has been removed. (#1341) - Add script
check_observe_timing.pyto benchmark performance of
observeto compare withon_trait_change. (#1331) - Correct the minimum Sphinx version in README. (#1216, #1320)
- Restrict Sphinx version to avoid buggy versions. (#1276)
- Make
mypyan optional dependency. (#1289) - Speed up CI builds for Travis and Appveyor by caching the
pipdirectory
(now redundant). (#1241) - Add automated wheel and sdist building for Traits releases. (#1404, #1291)
- Add cron-job workflow to regularly test install of the latest releases
from PyPI. (#1406)
Traits 6.1.1
Traits 6.1.1 is a bugfix release fixing a handful of minor documentation and
test-related issues with the Traits 6.1.0 release. There are no API-breaking
changes in this release. It's recommended that all users of Traits 6.1.0
upgrade to Traits 6.1.1.
Fixes
- Don't mutate global state at import time in a test module. (#1222)
- Standardize and fix copyright years in source files. (#1227, #1198)
- Fix trait-documenter extension tests for Sphinx 3.1. (#1206)
- Fix trait-documenter extension to handle properties correctly. (#1246)
Documentation fixes
- Expand user manual to mention dispatch. (#1195)
- Fix some spelling and grammar errors in the user manual. (#1210)
- Fix description in README to match the one in the setup script. (#1219)
- Update PyPI links and capitalization in README.rst. (#1250)
- Fix user manual mentioning a nonexisting feature in metadata filter. (#1207)
- Fix typo in comment in optional_dependencies. (#1235)
Traits 6.1.0
Released: 2020-06-05
The Traits library is a foundational component of the Enthought Tool Suite. It
provides observable, typed attributes for Python classes, making those classes
suitable for event-driven dataflow programming and for immediate use as models
for graphical user interfaces, like those provided by the TraitsUI library.
Traits 6.1 is the latest feature release in the Traits 6 series, and contains
several major improvements.
Highlights of this release
-
A new
observationframework for observing traited
attributes and other observable objects has been introduced. This is intended
to provide a full replacement for the existingon_trait_change
mechanism, and aims to fix a number of fundamental flaws and limitations of
that mechanism. See theobserve-notificationsection of
the user manual for an introduction to this framework. -
New
TraitList,TraitDictandTraitSetclasses have been added,
subclassing Python's built-inlist,dictand
set(respectively). Instances of these classes are observable
objects in their own right, and it's possible to attach observers to them
directly. These classes were primarily introduced to support the new
observation framework, and are not expected to be used directly. The API for
these objects and their notification system is provisional, and may change in
a future Traits release. -
A new
Uniontrait type has been added. This is intended as a
simpler replacement for the existingEithertrait type, which
will eventually be deprecated. -
New
PrefixList,PrefixMapandMaptrait types
have been added. These replace the existingTraitPrefixList,
TraitPrefixMapandTraitMapsubclasses of
TraitHandler, which are deprecated. -
Typing stubs for the Traits library have been added in a
traits-stubspackage, which will be released separately to PyPI. This
should help support Traits-using projects that want to make use of type
annotations and type checkers likemypy.
Notes on upgrading
As far as possible, Traits 6.1 is backwards compatible with Traits 6.0.
However, there are a few things to be aware of when upgrading.
-
Traits 6.1 is not compatible with TraitsUI versions older than TraitsUI 7.0.
A combination of Traits 6.1 or later with TraitsUI 6.x or earlier will fail
to properly recogniseViewclass variables as
TraitsUI views, and an error will be raised if you attempt to create a
TraitsUI view. -
Traits now does no logging configuration at all, leaving all such
configuration to the application.In more detail: trait notification handlers should not raise exceptions in
normal use, so an exception is logged whenever a trait notification handler
raises. This part of the behaviour has not changed. What has changed is the
way that logged exception is handled under default exception handling.Previously, Traits added a
logging.StreamHandlerto the
top-level"traits"logger, so that trait notification exceptions would
always be visible. Traits also added alogging.NullHandlerto that
logger. Both of those handlers have now been removed. We now rely on
Python's "handler of last resort", which will continue to make notification
exceptions to the user visible in the absence of any application-level
log configuration. -
When listening for changes to the items of a
Listtrait, an index
or slice set operation no longer performs an equality check between the
replaced elements and the replacement elements when deciding whether to issue
a notification; instead, a notification is always issued if at least one
element was replaced. For example, consider the following class:class Selection(HasTraits): indices = List(Int) @on_trait_change("indices_items") def report_change(self, event): print("Indices changed: ", event)When replacing the
8with the same integer, we get this behavior:>>> selection = Selection(indices=[2, 5, 8]) >>> selection.indices[2] = 8 Indices changed: TraitListEvent(index=2, removed=[8], added=[8])Previously, no notification would have been issued.
-
The
Color,RGBColorandFonttrait factories
have moved to TraitsUI, and should be imported from there rather than from
Traits. For backwards compatibility, the factories are still
available in Traits, but they are deprecated and will eventually
be removed. -
As a reminder, the
UnicodeandLongtrait types are
deprecated since Traits 6.0. Please replace uses withStrand
Intrespectively. To avoid excessive noise in Traits-using
projects, Traits does not yet issue deprecation warnings for existing uses of
UnicodeandLong. Those warnings will be introduced in a
future Traits release, prior to the removal of these trait types.
Pending deprecations
In addition to the deprecations listed in the changelog below, some parts of
the Traits library are not yet formally deprecated, but are likely to be
deprecated before Traits 7.0. Users should be aware of the following possible
future changes:
-
The
Eithertrait type will eventually be deprecated. Where
possible, useUnioninstead. When replacing uses of
EitherwithUnion, note that there are some significant
API and behavioral differences between the two trait types, particularly with
respect to handling of defaults. See the user manual for
more details. -
The
trait_modifiedevent trait that's present on allHasTraits
subclasses will eventually be removed. Users should not rely on it being
present in an object'sclass_traitsdictionary. -
Trait names starting with
trait,traits,_traitor
_traitsmay become reserved for use by ETS at some point in the future.
Avoid using these names for your own traits.
Detailed PR-by-PR changes
More than 160 PRs went into this release. The following people contributed
code changes for this release:
- Ieva Cernyte
- Kit Yan Choi
- Maxime Costalonga
- Mark Dickinson
- Matt Hancock
- Midhun Madhusoodanan
- Shoeb Mohammed
- Franklin Ventura
- Corran Webster
Features
- Add
os.PathLikesupport forDirectorytraits. (#867) - Add
Uniontrait type. (#779, #1103, #1107, #1116, #1115) - Add
PrefixListtrait type. (#871, #1142, #1144, #1147) - Add
allow_noneflag forCallabletrait. (#885) - Add support for type annotation. (#904, #1064)
- Allow mutable values in
Constanttrait. (#929) - Add
MapandPrefixMaptrait types. (#886, #953, #956, #970, #1139,
#1189) - Add
TraitListas the base list object that can perform validation
and emit change notifications. (#912, #981, #984, #989, #999, #1003, #1011,
#1026, #1009, #1040, #1172, #1173) - Add
TraitDictas the base dict object that can perform validation and
emit change notifications. (#913) - Add
TraitSetas the base set object that can perform validation and
emit change notifications. (#922, #1043) - Implement
observeto supersedeon_trait_changefor observing trait
changes. (#976, #1000, #1007, #1065, #1023, #1066, #1070, #1069, #1067,
#1080, #1082, #1079, #1071, #1072, #1075, #1085, #1089, #1078, #1093, #1086,
#1077, #1095, #1102, #1108, #1110, #1112, #1117, #1118, #1123, #1125, #1126,
#1128, #1129, #1135, #1156)
Changes
- GUI applications using Traits 6.1 will require TraitsUI >= 7.0. (#1134)
TraitSetEventandTraitDictEventinitialization arguments are now
keyword-only. (#1036)TraitListObjectwill no longer skip notifications even if mutations
result in content that compares equally to the old values. (#1026)TraitListEvent.indexreported by mutations to a list is now normalized.
(#1009)- The default notification error handler for Traits no longer configures
logging, and the top-levelNullHandlerlog handler has been removed.
(#1161)
Fixes
- Allow assigning None to
CTrait.post_setattr. (#833) - Fix reference count error. (#907)
- Improve
HasTraitsintrospection withdir(). (#927) - Fix the datetime-to-str converters used in
DatetimeEditor. (#937) - Raise
TraitNotificationErroron trailing comma inon_trait_change.
(#926) - Fix exception swallowing by Trait attribute access. (#959, #960)
- Allow collections in valid values for
Enumtrait. (#889) - Fix
TraitErrorwhen mutating a list/dict/set inside another container.
(#1018) - Fix setting default values via dynamic default methods or overriding trait in
subclasses for mapped traits, used byMap,Expression,PrefixMap.
(#1091, #1188) - Fix setting default values via dynamic default methods or overriding trait in
subclasses forExpressionandAdaptsTo. (#1088, #1119, #1152)
Deprecations
traits.testing.nose_toolsis deprecated. (#880)SingletonHasTraits,SingletonHasStrictTraitsand
SingletonHasPrivateTraitsare deprecated. (#887)TraitMapis deprecated, useMapinstead. (#974)TraitPrefixMapis deprecated, usePrefixMapinstead. (#974)TraitPrefixListis deprecated, usePrefixList. (#974)Color,RBGColorandFontare now deprecated. Use the ones from
TraitsUI instead. (#1022)
Removals
traits_superis removed. (#1015)
Documentation
- Add details on creating custom trait properties. (#387)
- Cross reference special handler signatures for listening to nested attributes
in list and dict. (#894) - Replace 'Traits 5' with 'Traits 6' in the documentation. (#903)
- Use major.minor version in documentation. (#1124)
- Add initial documentation on Traits internals. (#958)
- Fix example class
OddInt. (#973) - Add Dos and Donts for writing change handle...
Traits 6.0.0
This is the final release for Traits 6.0.0. There were no changes (apart from the version number change) between the 6.0.0rc0 release candidate and the final release. See the 6.0.0rc0 release notes for the full list of changes since 5.2.0.
About Traits 6.0
Traits 6.0 is a major update to the Traits package, with a number of
backward incompatible changes from its predecessor. Notable changes:
- Python 2.7 is no longer supported; Traits 6.0 requires Python 3.5 or later.
- Trait types related to Python 2 (for example
UnicodeandLong) have
been deprecated in favour of their Python 3 equivalents (for exampleStr
andInt). - Many little-used historical features of Traits have been deprecated, and
are scheduled for removal in Traits 7.0. - Some historical features of Traits that had no evidence of external usage
were removed in Traits 6.0. - Introspection of
CTraitandHasTraitsobjects is greatly improved.
All of the internal state that was previously hidden within the C extension
is now accessible from Python. - The Traits codebase has undergone some significant reorganizations,
reformattings and style cleanups to make it easier to work with, and
to improve the separation between Traits and TraitsUI. - This release was focused mainly on cleanup and bugfixing. Nevertheless,
it contains a sprinkling of new features. There's a newDatetime
trait type. TheEnumtrait type now supports Python enumerations.
TheFiletrait type supports path-like objects.
More than 150 PRs went into this release. The following people contributed
code changes for this release:
- Kit Yan Choi
- Mark Dickinson
- Kevin Duff
- Robert Kern
- Midhun Madhusoodanan
- Shoeb Mohammed
- Sai Rahul Poruri
- Corran Webster
- John Wiggins
First release candidate for Traits 6.0.0
Release notes
Traits 6.0 is a major update to the Traits package, with a number of
backward incompatible changes from its predecessor. Notable changes:
- Python 2.7 is no longer supported; Traits 6.0 requires Python 3.5 or later.
- Trait types related to Python 2 (for example
UnicodeandLong) have
been deprecated in favour of their Python 3 equivalents (for exampleStr
andInt). - Many little-used historical features of Traits have been deprecated, and
are scheduled for removal in Traits 7.0. - Some historical features of Traits that had no evidence of external usage
were removed in Traits 6.0. - Introspection of
CTraitandHasTraitsobjects is greatly improved.
All of the internal state that was previously hidden within the C extension
is now accessible from Python. - The Traits codebase has undergone some significant reorganizations,
reformattings and style cleanups to make it easier to work with, and
to improve the separation between Traits and TraitsUI. - This release was focused mainly on cleanup and bugfixing. Nevertheless,
it contains a sprinkling of new features. There's a newDatetime
trait type. TheEnumtrait type now supports Python enumerations.
TheFiletrait type supports path-like objects.
More than 150 PRs went into this release. The following people contributed
code changes for this release:
- Kit Yan Choi
- Mark Dickinson
- Kevin Duff
- Robert Kern
- Midhun Madhusoodanan
- Shoeb Mohammed
- Sai Rahul Poruri
- Corran Webster
- John Wiggins
Porting guide
For the most part, existing code that works with Traits 5.2.0 should
continue to work with Traits 6.0.0 without changes. However, there
are some potentially breaking changes in Traits 6.0.0, and we recommend
applying caution when upgrading.
Here's a guide to dealing with some of the potentially breaking changes.
-
The
UnicodeandCUnicodetrait types are now simply synonyms for
StrandCStr.UnicodeandCUnicodeare considered deprecated.
For now, no deprecation warning is issued on use of these deprecated trait
types, but in Traits 6.1.0 and later, warnings may be issued, and in Traits
7.0.0 these trait types may be removed. It's recommended that users update
all uses ofUnicodetoStrandCUnicodetoCStrto avoid
warnings or errors in the future. -
Similarly,
LongandCLongare now synonyms forIntandCInt.
The same recommendations apply as for theUnicode/Strtrait types. -
Uses of
NO_COMPARE,OBJECT_IDENTITY_COMPAREandRICH_COMPARE
should be replaced with the appropriateComparisonModeenumeration
members. -
The validation for a
Instance(ISomeInterface)trait type has changed,
whereISomeInterfaceis a subclass ofInterface. Previously, an
assignment to such a trait validated the type of the assigned value against
the interface, method by method. Now anisinstancecheck is performed
against the interface instead. Make sure that classes implementing a given
interface have the appropriateprovidesdecorator.One notable side-effect of the above change is that plain
mock.Mock
instances can no longer be assigned toInstance(ISomeInterface)traits.
To get around this, usespec=ISomeInterfacewhen creating your mock
object.This change does not affect
Instancetraits for non-interface classes. -
The format of
TraitListEventshas changed: for list events generated from
a slice set or slice delete operation where that slice had a step other
than1, theaddedandremovedfields of the event had an extra
level of list wrapping (for example,addedmight be[[1, 2, 3]]
instead of[1, 2, 3]). In Traits 6.0, this extra wrapping has been
removed. There may be existing code that special-cased the extra wrapping. -
Many classes and functions have moved around within the Traits codebase.
If you have code that imports directly from Traits modules and subpackages
instead of fromtraits.apior the other subpackageapimodules, some
of those imports may fail. To avoid potential forImportErrors, you
should import fromtraits.apiwhenever possible. If you find yourself
needing some piece of Traits functionality that isn't exposed in
traits.api, and you think it should be, please open an issue on the
Traits bug tracker.
Features
-
Support Python Enums as value sets for the
Enumtrait. (#685, #828, #855) -
Add
Subclassalias for theTypetrait type. (#739) -
Add path-like support for the
Filetrait. (#736) -
Add new
ComparisonModeenumeration type to replace the old
NO_COMPARE,OBJECT_IDENTITY_COMPAREandRICH_COMPARE
constants. The old constants are deprecated. (#830, #719, #680) -
Add fast validation for
Callabletrait type; introduce
newBaseCallabletrait type for subclassing purposes.
(#798, #795, #767) -
Add
CTrait.comparison_modeproperty to allow inspection and
modification of a trait's comparison mode. (#758, #735) -
Add
as_ctraitconverter function totraits.api. This function
converts a trait-like object or type to aCTrait, raisingTypeError
for objects that can't be interpreted as aCTrait. It's intended
for use by users who want to create their own parameterised trait
types.The
as_ctraitfeature comes with, and relies upon, a new informal
interface: objects that can be converted to something of typeCTraitcan
provide an zero-argumentas_ctraitmethod that returns a newCTrait.
Types can provide aninstantiate_and_get_ctraitmethod, which when
called with no arguments provides a newCTraitfor that type.
(#783, #794) -
Add a new
HasTraits._class_traitsmethod for introspection of an
object's class traits. This parallels the existing
HasTraits._instance_traitsmethod. This method is intended for use in
debugging. It's not recommended for users to modify the returned dictionary.
(#702) -
Add
CTrait.set_default_valuemethod for setting information about the
default of aCTrait. This provides an alternative to the previous method
of usingCTrait.default_value. The use ofCTrait.default_valueto set
(rather than get) default information is deprecated. (#620) -
Add new methods
HasTraits._trait_notifications_enabled,
HasTraits._trait_notifications_vetoedto allow introspection of the
notifications states set by the existing methods
HasTraits._trait_change_notifyandHasTraits._trait_veto_notify.
(#704) -
Add
TraitKind,ValidateTraitandDefaultValuePython enumeration
types to replace previous uses of magic integers within the Traits codebase.
(#680, #857) -
The various
CTraitinternal flags are now exposed to Python as
properties:CTrait.is_property(read-only),CTrait.modify_delegate,
CTrait.setattr_original_value,CTrait.post_setattr_original_value,
CTrait.is_mapped, andCTrait.comparison_mode. (#666, #693)
Changes
- When pickling a
CTrait, thepy_post_setattrandpy_validate
fields are pickled directly. Previously, callables for those fields were
replaced with a-1sentinel on pickling. (#780) - A
TraitListEventis no longer emitted for a slice deletion which
doesn't change the contents of the list. (For example,del obj.mylist[2:]
on a list that only has 2 elements.) (#740) - The
addedandremovedattributes on aTraitListEventare now
always lists containing the added or removed elements. Previously, those
lists were nested inside another list in some cases. (#771) - Change
Instance(ISomeInterface)to use anisinstancecheck on
trait set instead of using the dynamic interface checker. (#630) - Create an new
AbstractViewElementabstract base class, and register
the TraitsUIViewElementas implementing it. This paves the way for
removal of Traits UI imports from Traits. (#617) ViewElementsare now computed lazily, instead of atHasTraits
subclass creation time. This removes atraitsuiimport from
thetrait.has_traitsmodule. (#614)- The
traits.util.clean_filenameutility now uses a different algorithm,
and should do a better job with accented and Unicode text. (#589) - Floating-point and integer checks are now more consistent between classes.
In particular,BaseIntvalidation now matchesIntvalidation, and
Rangetype checks now match those used inIntandFloat. (#588) - An exception other than
TraitErrorraised during validation of a
compound trait will now be propagated. Previously, that exception would
be swallowed. (#581) - Traits no longer has a runtime dependency on the
sixpackage. (#638) - Use pickle protocol 3 instead of pickle protocol 1 when writing pickled
object state to a file inconfigure_traits. (#796) - In
traits.testing.optional_dependencies, make suretraitsui.apiis
available whenevertraitsuiis. (#616) TraitInstancenow inherits directly fromTraitHandlerinstead of
(the now removed)ThisClass. (#761)
Fixes
- Fix a use of the unsupported
ValidateTrait.int_range. (#805) - Remove unnecessary
copymethod override fromTraitSetObject. (#759) - Fix
TraitListObject.clearto issue the appropriate items event. (#732) - Fix confusing error message when
[None]passed into
List(This(allow_none=False)). (#734) - Fix name-mangling of double-underscore private methods in classes whose
name begins with an underscore. (#724) - Fix
bytes_editorand ``passw...
Traits version 5.2.0
This is a minor feature release, with various small updates and bugfixes.
The most notable user-facing changes are the deprecation of the Category class, which is scheduled for removal in Traits 6.0.0, and the removal of the Class, ListClass and ListInstance Trait types, which relate to old-style Python 2 classes.
Summary of changes since the 5.1.2 release:
Enhancements
- Support installation from source archives. (#528)
Fixes
- Ensure
TraitListEvent.indexis always an integer. (#548) - Update the deprecated
collections.MutableMappingimport. (#530) - Fix inadvertent modification of the
Categorybase class. (#509) - Rework version handling in
setup.py. (#515) - Don't autogenerate documentation for
ViewElement. (#559) - Ensure that all tests are
unittestcompatible. (#551)
Changes
- Replace occurences of deprecated
AdaptsTowithSupports. (#532) - Remove
Classtrait. (#520) - Deprecate
Categorytrait. (#510) - Fix typos in docstrings. (#502)
- Use decorator form of
classmethod. (#500) - Remove redefinition of
NullHandler. (#518) - Add an import check helper. (#521)
- Clean up Cython tests. (#555)
- Clean up test output. (#553)
Miscellaneous
- Update EDM version on CI to version 2.0.0. (#560)
- Don't finish fast on CI. (#556)
- Use
unittestto run tests in CI. (#552) - Low-level fixes and style cleanup in
etstool.py. (#550) - Add
--editableoption forinstall,updateCI commands. (#546) - Make git commit hash available to archives. (#526)
- Fix use of non-edm envs as bootstrap envs on Windows. (#512)
- Remove edm installed package before installing from source. (#516)
- Add help text to click options. (#514)
- Various cleanups, fixes and enhancements in
etstool.py. (#511)
Traits version 5.1.2
This is a bugfix release that fixes an issue with the traits-documenter Sphinx extension. This issue produced invalid reST from Traits with multiline definitions, and could prevent PDF documentation builds from completing successfully.
Fixes
- Traits documenter no longer generates bad reST for traits whose definition
spans multiple source lines. (#494)
Traits version 5.1.1
This is a bugfix release, fixing a regression in Traits 5.1.0 that prevented Traits UI applications working correctly on Python 2.7. (The bug does not affect Python 3.)
Released: 2019-04-18
Fixes
Traits version 5.1.0
Summary
This release reverts a feature introduced into the 5.0.0 release, namely pickleability and deep copying of dynamically added traits (traits added via the add_trait method). That feature unfortunately introduced some unexpected breakage, so has had to be reverted for the time being.
The release also includes various other minor features and fixes.
Enhancements
- Make UUID trait initializable. (#459)
- Change default
FileEditorbehavior for aFiletrait based on
whetherexists=Trueis specified for that trait. (#451, #467)
Changes
- The changes made in #373 to make dynamically-added traits pickleable have
been reverted. (#462) traits.api.python_versionhas been removed. Internals have been
refactored to usesix.PY2in preference tosys.version_info.
(#449)- Don't depend on the 3rd party
mocklibrary on Python 3; use
unittest.mockinstead. (#446)
Fixes
- Fix a fragile NumPy-related test that failed (
RuntimeError: empty_like method already has a docstring) with the newest version of NumPy.
(#443)
Miscellaneous
traits._version.git_revisionnow gives the full commit hash (for local
builds) instead of an abbreviated 7 hex-digit version. (#453)- Fix copyright years in documentation build. (#445)
- Rename
README.txttoREADME.rst, so that GitHub renders it nicely. - Code cleanups: remove "EOF" markers from code. Remove
__main__blocks
for unit tests. Remove imports ofunittestfromunittest_tools.
(#448, #446) - Update Travis CI and Appveyor configurations to run tests against
all PR branches, not just PRs against master. (#466)
5.0.0 release of Traits
This major release accumulates more than an year's worth of improvements,
changes and bug fixes to the code base.
A few highlights of this release are :
- Removal of 2to3 fixers and the use of six to provide Python 2/3 compatibility
- Removal of deprecated
traits.protocolssubmodule and related utils. - New
HasRequiredTraitsclass - Better IPython tab completion for
HasTraitssubclasses
See the changelog for the complete list of changes included in this release.