Commit Graph

3158 Commits

Author SHA1 Message Date
Corentin Henry bfdd0a881e add support for proxies
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2019-01-09 11:30:58 -08:00
Joffrey F 4ca4e94ea7
Merge pull request #2218 from docker/fix_test_deps
Update test dependencies to latest version, fix some flake8 errors
2019-01-09 11:30:38 -08:00
Joffrey F 72f4f527ad Update test dependencies to latest version, fix some flake8 errors
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-01-09 11:18:40 -08:00
Joffrey F 5fc7f62ec4
Merge pull request #2213 from docker/2210-swarm-init-return
Make swarm.init() return value match documentation
2018-12-28 16:19:33 -08:00
Joffrey F 3cda1e8bbd Make swarm.init() return value match documentation
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-12-28 15:45:54 -08:00
Joffrey F 3151b0ef2f
Merge pull request #2207 from BoboTiG/patch-1
Fix DeprecationWarning: invalid escape sequence in services.py
2018-12-28 07:32:10 +09:00
Joffrey F 60ffeede92
Merge pull request #2208 from BoboTiG/patch-2
Fix DeprecationWarning: invalid escape sequence in ports.py
2018-12-28 07:30:46 +09:00
Mickaël Schoentgen e99ce1e359 Fix DeprecationWarning: invalid escape sequence in ports.py
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2018-12-20 14:54:52 +01:00
Mickaël Schoentgen 341e2580aa Fix DeprecationWarning: invalid escape sequence in services.py
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2018-12-20 14:54:15 +01:00
Joffrey F 7911c54635
Merge pull request #2204 from MaxBischoff/typo-fix
Fixed a typo in the configs api doc
2018-12-14 12:27:25 -08:00
Maximilian Bischoff 543d83cb09 Fixed a typo in the configs api doc
The documentation for id in ConfigApiMixin inspect_config was wrongly
mentioning removal of a config

Signed-off-by: Maximilian Bischoff <maximilianbischoff2@gmail.com>
2018-12-14 19:21:57 +01:00
Joffrey F d77d4256d7
Merge pull request #2197 from docker/2185-placement-prefs
Improve handling of placement preferences and associated docs
2018-12-11 08:41:33 -08:00
Joffrey F f39b1df407
Merge pull request #2198 from docker/update_versionmap
Update Jenkinsfile version map
2018-12-11 08:40:53 -08:00
Joffrey F a207122c0d Update Jenkinsfile version map
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-12-07 17:04:54 -08:00
Joffrey F b297b837df Dynamically retrieve version information for generated docs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-12-07 16:57:40 -08:00
Joffrey F e15db4cb20 Improve handling of placement preferences; improve docs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-12-07 16:56:45 -08:00
Joffrey F 92236550d2
Merge pull request #2196 from docker/2194-clean-release
Prevent untracked files in releases
2018-12-07 16:08:18 -08:00
Joffrey F 1bc5783a3d Prevent untracked files in releases
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-12-07 16:08:00 -08:00
Joffrey F 11250042eb
Merge pull request #2193 from docker/update_setup_py
Update setup.py for modern pypi / setuptools
2018-11-30 18:00:55 -08:00
Joffrey F 3381f7be15 Update setup.py for modern pypi / setuptools
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 17:26:50 -08:00
Joffrey F 5c748467d7
Merge pull request #2192 from docker/authconfig_fix
Fix empty authconfig detection
2018-11-30 16:33:35 -08:00
Joffrey F bc84ed11ec Fix empty authconfig detection
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 15:56:39 -08:00
Joffrey F c344660f20
Merge pull request #2188 from docker/c6374-credhelpers
Modernize auth management
2018-11-30 15:32:30 -08:00
Joffrey F b72fb1e571 Merge branch 'little-dude-master' 2018-11-30 15:27:49 -08:00
Joffrey F 16c28093b9 Move exec_run example to user guides section of docs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 15:26:51 -08:00
Joffrey F b2ad302636 Fix test names
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 14:58:18 -08:00
Joffrey F ee6ec4c6e8 Merge branch 'master' of https://github.com/little-dude/docker-py into little-dude-master 2018-11-30 14:48:19 -08:00
Joffrey F 666388168d
Merge pull request #2181 from funkyfuture/exec_run_docs
Fixes the documented return value of models.containers.Container.exec_run
2018-11-30 14:44:08 -08:00
Joffrey F cc38efa68e Add some credHelpers tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 14:41:56 -08:00
Joffrey F bef10ecac1 Add credstore_env to all load_config calls
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 13:51:40 -08:00
Joffrey F 01ccaa6af2 Make AuthConfig a dict subclass for backward-compatibility
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 13:51:01 -08:00
Joffrey F bc5d7c8cb6 Modernize auth management
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 19:32:01 -08:00
Corentin Henry 7b3b83dfdb fix exec api inconsistency
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 15:16:23 -08:00
Corentin Henry 41c0eb7e80 fix exec_start() documentation
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 15:16:17 -08:00
Joffrey F 9a67e2032e Next dev version
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 14:31:28 -08:00
Joffrey F 80e862aafa Merge branch 'release' 2018-11-28 14:30:06 -08:00
Corentin Henry 76447d0ca3 tests various exec_create/exec_start combinations
Test the interation of the tty, demux and stream parameters

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 13:37:17 -08:00
Corentin Henry 6540900dae add tests for _read_from_socket
Check that the return value against the various combination of
parameters this function can take (tty, stream, and demux).

