1
1
import logging
2
2
import os
3
- import warnings
4
3
5
4
import six
6
5
7
6
from .. import auth , errors , utils
8
- from ..constants import INSECURE_REGISTRY_DEPRECATION_WARNING
9
7
10
8
log = logging .getLogger (__name__ )
11
9
@@ -321,21 +319,21 @@ def prune_images(self, filters=None):
321
319
params ['filters' ] = utils .convert_filters (filters )
322
320
return self ._result (self ._post (url , params = params ), True )
323
321
324
- def pull (self , repository , tag = None , stream = False ,
325
- insecure_registry = False , auth_config = None , decode = False ,
326
- platform = None ):
322
+ def pull (self , repository , tag = None , stream = False , auth_config = None ,
323
+ decode = False , platform = None ):
327
324
"""
328
325
Pulls an image. Similar to the ``docker pull`` command.
329
326
330
327
Args:
331
328
repository (str): The repository to pull
332
329
tag (str): The tag to pull
333
330
stream (bool): Stream the output as a generator
334
- insecure_registry (bool): Use an insecure registry
335
331
auth_config (dict): Override the credentials that
336
332
:py:meth:`~docker.api.daemon.DaemonApiMixin.login` has set for
337
333
this request. ``auth_config`` should contain the ``username``
338
334
and ``password`` keys to be valid.
335
+ decode (bool): Decode the JSON data from the server into dicts.
336
+ Only applies with ``stream=True``
339
337
platform (str): Platform in the format ``os[/arch[/variant]]``
340
338
341
339
Returns:
@@ -361,12 +359,6 @@ def pull(self, repository, tag=None, stream=False,
361
359
}
362
360
363
361
"""
364
- if insecure_registry :
365
- warnings .warn (
366
- INSECURE_REGISTRY_DEPRECATION_WARNING .format ('pull()' ),
367
- DeprecationWarning
368
- )
369
-
370
362
if not tag :
371
363
repository , tag = utils .parse_repository_tag (repository )
372
364
registry , repo_name = auth .resolve_repository_name (repository )
@@ -405,8 +397,8 @@ def pull(self, repository, tag=None, stream=False,
405
397
406
398
return self ._result (response )
407
399
408
- def push (self , repository , tag = None , stream = False ,
409
- insecure_registry = False , auth_config = None , decode = False ):
400
+ def push (self , repository , tag = None , stream = False , auth_config = None ,
401
+ decode = False ):
410
402
"""
411
403
Push an image or a repository to the registry. Similar to the ``docker
412
404
push`` command.
@@ -415,12 +407,12 @@ def push(self, repository, tag=None, stream=False,
415
407
repository (str): The repository to push to
416
408
tag (str): An optional tag to push
417
409
stream (bool): Stream the output as a blocking generator
418
- insecure_registry (bool): Use ``http://`` to connect to the
419
- registry
420
410
auth_config (dict): Override the credentials that
421
411
:py:meth:`~docker.api.daemon.DaemonApiMixin.login` has set for
422
412
this request. ``auth_config`` should contain the ``username``
423
413
and ``password`` keys to be valid.
414
+ decode (bool): Decode the JSON data from the server into dicts.
415
+ Only applies with ``stream=True``
424
416
425
417
Returns:
426
418
(generator or str): The output from the server.
@@ -439,12 +431,6 @@ def push(self, repository, tag=None, stream=False,
439
431
...
440
432
441
433
"""
442
- if insecure_registry :
443
- warnings .warn (
444
- INSECURE_REGISTRY_DEPRECATION_WARNING .format ('push()' ),
445
- DeprecationWarning
446
- )
447
-
448
434
if not tag :
449
435
repository , tag = utils .parse_repository_tag (repository )
450
436
registry , repo_name = auth .resolve_repository_name (repository )
0 commit comments