Align GetAwaitable to Python 3.14.2#6895
Conversation
📝 WalkthroughWalkthroughGetAwaitable was changed from a unit opcode to carry an explicit argument; codegen emits Changes
Sequence Diagram(s)sequenceDiagram
participant Codegen as Codegen/Compile
participant Frame as VM Frame Executor
participant AwaitUtil as get_awaitable_iter()
participant Object as Python Object
Codegen->>Frame: Emit GetAwaitable { arg: context }
Frame->>Object: Pop awaitable-candidate
Frame->>AwaitUtil: get_awaitable_iter(obj, vm)
AwaitUtil->>Object: Is coroutine? / call __await__()
alt Is coroutine
Object-->>AwaitUtil: return coroutine (iterator-like)
else __await__ exists
Object-->>AwaitUtil: return iterator
AwaitUtil->>AwaitUtil: validate iterator (not coroutine reuse)
end
AwaitUtil-->>Frame: awaitable iterator or error
Frame->>Frame: push iterator / raise contextual TypeError
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
5f2c124 to
92aa9db
Compare
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] lib: cpython/Lib/fractions.py dependencies:
dependent tests: (13 tests)
[ ] lib: cpython/Lib/asyncio dependencies:
dependent tests: (8 tests)
Legend:
|
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.