Repository navigation
Canonicalize f-string annotation fields - #9077
youknowone merged 1 commit into
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Withdrew the tuple-fold optimization in ab819bc after independent review and compile-only co_consts checks exposed changed identity for repeated float constants. The prior native path and CPython retain one shared object; the enabled fold created distinct objects. The revert restores the old path and removes only its newly added IR expectation. The other three fixes, doc default and identical #9063 prerequisites remain. Repaired native identity checks, 10 canonical tests, 8 pytest entries, 3 existing compiler controls, hooks and codegen/VM/CAPI Clippy pass. Replacement hosted CI is pending. |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] test: cpython/Lib/test/test_mmap.py (TODO: 19) dependencies: dependent tests: (2 tests)
Legend:
|
36a962a to
a6c5ba4
Compare
c37af47 to
af1cd77
Compare
af1cd77 to
fd806a6
Compare
fd806a6 to
c6e3b24
Compare
Ignore incidental formatted-value whitespace while retaining brace-leading safeguards and literal/debug text. Include compile-only annotation-constant coverage. Assisted-by: OpenAI Codex:model identifier unavailable
c6e3b24 to
08ba7ae
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08ba7aefea
ℹ️ 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".
| from typing import get_type_hints | ||
|
|
||
| # Future f-string annotations canonicalize fields, not their literal padding. | ||
| for formatted, expected in ( |
There was a problem hiding this comment.
Remove the disallowed regression-test additions
This loop adds new test data, compilation logic, and an assertion to extra_tests/snippets/syntax_annotations.py, but the root AGENTS.md says that the only acceptable test-file edits are adding expected-failure decorators or removing them with their TODOs. Please remove these additions or get the repository policy changed or waived before landing the implementation.
AGENTS.md reference: AGENTS.md:L277-L279
Useful? React with 👍 / 👎.
Current revision
Targets Python 3.15
mainatf39da82d9d38cd5bdceb9e645205e830f65126fbwith one logical commit,08ba7aefead6429d46b9c664742f1995add630b5. The unique patch is unchanged from the prior reviewed PR head (range-diff=); current main fixes, original author attribution, and assistance trailers are preserved. No files underLib/are changed.Normal commit hooks, changed-range hooks, whitespace checks, and source-equivalence review passed. Normal hosted CI is enabled for this exact head. Current-revision local validation is source and hooks only; earlier runtime results below remain attributed to their original revisions.
Summary
Canonicalize opening-brace whitespace in postponed f-string annotations. Preserve debug text, literal format padding and the brace-leading expression safeguard. Four compile-only Python cases cover the behavior.
Source and scope
The leaf contains only the f-string fix and its four Python regression cases. It adds no
Lib/changes, ParamSpec or TextIOWrapper prerequisite, version pin, or documentation-default change. The inherited reference and documentation default remain 3.15.0. The earlier configparser and SQLite backports are deferred to the common library refresh; their fixes are already in official 3.15. The withdrawn tuple-folding optimization remains absent.The change follows CPython 3.15 final's AST unparser. Main's nested template-format annotation fix (#9076) and its regression cases are preserved through the dependency.
Validation
The current revision has the source-equivalence and hook validation recorded above; normal Python 3.15 hosted CI is pending.
Earlier fresh native builds, focused tests and Clippy results belonged to
a6c5ba47e623149d84c54376ce0b7db4c9b807ffwith a CPython 3.14.8 reference. They do not validate this 3.15-based head.Leave this PR draft and unmerged pending dependency and maintainer review.
AI-assisted implementation, source review, rebase and validation with OpenAI Codex; assistance is disclosed in the retained commit trailers.