Changes in Traitlets¶
4.3¶
4.3.3¶
4.3.3 backports some small bugfixes and improvements:
Adds
Application.loaded_config_files
property for accessing config files that have been loaded and makes the property idempotent on multiple loads.
4.3.2¶
4.3.2 is a tiny release, relaxing some of the deprecations introduced in 4.1:
using
_traitname_default()
without the@default
decorator is no longer deprecated.Passing
config=True
in traitlets constructors is no longer deprecated.
4.3.1¶
Compatibility fix for Python 3.6a1
Fix bug in Application.classes getting extra entries when multiple Applications are instantiated in the same process.
4.3.0¶
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, the
'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¶
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¶
JSONFileConfigLoader
can 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
super()
inHasTraits.__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 = True
to 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.
Deprecate
Trait(config=True)
in favor ofTrait().tag(config=True)
. In general, metadata is added viatag
instead of the constructor.
Other changes:
Trait attributes initialized with
read_only=True
can only be set with theset_trait
method. Attempts to directly modify a read-only trait attribute raises aTraitError
.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.
4.0 - 2015-06-19¶
First release of traitlets as a standalone package.