Fix _stream_result concatenating bytes with str

Without this option, requests returns lines as bytes on Python 3
which can't be concatenated with the str '\n' in the yield.
Allow copy() to accept dictionary like diff()

Client.diff() silently convert container as a dictionary
to container['Id'] while Client.copy() does not.

This change makes copy() do the same job.
replace status with status_code as defined by requests API

Move this statement in `else` clause to make sure the try except block doesn't catch
coding errors.
A ping should be successful if status_code is less than 400
Merge pull request #157 from ticosax/ping-fixes

Ping fixes
Merge pull request #155 from bfirsh/fix-concat-string-with-bytes

Fix _stream_result concatenating bytes with str
Merge pull request #156 from dmiyakawa/master

Allow copy() to accept dictionary like diff()
Fixed malformatted request when using empty list in create_container()

create_container() sends a malformatted request when volumes==[] or
ports==[], causing error 500 "create: ExportEnv json: cannot unmarshal
array into Go value of type map"

The empty lists must be converted into a dict (or removed)
Merge pull request #158 from a-ba/master

Fixed malformatted request when using empty list in create_container()
Support remote API v1.8 (and make it the default)

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
Merge pull request #161 from mpetazzoni/api-1.8

Support remote API v1.8 (and make it the default)
Fix APIError for requests 1.1

requests 1.1, which is what's available on CentOS 6, doesn't support
passing the response code as a keyword argument.  It can be set after
the fact on both requests 1.1 and 1.2.

Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
Merge pull request #165 from stpierre/fix-http-error

Fix APIError for requests 1.1
Updated integration tests
Clarify port bindings documentation for non-TCP port bindings

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
Fix build() streaming and stream methods cleanup

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
Fix events() streaming by using _stream_helper()

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
Merge pull request #167 from mpetazzoni/build-output

Fix build() and events() streaming
Updated changelog, bumped version to 0.3.0
Added installation instructions