Skip to content

Add AsyncIterator support to c-api - #8285

Merged
youknowone merged 1 commit into
RustPython:mainfrom
bschoenmaeckers:c-api-async-iter
Jul 15, 2026
Merged

Add AsyncIterator support to c-api#8285
youknowone merged 1 commit into
RustPython:mainfrom
bschoenmaeckers:c-api-async-iter

Conversation

@bschoenmaeckers

@bschoenmaeckers bschoenmaeckers commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added C API support for detecting whether an object is an asynchronous iterator.
    • Added C API support for retrieving an object’s asynchronous iterator, complementing existing synchronous iterator functionality.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: eea2a874-9eb0-4bfc-8a45-967ed80ed4f8

📥 Commits

Reviewing files that changed from the base of the PR and between f816d07 and 4236d77.

📒 Files selected for processing (1)
  • crates/capi/src/abstract_/iter.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/capi/src/abstract_/iter.rs

📝 Walkthrough

Walkthrough

Adds C-ABI functions to check whether an object supports asynchronous iteration and to retrieve its asynchronous iterator through the active VM context.

Changes

Async iterator C API

Layer / File(s) Summary
Async iterator entry points
crates/capi/src/abstract_/iter.rs
Exports PyAIter_Check for __anext__ detection and PyObject_GetAIter for retrieving an object’s asynchronous iterator.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: youknowone

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding async iterator support to the C API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@youknowone
youknowone merged commit 74b598e into RustPython:main Jul 15, 2026
49 of 50 checks passed
@bschoenmaeckers
bschoenmaeckers deleted the c-api-async-iter branch July 15, 2026 14:46
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