Skip to content

Allow keyword-only OneToOne updates - #614

Open
Gambit-Checkmate wants to merge 1 commit into
mahmoud:masterfrom
Gambit-Checkmate:fix/onetoone-keyword-update
Open

Gambit-Checkmate wants to merge 1 commit into
mahmoud:masterfrom
Gambit-Checkmate:fix/onetoone-keyword-update

Conversation

@Gambit-Checkmate

@Gambit-Checkmate Gambit-Checkmate commented Oct 26, 2026 •

Copy link
Copy Markdown

The change

Closes #612.

Default OneToOne.update's positional input to an empty tuple. The class documents builtin dict behavior, but currently rejects update() and keyword-only update calls before its existing keyword validation and inverse-synchronization logic can run.

The two valid-call regressions fail before the fix. Tests verify no-op return/state, keyword collisions and inverse identity/synchronization, and invalid values leaving the relation untouched.

Validation on Windows / CPython 3.13.13:

  • Full unit/doctest suite: 777 passed, 1 skipped, 22 subtests passed.
  • Ruff E9/F on changed Python files, compileall and git diff check passed.
  • Source distribution and wheel build passed.
  • Other platforms/Python versions await upstream CI.

The backstory

This follows #601, acknowledged and incorporated in #609. The refreshed OneToOne implementation already validates and applies keyword pairs, but requiring a positional input prevents normal dictionary-compatible calls. I reproduced that mismatch through code inspection, without claiming a production incident. This is distinct from iterator consumption (#523) and in-place union (#537).

AI assistance

  • Harness/tooling: OpenAI Codex, Git, GitHub CLI/API, Python, pytest and Ruff. Codex performed investigation, implementation, testing and submission.
  • Model(s): GPT-6 family; the exact deployment identifier is not exposed in this session.
  • Original prompt(s), relevant verbatim excerpts from the daily automation (the mailbox workflow and local memory path are omitted):

每天早上 8 点在本会话实际提交两个高质量的开源贡献 PR,把创建并获得 GitHub PR 链接作为每日完成目标。首批候选不合适时必须继续扩大仓库与问题搜索范围,不因候选重复、单个问题困难或尚未发现合适 issue 就结束;没有合适公开 issue 时可以检查代码、复现真实缺陷,确认无重复后报告问题并提交独立修复。

只有改动真实、有依据、验证充分且账号有权限时才推送分支并创建 PR;绝不降低 star 门槛,不提交空改动、无关改动、未经验证或重复 PR,尊重上游 AI 贡献和认领规则。

Hosted CI: Actions run 40248031142 is action_required for external-contribution approval; no hosted tests have executed for this head yet.

This branch has not been deployed

No deployments
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.

OneToOne.update rejects no-argument and keyword-only calls

1 participant