Add explicit set_data/get_data functions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the Response interface around the existing properties named in the issue, especially content_length and app_iter, and compare the intended data helpers with Werkzeug's approach. Done means an explicit set_data/get_data interface exists and manually assigned Content-Length is not recalculated or removed when app_iter changes; add or update tests for both behaviors.
Written by the indexing model from the issue text.
Description
Instead of using properties, provide proper functions that take a page out of werkzeug's book and provide an easy to use interface that attempts to do the right thing all of the time.
Also, while at it, consider changing when/where Content-Length is generated/set so that something like this:
response = Response()
response.content_length = 150
response.app_iter = someiter
Doesn't re-calculate the content-length, or delete it, unless it was set internally by the Response object. See https://github.com/Pylons/webob/issues/86
- Dominant language
- Python
- Stars
- 443
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
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.
More from Pylons/webob
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Adding type hints Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100