rebased documentation changes against master fork

Signed-off-by: Joir-dan Gumbs <jdagumbs@gmail.com>
This commit is contained in:
Joir-dan Gumbs 2016-04-18 21:39:55 -07:00
commit 923536a168
6 changed files with 29 additions and 12 deletions

View File

@ -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.

View File

@ -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:

View File

@ -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(".")])

View File

@ -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

View File

@ -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=[

View File

@ -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 == {}