dbt-common 1.25.1__py3-none-any.whl → 1.27.0__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.
dbt_common/__about__.py CHANGED
@@ -1 +1 @@
1
- version = "1.25.1"
1
+ version = "1.27.0"
dbt_common/constants.py CHANGED
@@ -4,3 +4,6 @@ SECRET_ENV_PREFIX = "DBT_ENV_SECRET"
4
4
  # Prefix which identifies environment variables that should not be visible
5
5
  # via macros, flags, or other user-facing mechanisms.
6
6
  PRIVATE_ENV_PREFIX = "DBT_ENV_PRIVATE"
7
+
8
+ # Prefix for dbt engine environment varaibles that are user settable
9
+ ENGINE_ENV_PREFIX = "DBT_ENGINE"
dbt_common/context.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import os
2
2
  from contextvars import ContextVar, copy_context
3
- from typing import List, Mapping, Optional, Iterator
3
+ from typing import List, Mapping, Optional, Iterator, Set
4
4
 
5
5
  from dbt_common.constants import PRIVATE_ENV_PREFIX, SECRET_ENV_PREFIX
6
6
  from dbt_common.record import Recorder
@@ -43,6 +43,7 @@ class InvocationContext:
43
43
  self._env_secrets: Optional[List[str]] = None
44
44
  self._env_private = env_private
45
45
  self.recorder: Optional[Recorder] = None
46
+ self._adapter_types: Set[str] = set()
46
47
 
47
48
  # If set to True later, this flag will prevent dbt from creating a new
48
49
  # invocation context for every invocation, which is useful for testing
@@ -67,6 +68,17 @@ class InvocationContext:
67
68
  ]
68
69
  return self._env_secrets
69
70
 
71
+ @property
72
+ def adapter_types(self) -> Set[str]:
73
+ return self._adapter_types
74
+
75
+ @adapter_types.setter
76
+ def adapter_types(self, adapters: Set[str]) -> None:
77
+ self._adapter_types = adapters
78
+
79
+ def uses_adapter(self, adapter_type: str) -> None:
80
+ self._adapter_types.add(adapter_type)
81
+
70
82
 
71
83
  _INVOCATION_CONTEXT_VAR: ContextVar[InvocationContext] = ContextVar("DBT_INVOCATION_CONTEXT_VAR")
72
84
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dbt-common
3
- Version: 1.25.1
3
+ Version: 1.27.0
4
4
  Summary: The shared common utilities that dbt-core and adapter implementations use
5
5
  Project-URL: Homepage, https://github.com/dbt-labs/dbt-common
6
6
  Project-URL: Repository, https://github.com/dbt-labs/dbt-common.git
@@ -1,8 +1,8 @@
1
- dbt_common/__about__.py,sha256=sEWufGDhiG4Mr1g7uKe4XFc1Bn-lg4gj1aYIRGqQfTk,19
1
+ dbt_common/__about__.py,sha256=NLz6_cE7MHTri9oMcphGQRMHhjLmokW6wSLxTui5TE8,19
2
2
  dbt_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  dbt_common/behavior_flags.py,sha256=hQzxCqQSweJbRp_xoQqNnlUF77PBuOdCdLOSdcBlkxk,4885
4
- dbt_common/constants.py,sha256=-Y5DIL1SDPQWtlCNizXRYxFgbx1D7LaLs1ysamvGMRk,278
5
- dbt_common/context.py,sha256=-ErtKG4xfOh1-Y569fwu6u2O381nRan18HhATrYDoZE,2950
4
+ dbt_common/constants.py,sha256=6ATQPXft7vw_vyhnmkGy3geKfuzWC3ZiUH4kuNuGQ5w,381
5
+ dbt_common/context.py,sha256=w0XfTvQNxtuctHm8hxsdySFoInggBMQm2-7faa_7ObU,3317
6
6
  dbt_common/dataclass_schema.py,sha256=u2S0dxwxIghv8RMqC91HlWZJVxmsC_844yZQaGyOwdY,5563
7
7
  dbt_common/helper_types.py,sha256=wxbbjfsvHVraWexK88PEY3q_dAYqlPl6yOIXnpxCcyY,11569
8
8
  dbt_common/invocation.py,sha256=xw0NBIE-6LHd135cx4non-MkGGsia0mYN0lMkmNEucE,435
@@ -56,7 +56,7 @@ dbt_common/utils/encoding.py,sha256=6_kSY2FvGNYMg7oX7PrbvVioieydih3Kl7Ii802LaHI,
56
56
  dbt_common/utils/executor.py,sha256=pNY0UbPlwQmTE69Vt_Rj91YGCIOEaqeYU3CjAds0T70,2454
57
57
  dbt_common/utils/formatting.py,sha256=JUn5rzJ-uajs9wPCN0-f2iRFY1pOJF5YjTD9dERuLoc,165
58
58
  dbt_common/utils/jinja.py,sha256=JXgNmJArGGy0h7qkbNLA3zaEQmoF1CxsNBYTlIwFXDw,1101
59
- dbt_common-1.25.1.dist-info/METADATA,sha256=r9LW0l7-zcpBiNrgL84tPZks1V3uYWQ2rIo-n431o9U,4988
60
- dbt_common-1.25.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
61
- dbt_common-1.25.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
62
- dbt_common-1.25.1.dist-info/RECORD,,
59
+ dbt_common-1.27.0.dist-info/METADATA,sha256=upjku1FTqyePgoPi5A8Y-vJjSkEJ7mWwHSNM9Sni9k4,4988
60
+ dbt_common-1.27.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
61
+ dbt_common-1.27.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
62
+ dbt_common-1.27.0.dist-info/RECORD,,