Kaydet (Commit) 923536a1 authored tarafından Joir-dan Gumbs's avatar Joir-dan Gumbs

rebased documentation changes against master fork

Signed-off-by: 's avatarJoir-dan Gumbs <jdagumbs@gmail.com>
......@@ -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.
......
......@@ -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:
......
version = "1.8.0-rc4"
version = "1.8.0"
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])
......@@ -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
......
......@@ -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=[
......
......@@ -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 == {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment