python-trio / python-trio/trio
Support progress timeouts for SendStream
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
At the moment, the only way to send data is using SendStream.send_all. The problem is that this method blocks until everything has been sent. So if one wants to apply a timeout when no data is being sent at all (but not when data is merely being send very slowly), there is no way to do that. It would be nice if SendStream could either get a send_some method (that returns as soon as some data has been sent), or if the SendStream.send_all method could gain a timeout parameter.
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 locating the SendStream implementation and reading send_all, then trace how sending currently blocks. Determine whether the project should expose send_some or add a timeout parameter, and define completion around timing out only when no data is sent rather than when data is slow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100