dycw-utilities 0.148.3__py3-none-any.whl → 0.148.5__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.
- {dycw_utilities-0.148.3.dist-info → dycw_utilities-0.148.5.dist-info}/METADATA +1 -1
- {dycw_utilities-0.148.3.dist-info → dycw_utilities-0.148.5.dist-info}/RECORD +7 -7
- utilities/__init__.py +1 -1
- utilities/postgres.py +5 -2
- {dycw_utilities-0.148.3.dist-info → dycw_utilities-0.148.5.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.148.3.dist-info → dycw_utilities-0.148.5.dist-info}/entry_points.txt +0 -0
- {dycw_utilities-0.148.3.dist-info → dycw_utilities-0.148.5.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=LCky1VazOaGgD8qf6DVgou1be6BJARw1j7YB_Kwfbgw,60
|
2
2
|
utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
|
3
3
|
utilities/asyncio.py,sha256=z0w3fb-U5Ml5YXVaFFPClizXaQmjDO6YgZg-V9QL0VQ,16021
|
4
4
|
utilities/atomicwrites.py,sha256=xcOWenTBRS0oat3kg7Sqe51AohNThMQ2ixPL7QCG8hw,5795
|
@@ -48,7 +48,7 @@ utilities/pickle.py,sha256=MBT2xZCsv0pH868IXLGKnlcqNx2IRVKYNpRcqiQQqxw,653
|
|
48
48
|
utilities/platform.py,sha256=Ue9LSxYvg9yUXGKuz5aZoy_qkUEXde-v6B09exgSctU,2813
|
49
49
|
utilities/polars.py,sha256=BgiDryAVOapi41ddfJqN0wYh_sDj8BNEYtPB36LaHdo,71824
|
50
50
|
utilities/polars_ols.py,sha256=Uc9V5kvlWZ5cU93lKZ-cfAKdVFFw81tqwLW9PxtUvMs,5618
|
51
|
-
utilities/postgres.py,sha256=
|
51
|
+
utilities/postgres.py,sha256=zQx4rNMg65znDdcj_NC1ZPTtW-XkgSorlTe9CTSmrHk,9115
|
52
52
|
utilities/pottery.py,sha256=w2X80PXWwzdHdqSYJP6ESrPNNDP3xzpyuJn-fp-Vt3M,5969
|
53
53
|
utilities/pqdm.py,sha256=BTsYPtbKQWwX-iXF4qCkfPG7DPxIB54J989n83bXrIo,3092
|
54
54
|
utilities/psutil.py,sha256=KUlu4lrUw9Zg1V7ZGetpWpGb9DB8l_SSDWGbANFNCPU,2104
|
@@ -88,8 +88,8 @@ utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
|
88
88
|
utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
89
89
|
utilities/pytest_plugins/pytest_randomly.py,sha256=NXzCcGKbpgYouz5yehKb4jmxmi2SexKKpgF4M65bi10,414
|
90
90
|
utilities/pytest_plugins/pytest_regressions.py,sha256=Iwhfv_OJH7UCPZCfoh7ugZ2Xjqjil-BBBsOb8sDwiGI,1471
|
91
|
-
dycw_utilities-0.148.
|
92
|
-
dycw_utilities-0.148.
|
93
|
-
dycw_utilities-0.148.
|
94
|
-
dycw_utilities-0.148.
|
95
|
-
dycw_utilities-0.148.
|
91
|
+
dycw_utilities-0.148.5.dist-info/METADATA,sha256=zKtIyZ---2ibI4hD6IeeSvJG2Gsx8CL31o-o1PxcWME,1697
|
92
|
+
dycw_utilities-0.148.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
93
|
+
dycw_utilities-0.148.5.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
|
94
|
+
dycw_utilities-0.148.5.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
95
|
+
dycw_utilities-0.148.5.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/postgres.py
CHANGED
@@ -39,6 +39,7 @@ async def pg_dump(
|
|
39
39
|
tables: MaybeSequence[TableOrORMInstOrClass | str] | None = None,
|
40
40
|
tables_exc: MaybeSequence[TableOrORMInstOrClass | str] | None = None,
|
41
41
|
inserts: bool = False,
|
42
|
+
on_conflict_do_nothing: bool = False,
|
42
43
|
logger: LoggerOrName | None = None,
|
43
44
|
dry_run: bool = False,
|
44
45
|
) -> None:
|
@@ -86,12 +87,14 @@ async def pg_dump(
|
|
86
87
|
])
|
87
88
|
if inserts:
|
88
89
|
parts.append("--inserts")
|
90
|
+
if on_conflict_do_nothing:
|
91
|
+
parts.append("--on-conflict-do-nothing")
|
89
92
|
if url.username is not None:
|
90
93
|
parts.append(f"--username={url.username}")
|
91
94
|
cmd = " ".join(parts)
|
92
95
|
if dry_run:
|
93
96
|
if logger is not None:
|
94
|
-
get_logger(logger=logger).info("Would run %r", str(
|
97
|
+
get_logger(logger=logger).info("Would run %r", str(cmd))
|
95
98
|
return
|
96
99
|
with temp_environ(PGPASSWORD=url.password), Timer() as timer: # pragma: no cover
|
97
100
|
try:
|
@@ -213,7 +216,7 @@ async def pg_restore(
|
|
213
216
|
cmd = " ".join(parts)
|
214
217
|
if dry_run:
|
215
218
|
if logger is not None:
|
216
|
-
get_logger(logger=logger).info("Would run %r", str(
|
219
|
+
get_logger(logger=logger).info("Would run %r", str(cmd))
|
217
220
|
return
|
218
221
|
with temp_environ(PGPASSWORD=url.password), Timer() as timer: # pragma: no cover
|
219
222
|
try:
|
File without changes
|
File without changes
|
File without changes
|