`stream_with_context` does not propagate `g`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start at the stream_with_context decorator and reproduce the behavior using the linked Stack Overflow example, checking how request context and g are handled by the streaming generator. Resolve whether the expected outcome is propagation or documentation, then verify the chosen behavior with regression coverage or updated documentation.
Written by the indexing model from the issue text.
Description
When I use the stream_with_context decorator on a streaming generator, attributes set on the g object earlier in the request aren't visible in the generator. Someone else has described this already on stackoverflow and given an example.
This is easily worked around by passing the needed attributes into the generator and restoring them when it starts, but it's a surprising behavior that should be either changed or documented.
- Dominant language
- Python
- Stars
- 3.7k
- 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 pallets/quart
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100