NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #243 most downloaded on PyPI
Traitlets Python configuration system
Last release 2 months ago
03 Aug 2026
Ships unpredictably
gaps range from 2 weeks to 2.0 years
Most releases are documented
notes for 39 of 47 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
57 releases · first in 2013
Re-add _merge to un-break spyder temporarily. #963 ( @Carreau , @ccordoba12 )
The following people contributed discussions, new ideas, code and documentation contributions, and review.
See our definition of contributors.
(GitHub contributors page for this release)
@Carreau (activity) | @ccordoba12 (activity)
One column per quarter.
Fix broken examples and wrong docstrings in documentation, deprecate old aliases CLong/Long. #948 ( @Carreau , @claude )
The following people contributed discussions, new ideas, code and documentation contributions, and review.
See our definition of contributors.
(GitHub contributors page for this release)
@Carreau (activity) | @cjwatson (activity) | @claude (activity) | @minrk (activity) | @SAY-5 (activity) | @yuvipanda (activity)
Maintenance and upkeep improvements
The following people contributed discussions, new ideas, code and documentation contributions, and review.
See our definition of contributors.
(GitHub contributors page for this release)
@Carreau (activity) | @krassowski (activity) | @rmorshea (activity)
Pin virtualenv<21 in tests because of breaking change incompatible wi… #937 ( @JohanMabille , @SylvainCorlay )
__new__ method to use Self type for improved type hinting #918 (@fleming79, @minrk)traitlets.__all__ #933 (@kylebarron, @minrk)return t.cast which can prevent attribute access during process teardown #913 (@minrk, @Carreau)__del__ #912 (@minrk, @Carreau)isidentifier utility #915 (@minrk, @Carreau)package_spec #914 (@minrk)bunch.__dir__ #906 (@sethtroisi, @minrk)The following people contributed discussions, new ideas, code and documentation contributions, and review.
See our definition of contributors.
(GitHub contributors page for this release)
@Carreau (activity) | @EwoutH (activity) | @fleming79 (activity) | @ivanov (activity) | @JohanMabille (activity) | @kylebarron (activity) | @minrk (activity) | @ryumasai (activity) | @sethtroisi (activity) | @SylvainCorlay (activity)
Fix assigning string value to Set #903 ( @azjps )
Maintenance and upkeep improvements
FIX: map - to _ for environement variable prefix. #895 ( @Carreau )
Add option to load traitlets values from environement. #856 ( @Carreau )
Use passed-in info argument for TraitType.error() #884 ( @kylebarron )
info argument for TraitType.error() #884 (@kylebarron)Pass kwds in MetaHasDescriptors new and init #881 ( @fleming79 )
(GitHub contributors page for this release)
@blink1073 | @bollwyvl | @fleming79 | @pre-commit-ci | @shadchin
More typing cleanup #877 (@blink1073)
Typing fixups #875 (@blink1073)
More Typing Adoption #873 (@blink1073)
Typing upgrades #868 (@blink1073)
Added type hints to HasTraits.observe() and friends. (#834 #834 (@scholer)
MyClass to School #858 (@metaperl)proposal['value'] the only thing that can be returned #855 (@metaperl)(GitHub contributors page for this release)
@blink1073 | @dcsaba89 | @dependabot | @maartenbreddels | @metaperl | @NickCrews | @pre-commit-ci | @rmorshea | @saulshanabrook | @scholer
Polishing argcomplete support #829 (@azjps)
(GitHub contributors page for this release)
@azjps | @blink1073 | @Carreau
fix: mro_trait can be unbound when the class is not in mro #824 (@maartenbreddels)
-Shell command-line tab-completion via argcomplete #811 (@azjps)
-Shell command-line tab-completion via argcomplete #811 (@azjps)
(GitHub contributors page for this release)
@azjps | @blink1073 | @minrk
fix: some descriptors raise AttributeError #812 (@maartenbreddels)
Performance: decrease runtime overhead for constructing HasTraits (up to 20x faster) #777 (@maartenbreddels)
(GitHub contributors page for this release)
@azjps | @blink1073 | @maartenbreddels | @naterush | @pre-commit-ci
Adopt jupyter releaser #806 (@blink1073)
(GitHub contributors page for this release)
@blink1073 | @dependabot | @maartenbreddels | @pre-commit-ci | @rmorshea
Update tests and docs to use non-deprecated functions by @jasongrout in https://github.com/ipython/traitlets/pull/778
Full Changelog: https://github.com/ipython/traitlets/compare/5.4.0...5.5.0
Fix version_info by @minrk in https://github.com/ipython/traitlets/pull/749
Fix version_info by @minrk in https://github.com/ipython/traitlets/pull/749
Make generated config files more lintable by @minrk in https://github.com/ipython/traitlets/pull/750
Fix union from string by @krassowski in https://github.com/ipython/traitlets/pull/773
Cover more Union parsing scenarios by @krassowski in https://github.com/ipython/traitlets/pull/774
Upgrade GitHub Actions by @cclauss in https://github.com/ipython/traitlets/pull/760
Fix and refactor downstream tests by @blink1073 in https://github.com/ipython/traitlets/pull/767
Test only the server part of notebook by @blink1073 in https://github.com/ipython/traitlets/pull/769
Add security.md, and tidelift bage by @Carreau in https://github.com/ipython/traitlets/pull/771
Full Changelog: https://github.com/ipython/traitlets/compare/5.3.0...5.4.0
Fix traitlet name in docstring by @fcollonval in https://github.com/ipython/traitlets/pull/745
Full Changelog: https://github.com/ipython/traitlets/compare/5.2.2...5.3.0
Nothing published for this version
Nothing published for this version
Make __all__ explicit and validate in test by @blink1073 in https://github.com/ipython/traitlets/pull/737
Full Changelog: https://github.com/ipython/traitlets/compare/5.2.1...5.3.0
traitlets.__all__ explicit and validate in test.KeyError in Application.get_default_logging_config.Nothing published for this version
Switch to hatch backend by @blink1073 in https://github.com/ipython/traitlets/pull/728
Full Changelog: https://github.com/ipython/traitlets/compare/5.2.0...5.2.1
ValueError: Unable to configure formatter 'console' traceback.Add mypy support by @blink1073 in https://github.com/ipython/traitlets/pull/705
Add mypy support by @blink1073 in https://github.com/ipython/traitlets/pull/705
Disambiguate the use of the term value in the example. by @metaperl in https://github.com/ipython/traitlets/pull/694
Correct spelling and grammar errors. by @metaperl in https://github.com/ipython/traitlets/pull/695
DOC: Add log example by @Carreau in https://github.com/ipython/traitlets/pull/693
Put description of signature_has_traits after the header for it. by @metaperl in https://github.com/ipython/traitlets/pull/711
Application: add logging_config trait by @oliver-sanders in https://github.com/ipython/traitlets/pull/698
[DOC] Give explicit list of private symbols for 5.0 by @vidartf in https://github.com/ipython/traitlets/pull/692
Add pre-commit and run auto-formatters by @blink1073 in https://github.com/ipython/traitlets/pull/699
Fix downstream test by @blink1073 in https://github.com/ipython/traitlets/pull/701
Add docs on pre-commit and use manual hooks where appropriate by @blink1073 in https://github.com/ipython/traitlets/pull/700
Set up flake8 by @blink1073 in https://github.com/ipython/traitlets/pull/703
Typing: tell mypy we have type, update all. by @Carreau in https://github.com/ipython/traitlets/pull/713
Improve CI by @blink1073 in https://github.com/ipython/traitlets/pull/706
Fix typing errors by @blink1073 in https://github.com/ipython/traitlets/pull/718
Use flit build backend by @blink1073 in https://github.com/ipython/traitlets/pull/720
Add Changelog Entry for 5.2.0 by @blink1073 in https://github.com/ipython/traitlets/pull/717
Full Changelog: https://github.com/ipython/traitlets/compare/5.1.1...5.2.0
Traitlets 5.2 brings a couple of updates and changes to traitlets, and is recommended for all users. What follows is a non-exhaustive list of changes:
5.1.1 fixes compatibility issues with Python 3.10 (rc2).
5.1.1 fixes compatibility issues with Python 3.10 (rc2).
Stop recommendation of CUnicode in some circumstances as it's deprecated.
Traitlets 5.1 brings a couple of updates and changes to traitlets, and is recommended for all users. What follow is a non-exhaustive list of changes:
ipython_genutils dependency, this should remove
any direct and indirect reliance on nose and prepare traitlets
5.1 for Python 3.10 and above compatibility, some test suite
changes also accommodate Python 3.10 changes. If you package
traitlets downstream, make sure to remove this dependency.ipython_genutils may have change the default encoding
detected for the command line argument parsing when not utf-8. We
expect this to affect a small portion of older windows version. If
you encounter issue let us know.CUnicode in some circumstances as it's
deprecated..github folder now, and can remove exclusion
ofSupport deprecated literals for sets, tuples on the command-line: nbconvert --TagRemovePreprocessor.remove_cell_tags='{"tag"}'
nbconvert --TagRemovePreprocessor.remove_cell_tags='{"tag"}'from_string_list for Tuples in generalList(default_value=None, allow_none=True) and
other Container traitsSupport deprecated use of byte-literals for bytes on the command-line: ipython kernel --Session.key="b'abc'". The b prefix is no longer needed in trai…
ipython kernel --Session.key="b'abc'". The
b prefix is no longer needed in traitlets 5.0, but is
supported for backward-compatibilityFix regression in handling --opt=None on the CLI for configurable traits with allow_none=True
--opt=None on the CLI for
configurable traits with allow_none=True- Fix casting bytes to unicode
Nothing published for this version
(This is an in-progress changelog, please let us know if something is missing/or could be phrased better)
(This is an in-progress changelog, please let us know if something is missing/or could be phrased better)
Traitlets 5.0 is a new version of traitlets that accumulate changes over a period of more close to four years; A number of internal refactoring made the internal code structure cleaner and simpler, and greatly improved the diagnostic error messages as well has help and documentation generation.
We expect no code change needed for any consumer of the Python API (ipywidgets, and alike), though CLI argument parsing have seen a complete rewrite, so if you have an application that does use the parsing logic of traitlets you may see changes in behavior, and now have access to more features. There was also a cleanup of what was considered a part of the public API, certain previously exposed utility functions and types are no longer available. Please see an exhaustive list below.
::: seealso
commandline docs for details about
command-line parsing and the changes in 5.0.
Please let us know if you find issues with the new command-line parsing changes. :::
We also want to thanks in particular a number of regular contributor through the years that have patiently waited for their often large contribution to be available, if rough order of number of contribution:
As well as many of the passer-by, and less frequent contributors:
Major changes are:
six as a dependencyfuncsig as a dependency.Here is a list of most Pull requests that went into 5.0 and a short description.
Applicationtrait package for Dictionaries and add the key_trait parameters
allowing to restrict the type of the key of a mapping. The
constructor parameters trait and traits are renamed to
value_trait and per_key_traits.- and --.Callable trait.--Application.show_config=True which will make by default any
application show it configuration, all the files it loaded
configuration from, and exit.default
method, and #525 adds a warning
that Undefinedis deprecated.self and cls
in __new__ method for genericity.FuzzyEnum trait that allow case
insensitive and unique prefix matching.trait_values method to extra a mapping of trait and
their values.Link now have a
transform attribute (taking two functions inverse of each other),
that affect how a value is mapped between a source and a target.Link now have a
link method to re-link object after
unlink has been called.trait_has_value, returning a boolean to know if a
value has been assigned to a trait (excluding the default), in order
to help avoiding circular validation at initialisation.__all__ to avoid exposing implementation details..info_rst() to
let traitlets overwrite the automatically generated rst
documentation.Application instance
in projects using traitlets.except:
meaning traitlets will not catch a number of
BaseException s anymore.Sentinel Traitlets was
made public by mistake and is now deprecated.This list is auto-generated by frappuccino, comparing with traitlets
4.3.3 API and edited for shortness:
The following items are new:
+ traitlets.Sentinel
+ traitlets.config.application.Application.emit_alias_help(self)
+ traitlets.config.application.Application.emit_description(self)
+ traitlets.config.application.Application.emit_examples(self)
+ traitlets.config.application.Application.emit_flag_help(self)
+ traitlets.config.application.Application.emit_help(self, classes=False)
+ traitlets.config.application.Application.emit_help_epilogue(self, classes)
+ traitlets.config.application.Application.emit_options_help(self)
+ traitlets.config.application.Application.emit_subcommands_help(self)
+ traitlets.config.application.Application.start_show_config(self)
+ traitlets.config.application.default_aliases
+ traitlets.config.application.default_flags
+ traitlets.config.default_aliases
+ traitlets.config.default_flags
+ traitlets.config.loader.DeferredConfig
+ traitlets.config.loader.DeferredConfig.get_value(self, trait)
+ traitlets.config.loader.DeferredConfigList
+ traitlets.config.loader.DeferredConfigList.get_value(self, trait)
+ traitlets.config.loader.DeferredConfigString
+ traitlets.config.loader.DeferredConfigString.get_value(self, trait)
+ traitlets.config.loader.LazyConfigValue.merge_into(self, other)
+ traitlets.config.loader.Undefined
+ traitlets.config.loader.class_trait_opt_pattern
+ traitlets.traitlets.BaseDescriptor.subclass_init(self, cls)
+ traitlets.traitlets.Bool.from_string(self, s)
+ traitlets.traitlets.Bytes.from_string(self, s)
+ traitlets.traitlets.Callable
+ traitlets.traitlets.Callable.validate(self, obj, value)
+ traitlets.traitlets.CaselessStrEnum.info(self)
+ traitlets.traitlets.CaselessStrEnum.info_rst(self)
+ traitlets.traitlets.Complex.from_string(self, s)
+ traitlets.traitlets.Container.from_string(self, s)
+ traitlets.traitlets.Container.from_string_list(self, s_list)
+ traitlets.traitlets.Container.item_from_string(self, s)
+ traitlets.traitlets.Dict.from_string(self, s)
+ traitlets.traitlets.Dict.from_string_list(self, s_list)
+ traitlets.traitlets.Dict.item_from_string(self, s)
+ traitlets.traitlets.Enum.from_string(self, s)
+ traitlets.traitlets.Enum.info_rst(self)
+ traitlets.traitlets.Float.from_string(self, s)
+ traitlets.traitlets.FuzzyEnum
+ traitlets.traitlets.FuzzyEnum.info(self)
+ traitlets.traitlets.FuzzyEnum.info_rst(self)
+ traitlets.traitlets.FuzzyEnum.validate(self, obj, value)
+ traitlets.traitlets.HasTraits.trait_defaults(self, *names, **metadata)
+ traitlets.traitlets.HasTraits.trait_has_value(self, name)
+ traitlets.traitlets.HasTraits.trait_values(self, **metadata)
+ traitlets.traitlets.Instance.from_string(self, s)
+ traitlets.traitlets.Int.from_string(self, s)
+ traitlets.traitlets.ObjectName.from_string(self, s)
+ traitlets.traitlets.TCPAddress.from_string(self, s)
+ traitlets.traitlets.TraitType.default(self, obj='None')
+ traitlets.traitlets.TraitType.from_string(self, s)
+ traitlets.traitlets.Unicode.from_string(self, s)
+ traitlets.traitlets.Union.default(self, obj='None')
+ traitlets.traitlets.UseEnum.info_rst(self)
+ traitlets.traitlets.directional_link.link(self)
+ traitlets.traitlets.link.link(self)
+ traitlets.utils.cast_unicode(s, encoding='None')
+ traitlets.utils.decorators
+ traitlets.utils.decorators.Undefined
+ traitlets.utils.decorators.signature_has_traits(cls)
+ traitlets.utils.descriptions
+ traitlets.utils.descriptions.add_article(name, definite=False, capital=False)
+ traitlets.utils.descriptions.class_of(value)
+ traitlets.utils.descriptions.describe(article, value, name='None', verbose=False, capital=False)
+ traitlets.utils.descriptions.repr_type(obj)
The following items have been removed (or moved to superclass):
- traitlets.ClassTypes
- traitlets.SequenceTypes
- traitlets.config.absolute_import
- traitlets.config.application.print_function
- traitlets.config.configurable.absolute_import
- traitlets.config.configurable.print_function
- traitlets.config.loader.KeyValueConfigLoader.clear
- traitlets.config.loader.KeyValueConfigLoader.load_config
- traitlets.config.loader.flag_pattern
- traitlets.config.loader.kv_pattern
- traitlets.config.print_function
- traitlets.traitlets.ClassBasedTraitType.error
- traitlets.traitlets.Container.element_error
- traitlets.traitlets.List.validate
- traitlets.traitlets.TraitType.instance_init
- traitlets.traitlets.Union.make_dynamic_default
- traitlets.traitlets.add_article
- traitlets.traitlets.class_of
- traitlets.traitlets.repr_type
- traitlets.utils.getargspec.PY3
- traitlets.utils.importstring.string_types
- traitlets.warn_explicit
The following signatures differ between versions:
- traitlets.config.application.Application.generate_config_file(self)
+ traitlets.config.application.Application.generate_config_file(self, classes='None')
- traitlets.config.application.catch_config_error(method, app, *args, **kwargs)
+ traitlets.config.application.catch_config_error(method)
- traitlets.config.configurable.Configurable.class_config_section()
+ traitlets.config.configurable.Configurable.class_config_section(classes='None')
- traitlets.config.configurable.Configurable.class_get_trait_help(trait, inst='None')
+ traitlets.config.configurable.Configurable.class_get_trait_help(trait, inst='None', helptext='None')
- traitlets.config.loader.ArgParseConfigLoader.load_config(self, argv='None', aliases='None', flags='None')
+ traitlets.config.loader.ArgParseConfigLoader.load_config(self, argv='None', aliases='None', flags='<deprecated>', classes='None')
- traitlets.traitlets.Dict.element_error(self, obj, element, validator)
+ traitlets.traitlets.Dict.element_error(self, obj, element, validator, side='Values')
- traitlets.traitlets.HasDescriptors.setup_instance(self, *args, **kwargs)
+ traitlets.traitlets.HasDescriptors.setup_instance(*args, **kwargs)
- traitlets.traitlets.HasTraits.setup_instance(self, *args, **kwargs)
+ traitlets.traitlets.HasTraits.setup_instance(*args, **kwargs)
- traitlets.traitlets.TraitType.error(self, obj, value)
+ traitlets.traitlets.TraitType.error(self, obj, value, error='None', info='None')
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
4.3.2 is a tiny release, relaxing some of the deprecations introduced in 4.3.1:
4.3.2 is a tiny release, relaxing some of the deprecations introduced in 4.3.1:
_traitname_default() without
the @default decorator is no longer deprecated.config=True in traitlets constructors is no longer
deprecated.Compatibility fix for Python 3.6a1
Reduce number of common deprecation messages in certain cases.
Application.raise_config_file_errors, so that config file errors can
result in exiting immediately.'traitlets' logger will be used instead of the root logger.Nothing published for this version
Partially revert a change in 4.1 that prevented IPython's command-line options from taking priority over config files.
Partially revert a change in 4.1 that prevented IPython's command-line options from taking priority over config files.
Demotes warning about unused arguments in HasTraits.__init__ introduced in 4.2.0 to DeprecationWarning.
Demotes warning about unused arguments in HasTraits.__init__
introduced in 4.2.0 to DeprecationWarning.
JSONFileConfigLoader can be used as a context manager for updating configuration.
JSONFileConfigLoader can be used
as a context manager for updating configuration.super() in HasTraits.__init__,
improving support for multiple inheritance.raise_config_file_errors = True
to exit on failure to load config files, instead of the default of
logging the failures.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →