summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoir-dan Gumbs <jdagumbs@gmail.com>2016-04-18 21:39:55 -0700
committerJoir-dan Gumbs <jdagumbs@gmail.com>2016-04-18 21:39:55 -0700
commit923536a168795e40d05059da5d00509a08d70df3 (patch)
treedc3d5b9d2fef0cd2ac0104361ed5059996092441
parent14423d2b541a41f7c46aa00a74a24a6c321b9a74 (diff)
parentfdd118706a1e63cc22821e6610cfd861eca1f7b9 (diff)
downloaddocker-py-923536a168795e40d05059da5d00509a08d70df3.tar.gz
rebased documentation changes against master fork
Signed-off-by: Joir-dan Gumbs <jdagumbs@gmail.com>
-rw-r--r--README.md2
-rw-r--r--docker/auth/auth.py15
-rw-r--r--docker/version.py2
-rw-r--r--docs/change_log.md11
-rw-r--r--setup.py6
-rw-r--r--tests/unit/auth_test.py5
6 files changed, 29 insertions, 12 deletions
diff --git a/README.md b/README.md
index e0daf56..0a70968 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ Documentation
[![Documentation Status](https://readthedocs.org/projects/docker-py/badge/?version=latest)](https://readthedocs.org/projects/docker-py/?badge=latest)
-[Read the full documentation here.](http://docker-py.readthedocs.org/en/latest/).
+[Read the full documentation here](http://docker-py.readthedocs.org/en/latest/).
The source is available in the `docs/` directory.
diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index eedb794..d23e6f3 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -117,7 +117,7 @@ def parse_auth(entries, raise_on_error=False):
conf = {}
for registry, entry in six.iteritems(entries):
- if not (isinstance(entry, dict) and 'auth' in entry):
+ if not isinstance(entry, dict):
log.debug(
'Config entry for key {0} is not auth config'.format(registry)
)
@@ -130,6 +130,16 @@ def parse_auth(entries, raise_on_error=False):
'Invalid configuration for registry {0}'.format(registry)
)
return {}
+ if 'auth' not in entry:
+ # Starting with engine v1.11 (API 1.23), an empty dictionary is
+ # a valid value in the auths config.
+ # https://github.com/docker/compose/issues/3265
+ log.debug(
+ 'Auth data for {0} is absent. Client might be using a '
+ 'credentials store instead.'
+ )
+ return {}
+
username, password = decode_auth(entry['auth'])
log.debug(
'Found entry (registry={0}, username={1})'
@@ -189,6 +199,9 @@ def load_config(config_path=None):
if data.get('HttpHeaders'):
log.debug("Found 'HttpHeaders' section")
res.update({'HttpHeaders': data['HttpHeaders']})
+ if data.get('credsStore'):
+ log.debug("Found 'credsStore' section")
+ res.update({'credsStore': data['credsStore']})
if res:
return res
else:
diff --git a/docker/version.py b/docker/version.py
index d53b6f4..72cd0e0 100644
--- a/docker/version.py
+++ b/docker/version.py
@@ -1,2 +1,2 @@
-version = "1.8.0-rc4"
+version = "1.8.0"
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])
diff --git a/docs/change_log.md b/docs/change_log.md
index fc37ba0..f891379 100644
--- a/docs/change_log.md
+++ b/docs/change_log.md
@@ -27,16 +27,19 @@ Change Log
### Bugfixes
-* Fixed a bug where some environment variables specified through
- `create_container` would be improperly formatted
+* Fixed a bug where TLS verification would fail when using IP addresses
+ in the certificate's `subjectAltName` fields
* Fixed an issue where the default TLS version in TLSConfig would
break in some environments. `docker-py` now uses TLSv1 by default
This setting can be overridden using the `ssl_version` param in
`kwargs_from_env` or the `TLSConfig` constructor
+* Fixed a bug where `tcp` hosts would fail to connect to TLS-enabled
+ endpoints
+* Fixed a bug where loading a valid docker configuration file would fail
+* Fixed a bug where some environment variables specified through
+ `create_container` would be improperly formatted
* Fixed a bug where using the unix socket connection would raise
an error in some edge-case situations
-* Fixed a bug where `tcp` hosts would fail to connect to TLS-enabled
- endpoints.
### Miscellaneous
diff --git a/setup.py b/setup.py
index 44cd164..0329ba3 100644
--- a/setup.py
+++ b/setup.py
@@ -12,8 +12,9 @@ requirements = [
'websocket-client >= 0.32.0',
]
-if sys.version_info[0] == 2:
- requirements.append('py2-ipaddress >= 3.4.1')
+extras_require = {
+ ':python_version < "3"': 'py2-ipaddress >= 3.4.1',
+}
exec(open('docker/version.py').read())
@@ -32,6 +33,7 @@ setup(
],
install_requires=requirements,
tests_require=test_requirements,
+ extras_require=extras_require,
zip_safe=False,
test_suite='tests',
classifiers=[
diff --git a/tests/unit/auth_test.py b/tests/unit/auth_test.py
index 921aae0..4ea4047 100644
--- a/tests/unit/auth_test.py
+++ b/tests/unit/auth_test.py
@@ -459,6 +459,5 @@ class LoadConfigTest(base.Cleanup, base.BaseTestCase):
with open(dockercfg_path, 'w') as f:
json.dump(config, f)
- self.assertRaises(
- errors.InvalidConfigFile, auth.load_config, dockercfg_path
- )
+ cfg = auth.load_config(dockercfg_path)
+ assert cfg == {}