This commit also fixes a bug that the tests uncovered a bug in
consume_socket_output.

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 13:37:10 -08:00
Joffrey F d74bfa69ab
Merge pull request #2187 from docker/3.6.0-release
3.6.0 release
2018-11-28 12:11:38 -08:00
Joffrey F 24ed2f356b Release 3.6.0
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:57:19 -08:00
Joffrey F 30d16ce89a Update DockerClient.images.pull to always stream response
Also raise a warning when users attempt to specify the "stream" parameter

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00
adw1n 7117855f6e Fix pulling images with `stream=True`
Pulling an image with option `stream=True` like this:
```
client.api.pull('docker.io/user/repo_name', tag='latest', stream=True)
```
without consuming the generator oftentimes results in premature drop of the connection. Docker daemon tries to send progress of pulling the image to the client, but it encounters an error (broken pipe) and therefore cancells the pull action:
```
Thread 1 "dockerd-dev" received signal SIGPIPE, Broken pipe.
ERRO[2018-09-03T05:12:35.746497638+02:00] Not continuing with pull after error: context canceled
```
As described in issue #2116, even though client receives response with status code 200, image is not pulled.

Closes #2116

Signed-off-by: Przemysław Adamek <adw1n@users.noreply.github.com>
2018-11-28 11:56:28 -08:00
Joffrey F f9505da1d6 Correctly handle longpath prefix in process_dockerfile when joining paths
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00
Corentin Henry 2d5a7c3894 tests: bump pytest-timeout
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>

pytest-timeout 1.2.1 seems to be incompatible with pytest 3.6.3:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/main.py", line 185, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/main.py", line 225, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/main.py", line 246, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pluggy/callers.py", line 182, in _multicall
INTERNALERROR>     next(gen)  # first yield
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 76, in pytest_runtest_protocol
INTERNALERROR>     timeout_setup(item)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 104, in timeout_setup
INTERNALERROR>     timeout, method = get_params(item)
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 162, in get_params
INTERNALERROR>     timeout, method = _parse_marker(item.keywords['timeout'])
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/pytest_timeout.py", line 178, in _parse_marker
INTERNALERROR>     if not marker.args and not marker.kwargs:
INTERNALERROR>   File "/usr/local/lib/python2.7/site-packages/_pytest/mark/structures.py", line 25, in warned
INTERNALERROR>     warnings.warn(warning, stacklevel=2)
INTERNALERROR> RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
INTERNALERROR> Please use node.get_closest_marker(name) or node.iter_markers(name).
INTERNALERROR> Docs: https://docs.pytest.org/en/latest/mark.html#updating-code
2018-11-28 11:56:28 -08:00
Corentin Henry ad4f5f9d0c tests: fix failure due to pytest deprecation
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 11:56:28 -08:00
Joffrey F cafb802c51 Fix versions script to accept versions without -ce suffix
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00
Joffrey F e6889eb9d6 Fix file mode in image.save examples
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00
Joffrey F 584204bbdd Add doc example for get_archive
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00
Joffrey F 66666f9824 Properly convert non-string filters to expected string format
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00
Joffrey F d9e08aedc3 Disallow incompatible combination stats(decode=True, stream=False)
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 11:56:28 -08:00