# What changed in traitlets

> 29 changes in traitlets 5 from its official release notes, upgrade guides and advisories: 8 breaking, 5 deprecations, 9 new APIs and options. Each one cited. Sources checked 2026-11-12. HTML: https://unstale.sh/pypi/traitlets/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## traitlets 5

### Breaking changes

- Python 3.10 is now required. (5.16.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.16.0)
- Python 3.9 is now required; Python 3.8 is no longer supported. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)
- Traitlets no longer catches a number of BaseException subclasses. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Command-line parsing was rewritten to use argparse, changing behavior and allowing more flexibility in assigning literals without quoting. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Traitlets now provides a singular default method for declaring default values. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- The container constructor parameter trait was renamed to value_trait. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Several previously exposed utility functions and types are no longer available, including ClassTypes, SequenceTypes, getargspec, and isidentifier. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- The container constructor parameter traits was renamed to per_key_traits. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)

### Deprecations

- Deprecates the old CLong alias. (5.16.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.16.0)
- Deprecates the old Long alias. (5.16.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.16.0)
- The empty isidentifier utility is deprecated. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)
- The old way of passing containers on the command line is deprecated and emits a warning. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Undefined is deprecated and emits a warning. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)

### New APIs and options

- Adds a trait for pathlib.Path values. (5.16.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.16.0)
- Aliases can have both short and long versions, and alias dictionary values can include a target and help string. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Applications expose the loaded configuration file list for long-running services. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- A Callable trait was added for validating callable values. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- A FuzzyEnum trait was added with case-insensitive matching and unique-prefix matching. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Dictionaries can restrict the type of their keys using the new key_trait parameter. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Link objects can be relinked after unlink has been called. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Link now accepts a transform attribute with inverse functions to control how values map between source and target. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)
- Traits gained trait_has_value, which checks whether a value was assigned, excluding the default. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)

### Behavior and default changes

- Integer now accepts integer-valued numbers. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)
- Definitions of K and V are no longer restricted to TYPE_CHECKING, making them available at runtime. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)
- Subcommands can now be arbitrary callables and no longer need to subclass Application. (5.0.0) — [release notes](https://github.com/ipython/traitlets/blob/HEAD/CHANGELOG.md)

### Tooling

- The __new__ method now uses the Self type for improved type hinting. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)

### Fixes and other changes

- Re-added _merge to un-break Spyder temporarily. (5.16.1) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.16.1)
- Absolute paths passed with --config are loaded only once. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)
- Fixed traitlets.__all__, correcting the names exposed through wildcard imports. (5.15.0) — [release notes](https://github.com/ipython/traitlets/releases/tag/v5.15.0)
