Skip to content

Can't record requests with body generators (e.g. from aiogoogle file uploads) #974

@fiendish

Description

@fiendish

Cassette recording tries to deepcopy the async generator request, but you can't copy a generator, so it fails.
It might be best to stub the body with None if the body is a generator?

I (mock) patched vcr.config's use of copy.deepcopy to skip Request bodies to work around this, and that works for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions