dbt-common 1.29.0__py3-none-any.whl → 1.30.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/clients/system.py +3 -0
- dbt_common/record.py +14 -10
- {dbt_common-1.29.0.dist-info → dbt_common-1.30.0.dist-info}/METADATA +1 -1
- {dbt_common-1.29.0.dist-info → dbt_common-1.30.0.dist-info}/RECORD +7 -7
- {dbt_common-1.29.0.dist-info → dbt_common-1.30.0.dist-info}/WHEEL +0 -0
- {dbt_common-1.29.0.dist-info → dbt_common-1.30.0.dist-info}/licenses/LICENSE +0 -0
dbt_common/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = "1.
|
1
|
+
version = "1.30.0"
|
dbt_common/clients/system.py
CHANGED
@@ -600,6 +600,9 @@ def rename(from_path: str, to_path: str, force: bool = False) -> None:
|
|
600
600
|
to_path = convert_path(to_path)
|
601
601
|
is_symlink = path_is_symlink(to_path)
|
602
602
|
|
603
|
+
if from_path == to_path:
|
604
|
+
return
|
605
|
+
|
603
606
|
if os.path.exists(to_path) and force:
|
604
607
|
if is_symlink:
|
605
608
|
remove_file(to_path)
|
dbt_common/record.py
CHANGED
@@ -179,6 +179,7 @@ class Recorder:
|
|
179
179
|
|
180
180
|
self._record_added = False
|
181
181
|
self._recording_file: Optional[TextIO] = None
|
182
|
+
self._recording_file_lock = Lock()
|
182
183
|
if mode == RecorderMode.RECORD and not in_memory:
|
183
184
|
self._recording_file = open(current_recording_path, "w")
|
184
185
|
self._recording_file.write("[")
|
@@ -200,16 +201,19 @@ class Recorder:
|
|
200
201
|
self._counter += 1
|
201
202
|
|
202
203
|
if self._recording_file is not None:
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
204
|
+
# Lock recording file during streamed recording to avoid race conditions across recording threads
|
205
|
+
with self._recording_file_lock:
|
206
|
+
if self._record_added:
|
207
|
+
self._recording_file.write(",")
|
208
|
+
try:
|
209
|
+
dct = Recorder._get_tagged_dict(record, rec_cls_name)
|
210
|
+
json.dump(dct, self._recording_file)
|
211
|
+
self._record_added = True
|
212
|
+
except Exception:
|
213
|
+
json.dump(
|
214
|
+
{"type": "RecordingError", "record_type": rec_cls_name},
|
215
|
+
self._recording_file,
|
216
|
+
)
|
213
217
|
else:
|
214
218
|
if rec_cls_name not in self._records_by_type:
|
215
219
|
self._records_by_type[rec_cls_name] = []
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dbt-common
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.30.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,4 +1,4 @@
|
|
1
|
-
dbt_common/__about__.py,sha256=
|
1
|
+
dbt_common/__about__.py,sha256=viCczsd3VwR7vc-Nf1WvTRKrmjS-j4d6w4YjgS79j9Q,19
|
2
2
|
dbt_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
dbt_common/behavior_flags.py,sha256=hQzxCqQSweJbRp_xoQqNnlUF77PBuOdCdLOSdcBlkxk,4885
|
4
4
|
dbt_common/constants.py,sha256=6ATQPXft7vw_vyhnmkGy3geKfuzWC3ZiUH4kuNuGQ5w,381
|
@@ -7,7 +7,7 @@ dbt_common/dataclass_schema.py,sha256=u2S0dxwxIghv8RMqC91HlWZJVxmsC_844yZQaGyOwd
|
|
7
7
|
dbt_common/helper_types.py,sha256=wxbbjfsvHVraWexK88PEY3q_dAYqlPl6yOIXnpxCcyY,11569
|
8
8
|
dbt_common/invocation.py,sha256=xw0NBIE-6LHd135cx4non-MkGGsia0mYN0lMkmNEucE,435
|
9
9
|
dbt_common/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
dbt_common/record.py,sha256=
|
10
|
+
dbt_common/record.py,sha256=uZdE2gqqQYXkW5OSYo7urCbjeeWSOAKFoomtdVlOm4U,22637
|
11
11
|
dbt_common/semver.py,sha256=Znewz6tc_NBpXr4mZf20bK_RayPL4ODrnxDbkUZrrRo,15034
|
12
12
|
dbt_common/tests.py,sha256=6lC_JuRtoYO6cbAF8-R5aTM4HtQiM_EH8X5m_97duGY,315
|
13
13
|
dbt_common/ui.py,sha256=geIk3ElFj5y_SG5EDc6RMJFEvYGdo-6C21l0pB8I-EU,2934
|
@@ -15,7 +15,7 @@ dbt_common/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
15
15
|
dbt_common/clients/_jinja_blocks.py,sha256=eUjZLBtLCASJRRj1G8b9u15A3PQMDCKvytIdWkTLSP4,15451
|
16
16
|
dbt_common/clients/agate_helper.py,sha256=anKKgKV5PSnFRuFeBwRMdHK3JCaQoUqB2ZXHD0su0Wo,9123
|
17
17
|
dbt_common/clients/jinja.py,sha256=wKwBCtIGKXOwU-KWWF2sz77nST-JUP26U_Zo_a6mNe8,22756
|
18
|
-
dbt_common/clients/system.py,sha256=
|
18
|
+
dbt_common/clients/system.py,sha256=fn1bpskrOnp0fFz6QeOWzVD2jmLX7ShhueUe-2bgqEE,23977
|
19
19
|
dbt_common/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
dbt_common/contracts/constraints.py,sha256=_f1q3Rkcg2UwA7zI5XBbUMXnPUg6pw17UC7l1HyhyQM,1352
|
21
21
|
dbt_common/contracts/metadata.py,sha256=K_M06Rue0wmrQhFP_mq3uvQszq10CIt93oGiAVgbRfE,1293
|
@@ -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.
|
60
|
-
dbt_common-1.
|
61
|
-
dbt_common-1.
|
62
|
-
dbt_common-1.
|
59
|
+
dbt_common-1.30.0.dist-info/METADATA,sha256=sJh-RDYvL8D6BYSGCUHSmw3XbF4mpd2osuHKApmVqeA,4988
|
60
|
+
dbt_common-1.30.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
61
|
+
dbt_common-1.30.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
62
|
+
dbt_common-1.30.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|