Skip to content

Fix dotted membership and get for BoxList paths - #333

Open
MbappeWU wants to merge 1 commit into
cdgriffith:developfrom
MbappeWU:fix/list-path-membership
Open

MbappeWU wants to merge 1 commit into
cdgriffith:developfrom
MbappeWU:fix/list-path-membership

Conversation

@MbappeWU

@MbappeWU MbappeWU commented Oct 3, 2026

Copy link
Copy Markdown

With box_dots=True, a valid path through a BoxList can be read with box["a[0].b"], but membership returns False and box.get("a[0].b", sentinel) returns the sentinel. This also affects a terminal index such as a[0].

Resolve these paths without invoking default-box creation. Keep literal-key precedence, existing dot exclusion rules, nested configuration, intact-container lookup limits, and ordinary BoxList value membership. Add regression tests, including a missing/default path and an oversized index, plus the required changelog and contributor entry.

Validation:

  • Full local suite: 160 passed in both pure Python and compiled Cython modes; exact-base regression: 1 failed / 1 passed, final: 2 passed.
  • Black 24.10.0, mypy, and the repository's pre-commit checks passed.
  • Original 34-job Tests workflow passed across Linux, Windows, macOS and the supported interpreters, including all four manylinux wheel targets. Its CI trigger commit has the exact same Git tree as this PR and changes no files.
  • Built wheel/sdist integrity and 16 tracked runtime files checked against the commit; installed CPython 3.13 wheel exercised in 32 public API cases and two configuration-state controls.

The installed-wheel checks also reproduce an existing Cython 3.3 TypeError when initializing nested boxes with box_dots_exclude: the exact develop base produces the same error. This is recorded as a baseline constructor limitation, not a passing constructor test.

AI-assisted implementation and validation with Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant