Skip to content

Harden deferred instantiate dispatch on 1.3 - #3417

Merged
omry merged 1 commit into
1.3_branchfrom
pr3417
Aug 28, 2026
Merged

Harden deferred instantiate dispatch on 1.3#3417
omry merged 1 commit into
1.3_branchfrom
pr3417

Conversation

@omry

@omry omry commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Apply the three frozen coordinated policy additions to Hydra 1.3: reject two-argument iter(callable, sentinel) while preserving ordinary iteration, and deny direct functools.partial.__call__ and builtins.property.__get__ dispatch before side effects can run.

This is the 1.3 counterpart to #3415 and complements #3412/#3413.

Verification:

  • Branch-pinned pytest environment: 755 instantiate tests passed
  • Cross-branch policy collections and the two-argument iter guard match the main implementation.

Reject the two-argument iter callback overload while preserving ordinary iteration, and deny direct partial-call and property-getter dispatch before side effects can run.

Complements the coordinated #3412/#3413 policy backport.
@omry
omry changed the base branch from main to 1.3_branch August 27, 2026 21:40
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

hydra/setup.py

Line 20 in 259cccd

if (stripped := line.strip()) and not stripped.startswith("#")

P1 Badge Avoid Python 3.8-only syntax in setup.py

The assignment expression makes setup.py unparseable on Python 3.7, even though this change continues to advertise and test Python 3.7 in setup.py and .circleci/config.yml. Consequently, source/Git installations on that supported interpreter fail with a SyntaxError before setuptools can build the package; parse the requirements with a normal loop or another Python 3.7-compatible expression.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gitar-bot

gitar-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Hardens deferred instantiate dispatch on 1.3 by rejecting the two-argument iter callback overload while preserving ordinary iteration, and denying direct partial-call and property-getter dispatch before side effects can run. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@omry
omry merged commit aa102ea into 1.3_branch Aug 28, 2026
1 check passed
@omry
omry deleted the pr3417 branch August 28, 2026 04:16
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