pypi omegaconf 2.4.1rc4
OmegaConf 2.4.1rc4

37 minutes ago

2.4.1rc4 (2026-12-03)

Introduction

OmegaConf 2.4.1rc4 fixes a tuple-construction regression introduced in rc3. Explicitly wrapped dataclass and attrs objects now retain their identity, restoring Hydra instantiation compatibility. Typed tuple validation remains enforced.

Features

  • Add experimental, non-mutating key and recursive value escape/unescape helpers and from_input() to validate caller data and construct structured objects. from_input() passes caller text through as literal data: interpolation and resolver expressions are not evaluated, and ??? is not treated as a missing value. (#1459)

Bug Fixes

  • Escape special characters and preserve empty string keys in paths returned by OmegaConf.missing_keys(), preventing path collisions and updates to the wrong entry. (#1423)
  • Preserve literal string keys and source paths in oc.dict.values(), including empty keys, whitespace and interpolation-like text. Interpolation key paths now support empty brackets and escaping spaces, tabs, braces, parentheses and quotes. (#1424)
  • Preserve literal brackets and backslashes in keys selected by nested bracket interpolation, preventing reads and alias updates from targeting the wrong entry. (#1425)
  • Malformed key paths no longer select or update a prefix. OmegaConf.select() and oc.select return explicit defaults for malformed paths. Dotlist and CLI paths are checked before any entry is applied. (#1426)
  • Fix logical keys and paths for values selected by union-typed fields. (#1442)
  • Fix direct merges into union-typed configuration values. (#1443)
  • ListConfig.index() now normalizes negative and out-of-range start/end bounds like list.index() instead of raising an AssertionError. (#1456)
  • Typed tuples now validate nested containers against their declared element types and construct nested dataclass and attrs values from mappings. Retyped scalar values retain their destination validators for later assignments. Values annotated as Any remain valid when implicit conversion is disabled. Container unions preserve source child flags when constructing list branches. (#1460)
  • Fix ListConfig.extend(self) and cfg += cfg to append the original elements once and terminate. (#1471)
  • Fix DictConfig.setdefault() to return the stored value after insertion, including wrapped containers and converted values. (#1472)
  • Fix ListConfig.sort() to sort public resolved values, keep the config available to key functions, and update child paths after sorting. (#1473)
  • Fix DictConfig.clear() to delete entries without resolving interpolations or reading missing values, while preserving deletion restrictions. (#1474)
  • Accept integer-like indices implementing __index__ consistently in sequence access, list assignment, and list pop(). (#1475)
  • Tuples with Any element types preserve explicitly wrapped dataclass and attrs runtime objects and their identity. (#1482)

API changes and deprecations

  • Align key-segment escaping in select(), update(), and dotlists with interpolation paths. Escape a literal backslash as \\ and a literal colon as \:. Existing paths that preserved these backslashes must use the new escaped spellings. Paths from missing_keys() use the same rules. (#1427)

Miscellaneous changes

  • Improve configuration access and merge performance, including repeated interpolation reads, key-path selection, and list indexing. Bound interpolation syntax-cache memory per thread and expose experimental controls through omegaconf.experimental.control to configure or disable caching. (#1414)

Don't miss a new omegaconf release

NewReleases is sending notifications on new releases.