This documentation is for a development version of Traitlets. There may be significant differences from the latest stable release.
Changes in Traitlets¶
4.3.2 is a tiny release, relaxing some of the deprecations introduced in 4.1:
@defaultdecorator is no longer deprecated.
config=Truein traitlets constructors is no longer deprecated.
- Compatibility fix for Python 3.6a1
- Fix bug in Application.classes getting extra entries when multiple Applications are instantiated in the same process.
- Improve the generated config file output.
- Allow TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR env to override
Application.raise_config_file_errors, so that config file errors can result in exiting immediately.
- Avoid using root logger. If no application logger is registered,
'traitlets'logger will be used instead of the root logger.
- Change/Validation arguments are now Bunch objects, allowing attribute-access, in addition to dictionary access.
- Reduce number of common deprecation messages in certain cases.
- Ensure command-line options always have higher priority than config files.
- Add bounds on numeric traits.
- Improves various error messages.
4.2.2 - 2016-07-01¶
Partially revert a change in 4.1 that prevented IPython’s command-line options from taking priority over config files.
4.2.1 - 2016-03-14¶
Demotes warning about unused arguments in
HasTraits.__init__ introduced in 4.2.0 to DeprecationWarning.
4.2.0 - 2016-03-14¶
JSONFileConfigLoadercan be used as a context manager for updating configuration.
- If a value in config does not map onto a configurable trait, a message is displayed that the value will have no effect.
- Unused arguments are passed to
HasTraits.__init__, improving support for multiple inheritance.
- Various bugfixes and improvements in the new API introduced in 4.1.
- Application subclasses may specify
raise_config_file_errors = Trueto exit on failure to load config files, instead of the default of logging the failures.
4.1 - 2016-01-15¶
Traitlets 4.1 introduces a totally new decorator-based API for configuring traitlets. Highlights:
- Decorators are used, rather than magic method names, for registering trait-related methods. See Using Traitlets and Migration from Traitlets 4.0 to Traitlets 4.1 for more info.
Trait(config=True)in favor of
Trait().tag(config=True). In general, metadata is added via
taginstead of the constructor.
- Trait attributes initialized with
read_only=Truecan only be set with the
set_traitmethod. Attempts to directly modify a read-only trait attribute raises a
- The directional link now takes an optional transform attribute allowing the modification of the value.
- Various fixes and improvements to config-file generation (fixed ordering, Undefined showing up, etc.)
- Warn on unrecognized traits that aren’t configurable, to avoid silently ignoring mistyped config.