Populate `am_send` slot
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
With the introduction of eager_task_factory in Python 3.12, I think it would be a good idea to start looking at populating the am_send slot whenever users implement the send() method.
But since this is a feature that is only available on Python 3.10+, we might have to gate it behind an attribute argument like so.
#[cfg_attr(Py_3_10, pyclass(fast_send))]
#[cfg_attr(not(Py_3_10), pyclass)]
struct Coroutine {
...
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the PyO3 implementation of Python async types and the Python C API documentation for the am_send slot and eager_task_factory. Determine how user-defined send() methods should populate the slot, including the proposed Python-version gating; done means the behavior works on supported versions and remains compatible with older Python versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100