Skip to content

Conversation

@tobiasraabe
Copy link
Member

Changes

Provide a description and/or bullet points to describe the changes in this PR.

Todo

  • Reference issues which can be closed due to this PR with "Closes #x".
  • Review whether the documentation needs to be updated.
  • Document PR in docs/source/changes.md.

@tobiasraabe tobiasraabe changed the base branch from main to python3.14 November 22, 2025 10:40
- Remove redundant _snapshot_annotation_locals function (was just a copy)
- Use _caller_locals directly instead of double-copying
- Fix priority order in _build_evaluation_locals: snapshot locals now
  have highest priority over default arguments
- Use public API inspect.Parameter.empty instead of inspect._empty
- Clean up duplicate docstring entries for id, kwargs, produces
- Remove unnecessary C901 noqa (function simplified)
Instead of recursively calling task() and passing captured locals via a
parameter, detect the no-parentheses case early and call wrapper() directly.
The closure captures caller_locals, eliminating the need for the parameter.

This simplifies the public API while maintaining the same behavior for
deferred annotation evaluation in Python 3.14+.
@tobiasraabe tobiasraabe force-pushed the python3.14-lazy-annotations branch 2 times, most recently from e9c37f8 to a4ed617 Compare December 30, 2025 14:56
@tobiasraabe tobiasraabe merged commit ef66b4e into python3.14 Dec 30, 2025
21 checks passed
@tobiasraabe tobiasraabe deleted the python3.14-lazy-annotations branch December 30, 2025 15:21
@tobiasraabe tobiasraabe added this to the v0.5.8 milestone Dec 30, 2025
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.

2 participants