Skip to content

Commit 923536a

Browse files
committed
rebased documentation changes against master fork
Signed-off-by: Joir-dan Gumbs <[email protected]>
2 parents 14423d2 + fdd1187 commit 923536a

File tree

6 files changed

+29
-12
lines changed

6 files changed

+29
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Documentation
1717

1818
[![Documentation Status](https://readthedocs.org/projects/docker-py/badge/?version=latest)](https://readthedocs.org/projects/docker-py/?badge=latest)
1919

20-
[Read the full documentation here.](http://docker-py.readthedocs.org/en/latest/).
20+
[Read the full documentation here](http://docker-py.readthedocs.org/en/latest/).
2121
The source is available in the `docs/` directory.
2222

2323

docker/auth/auth.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def parse_auth(entries, raise_on_error=False):
117117

118118
conf = {}
119119
for registry, entry in six.iteritems(entries):
120-
if not (isinstance(entry, dict) and 'auth' in entry):
120+
if not isinstance(entry, dict):
121121
log.debug(
122122
'Config entry for key {0} is not auth config'.format(registry)
123123
)
@@ -130,6 +130,16 @@ def parse_auth(entries, raise_on_error=False):
130130
'Invalid configuration for registry {0}'.format(registry)
131131
)
132132
return {}
133+
if 'auth' not in entry:
134+
# Starting with engine v1.11 (API 1.23), an empty dictionary is
135+
# a valid value in the auths config.
136+
# https://github.com/docker/compose/issues/3265
137+
log.debug(
138+
'Auth data for {0} is absent. Client might be using a '
139+
'credentials store instead.'
140+
)
141+
return {}
142+
133143
username, password = decode_auth(entry['auth'])
134144
log.debug(
135145
'Found entry (registry={0}, username={1})'
@@ -189,6 +199,9 @@ def load_config(config_path=None):
189199
if data.get('HttpHeaders'):
190200
log.debug("Found 'HttpHeaders' section")
191201
res.update({'HttpHeaders': data['HttpHeaders']})
202+
if data.get('credsStore'):
203+
log.debug("Found 'credsStore' section")
204+
res.update({'credsStore': data['credsStore']})
192205
if res:
193206
return res
194207
else:

docker/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "1.8.0-rc4"
1+
version = "1.8.0"
22
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])

docs/change_log.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,19 @@ Change Log
2727

2828
### Bugfixes
2929

30-
* Fixed a bug where some environment variables specified through
31-
`create_container` would be improperly formatted
30+
* Fixed a bug where TLS verification would fail when using IP addresses
31+
in the certificate's `subjectAltName` fields
3232
* Fixed an issue where the default TLS version in TLSConfig would
3333
break in some environments. `docker-py` now uses TLSv1 by default
3434
This setting can be overridden using the `ssl_version` param in
3535
`kwargs_from_env` or the `TLSConfig` constructor
36+
* Fixed a bug where `tcp` hosts would fail to connect to TLS-enabled
37+
endpoints
38+
* Fixed a bug where loading a valid docker configuration file would fail
39+
* Fixed a bug where some environment variables specified through
40+
`create_container` would be improperly formatted
3641
* Fixed a bug where using the unix socket connection would raise
3742
an error in some edge-case situations
38-
* Fixed a bug where `tcp` hosts would fail to connect to TLS-enabled
39-
endpoints.
4043

4144
### Miscellaneous
4245

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
'websocket-client >= 0.32.0',
1313
]
1414

15-
if sys.version_info[0] == 2:
16-
requirements.append('py2-ipaddress >= 3.4.1')
15+
extras_require = {
16+
':python_version < "3"': 'py2-ipaddress >= 3.4.1',
17+
}
1718

1819
exec(open('docker/version.py').read())
1920

@@ -32,6 +33,7 @@
3233
],
3334
install_requires=requirements,
3435
tests_require=test_requirements,
36+
extras_require=extras_require,
3537
zip_safe=False,
3638
test_suite='tests',
3739
classifiers=[

tests/unit/auth_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,5 @@ def test_load_config_invalid_auth_dict(self):
459459
with open(dockercfg_path, 'w') as f:
460460
json.dump(config, f)
461461

462-
self.assertRaises(
463-
errors.InvalidConfigFile, auth.load_config, dockercfg_path
464-
)
462+
cfg = auth.load_config(dockercfg_path)
463+
assert cfg == {}

0 commit comments

Comments
 (0)