Skip to content
Commit ba0b5eb0 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Warn if Session.body.write called in async iter context

A warning will be issued in the following situation:

```
>>> def filter(session: Session):
...   async with session.body as body_iter:
...     await session.body.write(b"spam")

>>> test_runner(filter)
UserWarning: it looks as if BodyAccessor.write() was called on an
instance from within it's own async context
  await session.body.write(b"spam")
```
parent c3bf8f3c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment