diff options
| author | Aanand Prasad <aanand.prasad@gmail.com> | 2015-07-20 09:36:35 +0100 |
|---|---|---|
| committer | Aanand Prasad <aanand.prasad@gmail.com> | 2015-07-20 19:50:18 +0100 |
| commit | 33e1a58b6034f4b586a55b5b42e644c11c281d25 (patch) | |
| tree | 3b8a2ae76c7595789276ddd44496b72a872ba284 /docker/utils/utils.py | |
| parent | 946eb964adceef7f531ca4f30c4bfe973566811a (diff) | |
| download | docker-py-33e1a58b6034f4b586a55b5b42e644c11c281d25.tar.gz | |
Stop pinging registries from the client
The daemon already pings the registry, so doing it on our end is
redundant and error-prone.
The `insecure_registry` argument to `push()`, `pull()` and `login()` has
been deprecated - in the latter case, it wasn't being used anyway.
The `insecure` argument to `docker.auth.resolve_repository_name()` has
also been deprecated.
`docker.utils.ping_registry()` has been deprecated.
`docker.auth.expand_registry_url()` has been removed.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Diffstat (limited to 'docker/utils/utils.py')
| -rw-r--r-- | docker/utils/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py index 175a7e0..10c08de 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -19,6 +19,7 @@ import json import shlex import tarfile import tempfile +import warnings from distutils.version import StrictVersion from fnmatch import fnmatch from datetime import datetime @@ -120,6 +121,11 @@ def compare_version(v1, v2): def ping_registry(url): + warnings.warn( + 'The `ping_registry` method is deprecated and will be removed.', + DeprecationWarning + ) + return ping(url + '/v2/', [401]) or ping(url + '/v1/_ping') |
