pulumi-docker 4.6.0b2__py3-none-any.whl → 4.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-docker might be problematic. Click here for more details.

@@ -4,6 +4,7 @@
4
4
 
5
5
 
6
6
  import asyncio
7
+ import functools
7
8
  import importlib.metadata
8
9
  import importlib.util
9
10
  import inspect
@@ -11,14 +12,19 @@ import json
11
12
  import os
12
13
  import sys
13
14
  import typing
15
+ import warnings
16
+ import base64
14
17
 
15
18
  import pulumi
16
19
  import pulumi.runtime
17
20
  from pulumi.runtime.sync_await import _sync_await
21
+ from pulumi.runtime.proto import resource_pb2
18
22
 
19
23
  from semver import VersionInfo as SemverVersion
20
24
  from parver import Version as PEP440Version
21
25
 
26
+ C = typing.TypeVar("C", bound=typing.Callable)
27
+
22
28
 
23
29
  def get_env(*args):
24
30
  for v in args:
@@ -96,10 +102,6 @@ def _get_semver_version():
96
102
  _version = _get_semver_version()
97
103
  _version_str = str(_version)
98
104
 
99
-
100
- def get_version():
101
- return _version_str
102
-
103
105
  def get_resource_opts_defaults() -> pulumi.ResourceOptions:
104
106
  return pulumi.ResourceOptions(
105
107
  version=get_version(),
@@ -262,7 +264,7 @@ def call_plain(
262
264
  output = pulumi.runtime.call(tok, props, res, typ)
263
265
 
264
266
  # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
265
- result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output)))
267
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
266
268
 
267
269
  problem = None
268
270
  if not known:
@@ -287,5 +289,39 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo
287
289
  await o._resources,
288
290
  )
289
291
 
292
+
293
+ # This is included to provide an upgrade path for users who are using a version
294
+ # of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
295
+ def deprecated(message: str) -> typing.Callable[[C], C]:
296
+ """
297
+ Decorator to indicate a function is deprecated.
298
+
299
+ As well as inserting appropriate statements to indicate that the function is
300
+ deprecated, this decorator also tags the function with a special attribute
301
+ so that Pulumi code can detect that it is deprecated and react appropriately
302
+ in certain situations.
303
+
304
+ message is the deprecation message that should be printed if the function is called.
305
+ """
306
+
307
+ def decorator(fn: C) -> C:
308
+ if not callable(fn):
309
+ raise TypeError("Expected fn to be callable")
310
+
311
+ @functools.wraps(fn)
312
+ def deprecated_fn(*args, **kwargs):
313
+ warnings.warn(message)
314
+ pulumi.warn(f"{fn.__name__} is deprecated: {message}")
315
+
316
+ return fn(*args, **kwargs)
317
+
318
+ deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
319
+ return typing.cast(C, deprecated_fn)
320
+
321
+ return decorator
322
+
290
323
  def get_plugin_download_url():
291
324
  return None
325
+
326
+ def get_version():
327
+ return _version_str
@@ -4,43 +4,46 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from .. import _utilities
11
16
  from . import outputs
12
17
 
13
18
  caMaterial: Optional[str]
14
19
  """
15
- PEM-encoded content of Docker host CA certificate.
20
+ PEM-encoded content of Docker host CA certificate
16
21
  """
17
22
 
18
23
  certMaterial: Optional[str]
19
24
  """
20
- PEM-encoded content of Docker client certificate.
25
+ PEM-encoded content of Docker client certificate
21
26
  """
22
27
 
23
28
  certPath: Optional[str]
24
29
  """
25
- Path to a directory with Docker TLS config. This directory is expected to contain `ca.pem`, `cert.pem`, and `key.pem`
26
- files.
30
+ Path to directory with Docker TLS config
27
31
  """
28
32
 
29
33
  host: Optional[str]
30
34
  """
31
- The Docker daemon's address.
35
+ The Docker daemon address
32
36
  """
33
37
 
34
38
  keyMaterial: Optional[str]
35
39
  """
36
- PEM-encoded content of Docker client private key.
40
+ PEM-encoded content of Docker client private key
37
41
  """
38
42
 
39
43
  registryAuth: Optional[str]
40
44
 
41
45
  sshOpts: Optional[str]
42
46
  """
43
- Additional SSH option flags to be appended when using `ssh://` protocol. The `ssh://` protocol is not supported for
44
- `buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
47
+ Additional SSH option flags to be appended when using `ssh://` protocol
45
48
  """
46
49
 
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from .. import _utilities
11
16
 
12
17
  __all__ = [
@@ -23,7 +28,7 @@ class RegistryAuth(dict):
23
28
  password: Optional[str] = None,
24
29
  username: Optional[str] = None):
25
30
  """
26
- :param str address: Address of the registry.
31
+ :param str address: Address of the registry
27
32
  :param str config_file: Path to docker json file for registry auth. Defaults to `~/.docker/config.json`. If `DOCKER_CONFIG` is set, the value of `DOCKER_CONFIG` is used as the path. `config_file` has predencen over all other options.
28
33
  :param str config_file_content: Plain content of the docker json file for registry auth. `config_file_content` has precedence over username/password.
29
34
  :param str password: Password for the registry. Defaults to `DOCKER_REGISTRY_PASS` env variable if set.
@@ -45,7 +50,7 @@ class RegistryAuth(dict):
45
50
  @pulumi.getter
46
51
  def address(self) -> str:
47
52
  """
48
- Address of the registry.
53
+ Address of the registry
49
54
  """
50
55
  return pulumi.get(self, "address")
51
56
 
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from .. import _utilities
11
16
  from . import outputs
12
17
 
@@ -19,36 +24,35 @@ class _ExportableConfig(types.ModuleType):
19
24
  @property
20
25
  def ca_material(self) -> Optional[str]:
21
26
  """
22
- PEM-encoded content of Docker host CA certificate.
27
+ PEM-encoded content of Docker host CA certificate
23
28
  """
24
29
  return __config__.get('caMaterial')
25
30
 
26
31
  @property
27
32
  def cert_material(self) -> Optional[str]:
28
33
  """
29
- PEM-encoded content of Docker client certificate.
34
+ PEM-encoded content of Docker client certificate
30
35
  """
31
36
  return __config__.get('certMaterial')
32
37
 
33
38
  @property
34
39
  def cert_path(self) -> Optional[str]:
35
40
  """
36
- Path to a directory with Docker TLS config. This directory is expected to contain `ca.pem`, `cert.pem`, and `key.pem`
37
- files.
41
+ Path to directory with Docker TLS config
38
42
  """
39
43
  return __config__.get('certPath')
40
44
 
41
45
  @property
42
46
  def host(self) -> Optional[str]:
43
47
  """
44
- The Docker daemon's address.
48
+ The Docker daemon address
45
49
  """
46
50
  return __config__.get('host') or _utilities.get_env('DOCKER_HOST')
47
51
 
48
52
  @property
49
53
  def key_material(self) -> Optional[str]:
50
54
  """
51
- PEM-encoded content of Docker client private key.
55
+ PEM-encoded content of Docker client private key
52
56
  """
53
57
  return __config__.get('keyMaterial')
54
58
 
@@ -59,8 +63,7 @@ class _ExportableConfig(types.ModuleType):
59
63
  @property
60
64
  def ssh_opts(self) -> Optional[str]:
61
65
  """
62
- Additional SSH option flags to be appended when using `ssh://` protocol. The `ssh://` protocol is not supported for
63
- `buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
66
+ Additional SSH option flags to be appended when using `ssh://` protocol
64
67
  """
65
68
  return __config__.get('sshOpts')
66
69