Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream_with_context does not propagate g #361

Open
npt opened this issue Sep 26, 2024 · 0 comments
Open

stream_with_context does not propagate g #361

npt opened this issue Sep 26, 2024 · 0 comments

Comments

@npt
Copy link

npt commented Sep 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant