unstale

pypi / traitlets

traitlets

What changed in traitlets 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.

8 breaking5 deprecations9 new APIs and options3 behavior and defaults1 tooling3 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.12 on npm

traitlets 529 changes

Breaking changes 8

  • Python 3.10 is now required.

    5.16.0release notes

  • Python 3.9 is now required; Python 3.8 is no longer supported.

    5.15.0release notes

  • Traitlets no longer catches a number of BaseException subclasses.

    5.0.0release notes

  • Command-line parsing was rewritten to use argparse, changing behavior and allowing more flexibility in assigning literals without quoting.

    5.0.0release notes

  • Traitlets now provides a singular default method for declaring default values.

    5.0.0release notes

  • The container constructor parameter trait was renamed to value_trait.

    5.0.0release notes

  • Several previously exposed utility functions and types are no longer available, including ClassTypes, SequenceTypes, getargspec, and isidentifier.

    5.0.0release notes

  • The container constructor parameter traits was renamed to per_key_traits.

    5.0.0release notes

Deprecations 5

  • Deprecates the old CLong alias.

    5.16.0release notes

  • Deprecates the old Long alias.

    5.16.0release notes

  • The empty isidentifier utility is deprecated.

    5.15.0release notes

  • The old way of passing containers on the command line is deprecated and emits a warning.

    5.0.0release notes

  • Undefined is deprecated and emits a warning.

    5.0.0release notes

New APIs and options 9

  • Adds a trait for pathlib.Path values.

    5.16.0release notes

  • Aliases can have both short and long versions, and alias dictionary values can include a target and help string.

    5.0.0release notes

  • Applications expose the loaded configuration file list for long-running services.

    5.0.0release notes

  • A Callable trait was added for validating callable values.

    5.0.0release notes

  • A FuzzyEnum trait was added with case-insensitive matching and unique-prefix matching.

    5.0.0release notes

  • Dictionaries can restrict the type of their keys using the new key_trait parameter.

    5.0.0release notes

  • Link objects can be relinked after unlink has been called.

    5.0.0release notes

  • Link now accepts a transform attribute with inverse functions to control how values map between source and target.

    5.0.0release notes

  • Traits gained trait_has_value, which checks whether a value was assigned, excluding the default.

    5.0.0release notes

Behavior and default changes 3

  • Integer now accepts integer-valued numbers.

    5.15.0release notes

  • Definitions of K and V are no longer restricted to TYPE_CHECKING, making them available at runtime.

    5.15.0release notes

  • Subcommands can now be arbitrary callables and no longer need to subclass Application.

    5.0.0release notes

Tooling 1

  • The __new__ method now uses the Self type for improved type hinting.

    5.15.0release notes

Fixes and other changes 3

  • Re-added _merge to un-break Spyder temporarily.

    5.16.1release notes

  • Absolute paths passed with --config are loaded only once.

    5.15.0release notes

  • Fixed traitlets.__all__, correcting the names exposed through wildcard imports.

    5.15.0release notes