tornadoweb / tornadoweb/tornado
Feature request: support buffer protocol objects in `tornado.web.RequestHandler.write`
Open
Nobody has claimed this yet.
web
- Dominant language
- Python
- Stars
- 22.2k
- Forks
- 5.6k
- Avg merge
- 3h 42m
- Merged PRs (30d)
- 16
Description
Current write method only accepts bytes, str and dict. If it supports in addition objects conforming to buffer protocol, conversion to bytes can be avoided, and so are memory allocation and data copy.
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 at tornado.web.RequestHandler.write and review how its current accepted types are handled. Done means buffer-protocol objects are accepted without requiring callers to convert them to bytes, while existing bytes, str, and dict behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100