Bumped to 0.1.4

This commit is contained in:
shin- 2013-08-13 20:05:13 +02:00
parent f7b80659c6
commit c31ce82d2c
4 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,11 @@
ChangeLog
=========
0.1.4
-----
* Added support for API connection through UNIX socket (default for docker 0.5.2+)
0.1.3
-----

View File

@ -6,7 +6,7 @@ An API client for docker written in Python
API
===
`docker.Client(base_url='http://localhost:4243', version="1.3")`
`docker.Client(base_url='unix://var/run/docker.sock', version="1.3")`
Client class. `base_url` refers to the protocol+hostname+port where the docker
server is hosted. Version is the version of the API the client will use.

View File

@ -31,7 +31,6 @@ class UnixHTTPConnection(httplib.HTTPConnection, object):
sock.connect(self.base_url.replace("unix:/",""))
self.sock = sock
def _extract_path(self, url):
#remove the base_url entirely..
return url.replace(self.base_url, "")
@ -50,6 +49,7 @@ class UnixHTTPConnectionPool(HTTPConnectionPool):
def _new_conn(self):
return UnixHTTPConnection(self.base_url, self.socket_path)
class UnixAdapter(HTTPAdapter):
def __init__(self, base_url):
self.base_url = base_url
@ -73,7 +73,6 @@ class Client(requests.Session):
def _url(self, path):
return '{0}/v{1}{2}'.format(self.base_url, self._version, path)
def _raise_for_status(self, response):
"""Raises stored :class:`HTTPError`, if one occurred."""
http_error_msg = ''

View File

@ -8,7 +8,7 @@ SOURCE_DIR = os.path.join(ROOT_DIR)
test_requirements = []
setup(
name="docker-py",
version='0.1.3',
version='0.1.4',
description="Python client for Docker.",
packages=['docker'],
install_requires=['requests', 'six'] + test_requirements,