You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if there's a need to test items using requests in thread-safe manner and how that would work with betamax. Currently the access to cassette files is not threadsafe and I'm wondering what would be necessary to ensure thread-safety.
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9271963-make-cassettes-thread-safe?utm_campaign=plugin&utm_content=tracker%2F198445&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F198445&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
So, we'd probably have to use pylockfile to ensure we don't update the same cassette twice. That would probably give us 90% of what we need. Namely, this would be great for the case where we are testing an application that's sharing a session between threads. Even though this isn't a recommendation requests makes, Betamax should still attempt to support it.
Further, I think the dependency on pylockfile should be optional that could be installed from an extra for betamax, e.g., pip install betamax[threadsafe].
The code to integrate this with the current Cassette class should be minimal.
I'm wondering if there's a need to test items using requests in thread-safe manner and how that would work with betamax. Currently the access to cassette files is not threadsafe and I'm wondering what would be necessary to ensure thread-safety.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9271963-make-cassettes-thread-safe?utm_campaign=plugin&utm_content=tracker%2F198445&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F198445&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: