• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

omry / omegaconf
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Repo Added 03 Sep 2018 08:45PM UTC
Files 20
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH pr1279
branch: pr1279
CHANGE BRANCH
x
Reset
  • pr1279
  • #174
  • 1.4.0
  • 1.4.0_branch
  • 1.4_branch
  • 127
  • 164
  • 184
  • 185
  • 2.0.0.rc3
  • 2.0.0rc3
  • 2.0.0rc4
  • 2.0.0rc5
  • 2.0.0rc6
  • 2.0.1
  • 2.0.4
  • 2.0_branch
  • 2.1.0
  • 2.1.0.rc1
  • 2.1_branch
  • 2.2_branch
  • 2.3_branch
  • 2.4_branch
  • 241
  • 246
  • 253
  • 260
  • 304-setdefault
  • 305-missing-list-merge
  • 336-list-merge-none-error
  • 343
  • 350
  • 363
  • 37
  • 39
  • 418
  • 425
  • 442
  • 461-flags-root
  • 461_annotated_dicts_are_open
  • 481-feedback
  • 541-oc.select
  • 589-nested-flag-override
  • 601-list-copy
  • 601-update
  • 67
  • 674-select-with-default
  • 697
  • 7iW-merge-dont-overwrite-structured-value
  • EnumNode.__eq__
  • Jasha10-patch-1
  • _get_node_throw_on_missing
  • allow_non_primitive
  • allow_objects_failure_case
  • allow_objects_with_non_copyable
  • antlr
  • arisliang-master
  • attribute_error
  • auto-expand
  • benchmark_and_fixes
  • bugpass
  • bye_27
  • code_config
  • codex/fix-missing-keys-interpolations
  • codex/listconfig-negative-indexing-slicing
  • commit_hook
  • compact
  • configurable_default_flow_style
  • contains
  • copy
  • coverage
  • create
  • create_bug
  • dc
  • debug
  • del
  • deprecated
  • deprecated_auto_expand
  • detect-interpolation-cycles
  • dict-fixes
  • docs
  • docs2
  • dotlist
  • double_error
  • ducks
  • ec.env-default-non-str
  • empty-file
  • enum
  • enum_str
  • env
  • eq
  • error_msg_on_non_structured_config
  • error_newline
  • errors
  • exception
  • fix-ci-coverage
  • fix_examples
  • fixes
  • flags_override
  • frozen
  • i945
  • improve-error-actionability
  • in
  • indirect_interpolation
  • inter-tests
  • interpolation_missing
  • interpolation_missing_merge
  • interpolation_with_@
  • is_missing
  • isort
  • isort5
  • items()
  • jasha-fix-readthedocs-build-os
  • list-iter
  • list_in
  • list_iter3
  • list_iterate
  • literal
  • main
  • mask
  • master
  • merge_allow_objects
  • merge_element_type
  • merge_into_custom_resolver
  • merge_into_missing_dict
  • merge_into_none_list_backport
  • merged_type
  • minor
  • misc
  • missing
  • missing-not-overrwriting
  • missing_bug
  • missing_literal
  • news
  • no_pickle_flags_cache
  • non-primitive-pass2
  • oc.deprecated
  • omry-patch-1
  • open_dict_bug
  • parent_bug
  • pc
  • pickle-bc
  • pop
  • pr1244
  • pr1245
  • pr1246
  • pr1247
  • pr1248
  • pr1249
  • pr1250
  • pr1252
  • pr1253
  • pr1254
  • pr1257
  • pr1258
  • pr1259
  • pr1260
  • pr1262
  • pr1264
  • pr1265
  • pr1268
  • pr1269
  • pr1270
  • pr1272
  • pr1273
  • pr1277
  • pr1278
  • pr1281
  • pr1283
  • pr1284
  • pr1285
  • pr1286
  • pr1287
  • pr1289
  • pr1296
  • pr1303
  • pr1304
  • pr1313
  • pr1316
  • pr1317
  • pr1318
  • pr1319
  • pr1320
  • pr1321
  • pr1322
  • pre-commit
  • pretty_deprecation
  • py.typed
  • py3.13
  • pydev-plugin
  • pytest_mypy
  • python-compat
  • pyyaml-dep
  • rc28
  • readonly-merge
  • ref_type_3
  • refactor-resolvers
  • relative
  • relative-inter-doc
  • relative_fix
  • remove-deprecated
  • remove_dot_warning
  • resolve_updates
  • revert
  • revert-154-merged_type
  • rsokl/deployment
  • sapling-pr-archive-omry
  • sc_ref_type_clean
  • select
  • select_nested_is_relative
  • select_relative
  • serialize-doc
  • sort_keys
  • str_inter_with_ro_parent
  • struct
  • struct_assign
  • struct_del_pop
  • structured-assignment
  • structured_bugs
  • structured_missing
  • subclass_assignment
  • sync_news_readme_2.2
  • temporary_backlog_atlas_install_pr
  • test_dict_re_assign_value
  • test_imports
  • to_container
  • to_container_2
  • to_primitive_container
  • tuple
  • type_hints
  • type_str
  • typed_dict
  • types
  • union_error
  • unsafe_merge
  • update
  • update-merge
  • update_force_add
  • val_error_msg
  • warn_dot
  • warning
  • wtf

25 Apr 2026 06:19PM UTC coverage: 100.0%. Remained the same
7f526e11-2fdf-410e-ad0e-65c6797aa443

Pull #1279

circleci

omry
Allow backslash-escaping of special characters in key paths

Keys in YAML can legally contain dots, brackets, and equals signs, but there
was previously no way to target them via OmegaConf.update(), OmegaConf.select(),
OmegaConf.from_dotlist(), or OmegaConf.from_cli(). All of those converge on
split_key() to parse the key path, and the parser had no concept of escaping.

This change adds backslash escaping so those keys are reachable:

    cfg = OmegaConf.create({"a.b": 42})
    OmegaConf.select(cfg, r"a\.b")    # 42
    OmegaConf.update(cfg, r"a\.b", 1)

    cfg = OmegaConf.from_dotlist([r"a\.b\=c=42"])
    assert cfg["a.b=c"] == 42

Escape rules (backslash is only special before . [ ] =):
    \.  →  literal dot in key
    \[  →  literal [ in key
    \]  →  literal ] in key
    \=  →  literal = in key (most relevant for dotlist / CLI keys)
    \x  →  \x unchanged (backslash passes through before any other character)

Breaking change: a backslash immediately before one of the delimiter characters
(. [ ] =) now escapes that delimiter instead of being treated as a literal
backslash followed by an active delimiter. Concretely, a key path like r"a\.b"
previously resolved to the key "a\" nested under the root followed by key "b";
it now resolves to the single key "a.b". Code that relied on the old behavior
for such paths will need to be updated.

Note for CLI users: shells consume single backslashes, so quote the argument
or double-escape: 'a\.b=1' or a\\.b=1.

Closes #1230.

---

Implementation

split_key() previously used two compiled regexes applied sequentially (dot-split,
then bracket-split). With escaping in play that approach breaks — a delimiter
character inside a key would be indistinguishable from a real delimiter — so the
regexes are replaced with a small character-by-character parser (dot mode /
bracket mode) that applies escape rules in both modes.

A fast path checks for a backslash before entering the parser, so key paths
without escaping ne... (continued)
Pull Request #1279: Allow backslash-escaping of special characters in key paths

64 of 64 new or added lines in 2 files covered. (100.0%)

3563 of 3563 relevant lines covered (100.0%)

1.0 hits per line

Relevant lines Covered
Build:
Build:
3563 RELEVANT LINES 3563 COVERED LINES
1.0 HITS PER LINE
Source Files on pr1279
  • Tree
  • List 19
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
7f526e11... pr1279 Allow backslash-escaping of special characters in key paths Keys in YAML can legally contain dots, brackets, and equals signs, but there was previously no way to target them via OmegaConf.update(), OmegaConf.select(), OmegaConf.from_dotlist(), or... Pull #1279 25 Apr 2026 06:21PM UTC omry circleci
100.0
See All Builds (2724)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc