put_archive: note the data may also be a stream#2478
Conversation
|
This is also something I noticed recently. I've taken a look at the Requests adapters provided by docker-py, it doesn't look like they do anything funky which will prevent this. But I'm not really familiar with these aspects of Requests (and the adapters) to be able to say this with full confidence :) |
|
@felixfontein Well, it works for me in production as we speak 😁 |
|
@akx out of curiosity, which transports are you using it with / did you test it with? There's |
|
@felixfontein Plain UNIX in this instance. |
|
Hi,
|
Signed-off-by: Aarni Koskela <akx@iki.fi>
|
Rebased. Could a maintainer take a look? |
milas
left a comment
There was a problem hiding this comment.
Thanks for rebasing, let's get this merged 🙂
The docs imply the
dataparameter toput_archive()must bebytes(a bytestring), which is not the case; a stream is fine too since it's passed directly to Requests.In fact, the tests for the
put_archive()feature always pass in a stream:docker-py/tests/integration/api_container_test.py
Lines 678 to 679 in a0b9c3d