Skip to content

stream_with_context does not propagate g #361

Description

@npt

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions