dbt-common 1.12.0__py3-none-any.whl → 1.14.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 +1 -1
- dbt_common/behavior_flags.py +1 -1
- dbt_common/clients/jinja.py +7 -0
- dbt_common/events/base_types.py +5 -2
- dbt_common/events/functions.py +1 -1
- dbt_common/events/logger.py +2 -2
- dbt_common/events/types_pb2.py +14 -4
- {dbt_common-1.12.0.dist-info → dbt_common-1.14.0.dist-info}/METADATA +4 -5
- {dbt_common-1.12.0.dist-info → dbt_common-1.14.0.dist-info}/RECORD +11 -11
- {dbt_common-1.12.0.dist-info → dbt_common-1.14.0.dist-info}/WHEEL +1 -1
- {dbt_common-1.12.0.dist-info → dbt_common-1.14.0.dist-info}/licenses/LICENSE +0 -0
dbt_common/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = "1.
|
1
|
+
version = "1.14.0"
|
dbt_common/behavior_flags.py
CHANGED
dbt_common/clients/jinja.py
CHANGED
@@ -46,6 +46,7 @@ from dbt_common.exceptions import (
|
|
46
46
|
MaterializationArgError,
|
47
47
|
JinjaRenderingError,
|
48
48
|
UndefinedCompilationError,
|
49
|
+
DbtRuntimeError,
|
49
50
|
)
|
50
51
|
from dbt_common.exceptions.macros import MacroReturn, UndefinedMacroError, CaughtMacroError
|
51
52
|
|
@@ -534,6 +535,12 @@ def catch_jinja(node: Optional[_NodeProtocol] = None) -> Iterator[None]:
|
|
534
535
|
except CompilationError as exc:
|
535
536
|
exc.add_node(node)
|
536
537
|
raise
|
538
|
+
except DbtRuntimeError:
|
539
|
+
# Propagate dbt exception raised during jinja compilation
|
540
|
+
raise
|
541
|
+
except Exception as e:
|
542
|
+
# Raise any non-dbt exceptions as CompilationError
|
543
|
+
raise CompilationError(str(e), node) from e
|
537
544
|
|
538
545
|
|
539
546
|
_TESTING_PARSE_CACHE: Dict[str, jinja2.nodes.Template] = {}
|
dbt_common/events/base_types.py
CHANGED
@@ -91,15 +91,18 @@ class BaseEvent:
|
|
91
91
|
|
92
92
|
def to_dict(self):
|
93
93
|
return MessageToDict(
|
94
|
-
self.pb_msg,
|
94
|
+
self.pb_msg,
|
95
|
+
preserving_proto_field_name=True,
|
96
|
+
always_print_fields_with_no_presence=True,
|
95
97
|
)
|
96
98
|
|
97
99
|
def to_json(self) -> str:
|
98
100
|
return MessageToJson(
|
99
101
|
self.pb_msg,
|
100
102
|
preserving_proto_field_name=True,
|
101
|
-
|
103
|
+
always_print_fields_with_no_presence=True,
|
102
104
|
indent=None,
|
105
|
+
sort_keys=True,
|
103
106
|
)
|
104
107
|
|
105
108
|
def level_tag(self) -> EventLevel:
|
dbt_common/events/functions.py
CHANGED
@@ -97,7 +97,7 @@ def msg_to_dict(msg: EventMsg) -> dict:
|
|
97
97
|
msg_dict = MessageToDict(
|
98
98
|
msg,
|
99
99
|
preserving_proto_field_name=True,
|
100
|
-
|
100
|
+
always_print_fields_with_no_presence=True,
|
101
101
|
)
|
102
102
|
except Exception as exc:
|
103
103
|
event_type = type(msg).__name__
|
dbt_common/events/logger.py
CHANGED
@@ -13,11 +13,11 @@ from dbt_common.events.base_types import EventLevel, EventMsg
|
|
13
13
|
from dbt_common.events.format import timestamp_to_datetime_string
|
14
14
|
from dbt_common.utils.encoding import ForgivingJSONEncoder
|
15
15
|
|
16
|
-
|
16
|
+
PRINT_EVENT_NAMES = ("PrintEvent", "ShowNode", "CompiledNode")
|
17
17
|
|
18
18
|
|
19
19
|
def _is_print_event(msg: EventMsg) -> bool:
|
20
|
-
return msg.info.name
|
20
|
+
return msg.info.name in PRINT_EVENT_NAMES
|
21
21
|
|
22
22
|
|
23
23
|
# A Filter is a function which takes a BaseEvent and returns True if the event
|
dbt_common/events/types_pb2.py
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
3
4
|
# source: types.proto
|
4
|
-
# Protobuf Python Version:
|
5
|
+
# Protobuf Python Version: 5.28.3
|
5
6
|
"""Generated protocol buffer code."""
|
6
7
|
from google.protobuf import descriptor as _descriptor
|
7
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
8
10
|
from google.protobuf import symbol_database as _symbol_database
|
9
11
|
from google.protobuf.internal import builder as _builder
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
14
|
+
5,
|
15
|
+
28,
|
16
|
+
3,
|
17
|
+
'',
|
18
|
+
'types.proto'
|
19
|
+
)
|
10
20
|
# @@protoc_insertion_point(imports)
|
11
21
|
|
12
22
|
_sym_db = _symbol_database.Default()
|
@@ -20,9 +30,9 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0btypes.proto\x1
|
|
20
30
|
_globals = globals()
|
21
31
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
22
32
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'types_pb2', _globals)
|
23
|
-
if _descriptor._USE_C_DESCRIPTORS
|
24
|
-
DESCRIPTOR.
|
25
|
-
_globals['_EVENTINFO_EXTRAENTRY'].
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
34
|
+
DESCRIPTOR._loaded_options = None
|
35
|
+
_globals['_EVENTINFO_EXTRAENTRY']._loaded_options = None
|
26
36
|
_globals['_EVENTINFO_EXTRAENTRY']._serialized_options = b'8\001'
|
27
37
|
_globals['_EVENTINFO']._serialized_start=62
|
28
38
|
_globals['_EVENTINFO']._serialized_end=335
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: dbt-common
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.14.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
|
@@ -8,8 +8,7 @@ Project-URL: Issues, https://github.com/dbt-labs/dbt-common/issues
|
|
8
8
|
Project-URL: Changelog, https://github.com/dbt-labs/dbt-common/blob/main/CHANGELOG.md
|
9
9
|
Author-email: dbt Labs <info@dbtlabs.com>
|
10
10
|
Maintainer-email: dbt Labs <info@dbtlabs.com>
|
11
|
-
License
|
12
|
-
License-File: LICENSE
|
11
|
+
License: Apache-2.0
|
13
12
|
Classifier: Development Status :: 2 - Pre-Alpha
|
14
13
|
Classifier: License :: OSI Approved :: Apache Software License
|
15
14
|
Classifier: Operating System :: MacOS :: MacOS X
|
@@ -31,7 +30,7 @@ Requires-Dist: jinja2<4,>=3.1.3
|
|
31
30
|
Requires-Dist: jsonschema<5.0,>=4.0
|
32
31
|
Requires-Dist: mashumaro[msgpack]<4.0,>=3.9
|
33
32
|
Requires-Dist: pathspec<0.13,>=0.9
|
34
|
-
Requires-Dist: protobuf<
|
33
|
+
Requires-Dist: protobuf<6.0,>=5.0
|
35
34
|
Requires-Dist: python-dateutil<3.0,>=2.0
|
36
35
|
Requires-Dist: requests<3.0.0
|
37
36
|
Requires-Dist: typing-extensions<5.0,>=4.4
|
@@ -48,7 +47,7 @@ Requires-Dist: mypy<2.0,>=1.3; extra == 'lint'
|
|
48
47
|
Requires-Dist: pytest<8.0,>=7.3; extra == 'lint'
|
49
48
|
Requires-Dist: types-jinja2<3.0,>=2.11; extra == 'lint'
|
50
49
|
Requires-Dist: types-jsonschema<5.0,>=4.17; extra == 'lint'
|
51
|
-
Requires-Dist: types-protobuf<
|
50
|
+
Requires-Dist: types-protobuf<6.0,>=5.0; extra == 'lint'
|
52
51
|
Requires-Dist: types-python-dateutil<3.0,>=2.8; extra == 'lint'
|
53
52
|
Requires-Dist: types-pyyaml<7.0,>=6.0; extra == 'lint'
|
54
53
|
Requires-Dist: types-requests; extra == 'lint'
|
@@ -1,6 +1,6 @@
|
|
1
|
-
dbt_common/__about__.py,sha256=
|
1
|
+
dbt_common/__about__.py,sha256=jgA5fU_XZ5Gv-NyYGvOeyOvgy8rP58A_XiIlWHtvbZo,19
|
2
2
|
dbt_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
dbt_common/behavior_flags.py,sha256=
|
3
|
+
dbt_common/behavior_flags.py,sha256=hQzxCqQSweJbRp_xoQqNnlUF77PBuOdCdLOSdcBlkxk,4885
|
4
4
|
dbt_common/constants.py,sha256=-Y5DIL1SDPQWtlCNizXRYxFgbx1D7LaLs1ysamvGMRk,278
|
5
5
|
dbt_common/context.py,sha256=rk4EYBU4SpDXRhqbSvDTJwojilxPSoaiEdOxkXow_BU,2549
|
6
6
|
dbt_common/dataclass_schema.py,sha256=u2S0dxwxIghv8RMqC91HlWZJVxmsC_844yZQaGyOwdY,5563
|
@@ -14,7 +14,7 @@ dbt_common/ui.py,sha256=rc2TEM29raBFc_LXcg901pMDD07C2ohwp9qzkE-7pBY,2567
|
|
14
14
|
dbt_common/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
dbt_common/clients/_jinja_blocks.py,sha256=5I_VEWkkW_54uK09ErP_8ey7wj-OOXvt1OHqr73HLOk,14879
|
16
16
|
dbt_common/clients/agate_helper.py,sha256=anKKgKV5PSnFRuFeBwRMdHK3JCaQoUqB2ZXHD0su0Wo,9123
|
17
|
-
dbt_common/clients/jinja.py,sha256=
|
17
|
+
dbt_common/clients/jinja.py,sha256=Cc-6YWCXoyftzNhG-L3N4W8WiKBZZIWB6wV7-JPrQkg,20054
|
18
18
|
dbt_common/clients/system.py,sha256=aoUBtOuXVmkOyj6IhhJ3Y4a7JFzPO2F_zKyOtz3xy44,23932
|
19
19
|
dbt_common/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
dbt_common/contracts/constraints.py,sha256=_f1q3Rkcg2UwA7zI5XBbUMXnPUg6pw17UC7l1HyhyQM,1352
|
@@ -27,19 +27,19 @@ dbt_common/contracts/config/metadata.py,sha256=X47-tEA8q2ZfSMcYv0godUwTSVjt8NI77
|
|
27
27
|
dbt_common/contracts/config/properties.py,sha256=gWt6xsP4rVOqRKhmagiUhWnDynzD9mykfMYMTviwpEU,2281
|
28
28
|
dbt_common/events/README.md,sha256=CSwVajoxCAqOug2UCnXldH1EUK7Kjf3rcq7z9ACjrss,3023
|
29
29
|
dbt_common/events/__init__.py,sha256=av08vfpxo0ek7PqZNtMxY8FODJ3xwph4ehRxgInx4LA,383
|
30
|
-
dbt_common/events/base_types.py,sha256=
|
30
|
+
dbt_common/events/base_types.py,sha256=bdDMbawAV0FkxmvuxgsTev82vxTuyu6rJiSkvEQPsO8,5525
|
31
31
|
dbt_common/events/contextvars.py,sha256=EIs1P6NrJzx_IAV17x5cVqOAS4Lqbu6oc0etHtWCJOo,3097
|
32
32
|
dbt_common/events/event_handler.py,sha256=jfi0PyqIOGnXCG9HEa0VIVULqNvXs1RYmAg0b50ChQs,1385
|
33
33
|
dbt_common/events/event_manager.py,sha256=IIUwSyt_RcBbUI_iE5mnpmZt2uW7lG49RXOWz2VlUv0,2300
|
34
34
|
dbt_common/events/event_manager_client.py,sha256=VKlIYJPcexmDKnidkyrs8BIuNZ1_CwDFGz-gBM2SAvo,1193
|
35
35
|
dbt_common/events/format.py,sha256=x1RWDZ8G7ZMHmxdld6Q4VXca4kvnhiQOIaQXkC6Uo0Q,1609
|
36
|
-
dbt_common/events/functions.py,sha256=
|
36
|
+
dbt_common/events/functions.py,sha256=_7CLApCKb9KhurOgfVRpW-yGKGE_yjYUguiAaLxVwnw,4752
|
37
37
|
dbt_common/events/helpers.py,sha256=CfsWwNDjsLJkPIgOtAfuLEnZ3rGUKeYsH8aDtCW12OA,410
|
38
38
|
dbt_common/events/interfaces.py,sha256=hEDeDoB0FW2RYHVZBG7gebEt_mUVBzkn1yPubpaxs-s,147
|
39
|
-
dbt_common/events/logger.py,sha256=
|
39
|
+
dbt_common/events/logger.py,sha256=iBxMhFhAo8wL4NA4Z31pf644I0tsCOWIrt-k4d7EzaY,6760
|
40
40
|
dbt_common/events/types.proto,sha256=Ujl0O-X-pat8vlo2C0TMH1LZqa8EP_9f8k2TjbFuCV8,2276
|
41
41
|
dbt_common/events/types.py,sha256=MXCmG7qaj7hLbDZjjazjWftPTfoLjhNPATPMirO0DvU,4475
|
42
|
-
dbt_common/events/types_pb2.py,sha256=
|
42
|
+
dbt_common/events/types_pb2.py,sha256=oQauUKUU_cBz3SskNvAYeWcp_OcA8dZPOgEYNeifThQ,7408
|
43
43
|
dbt_common/exceptions/__init__.py,sha256=X_Uw7BxOzXev_9JMYfs5Cm-_i_Qf2PJim8_-dDJI7Y8,361
|
44
44
|
dbt_common/exceptions/base.py,sha256=23ijq-AtQgUSvZ9JbrCIZ87Pbyn8iEYezX95IXAZ4FY,7783
|
45
45
|
dbt_common/exceptions/cache.py,sha256=0z4fBcdNZMAR41YbPRo2GN0__xAMaYs8Uc-t3hjmVio,2532
|
@@ -57,7 +57,7 @@ dbt_common/utils/encoding.py,sha256=6_kSY2FvGNYMg7oX7PrbvVioieydih3Kl7Ii802LaHI,
|
|
57
57
|
dbt_common/utils/executor.py,sha256=pNY0UbPlwQmTE69Vt_Rj91YGCIOEaqeYU3CjAds0T70,2454
|
58
58
|
dbt_common/utils/formatting.py,sha256=JUn5rzJ-uajs9wPCN0-f2iRFY1pOJF5YjTD9dERuLoc,165
|
59
59
|
dbt_common/utils/jinja.py,sha256=JXgNmJArGGy0h7qkbNLA3zaEQmoF1CxsNBYTlIwFXDw,1101
|
60
|
-
dbt_common-1.
|
61
|
-
dbt_common-1.
|
62
|
-
dbt_common-1.
|
63
|
-
dbt_common-1.
|
60
|
+
dbt_common-1.14.0.dist-info/METADATA,sha256=VgvfWv6LGaTre2VQJqnIiJAhSYhG4AAPWiCjrKQd0Tk,5211
|
61
|
+
dbt_common-1.14.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
62
|
+
dbt_common-1.14.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
63
|
+
dbt_common-1.14.0.dist-info/RECORD,,
|
File without changes
|