mtsql 1.12.12__py3-none-any.whl → 1.12.14__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.
- mt/sql/base.py +10 -8
- mt/sql/version.py +1 -1
- {mtsql-1.12.12.dist-info → mtsql-1.12.14.dist-info}/METADATA +2 -2
- {mtsql-1.12.12.dist-info → mtsql-1.12.14.dist-info}/RECORD +7 -7
- {mtsql-1.12.12.dist-info → mtsql-1.12.14.dist-info}/WHEEL +0 -0
- {mtsql-1.12.12.dist-info → mtsql-1.12.14.dist-info}/licenses/LICENSE +0 -0
- {mtsql-1.12.12.dist-info → mtsql-1.12.14.dist-info}/top_level.txt +0 -0
mt/sql/base.py
CHANGED
|
@@ -77,13 +77,15 @@ def run_func(
|
|
|
77
77
|
se.InterfaceError,
|
|
78
78
|
se.PendingRollbackError,
|
|
79
79
|
):
|
|
80
|
-
if
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
logger.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
if x < nb_trials - 1:
|
|
81
|
+
if logger:
|
|
82
|
+
msg = f"Ignored an exception raised by failed attempt {x+1}/{nb_trials} to execute `{func.__module__}.{func.__name__}()`"
|
|
83
|
+
with logger.scoped_warn(msg):
|
|
84
|
+
logger.warn_last_exception()
|
|
85
|
+
else:
|
|
86
|
+
msg = f"Attempted {nb_trials} times to execute `{func.__module__}.{func.__name__}` but failed."
|
|
87
|
+
logg.error(msg, logger=logger)
|
|
88
|
+
raise
|
|
87
89
|
|
|
88
90
|
|
|
89
91
|
def conn_ctx(engine):
|
|
@@ -166,7 +168,7 @@ def read_sql(
|
|
|
166
168
|
|
|
167
169
|
if chunksize is not None:
|
|
168
170
|
s = f"read_sql: '{text_sql}'"
|
|
169
|
-
spinner = halo.
|
|
171
|
+
spinner = halo.HaloAuto(s, spinner="dots", enabled=bool(logger))
|
|
170
172
|
spinner.start()
|
|
171
173
|
ts = pd.Timestamp.now()
|
|
172
174
|
cnt = 0
|
mt/sql/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mtsql
|
|
3
|
-
Version: 1.12.
|
|
3
|
+
Version: 1.12.14
|
|
4
4
|
Summary: Extra Python modules to deal with the interaction between pandas dataframes and remote SQL servers, for Minh-Tri Pham
|
|
5
5
|
Home-page: https://github.com/inteplus/mtsql
|
|
6
6
|
Author: ['Minh-Tri Pham']
|
|
@@ -12,7 +12,7 @@ Requires-Dist: tzlocal
|
|
|
12
12
|
Requires-Dist: tqdm
|
|
13
13
|
Requires-Dist: psycopg[binary]
|
|
14
14
|
Requires-Dist: redshift_connector>=2.1.5
|
|
15
|
-
Requires-Dist: mtbase>=4.32.
|
|
15
|
+
Requires-Dist: mtbase>=4.32.25
|
|
16
16
|
Requires-Dist: mtpandas>=1.17.10
|
|
17
17
|
Dynamic: author
|
|
18
18
|
Dynamic: home-page
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
mt/sql/__init__.py,sha256=b7zO50apZxt9Hg2eOkJhRLrXgACR8eS5b-Rphdn5qNQ,44
|
|
2
|
-
mt/sql/base.py,sha256=
|
|
2
|
+
mt/sql/base.py,sha256=RNSlSLta1NV7hk6FzMxbe_2ZyDiDlcVvdpTxYRUsnVs,13101
|
|
3
3
|
mt/sql/mysql.py,sha256=n2ENDctdUqZuSaDAcrqZYtPtawq3Wx4dOPCRsCB5Q4w,4894
|
|
4
4
|
mt/sql/psql.py,sha256=w5klr_2lUZnAFee-Fzbn3G8jdYcf_iX4N_GfAGIdsMI,66670
|
|
5
5
|
mt/sql/sqlite.py,sha256=T2ak_hhNi_zRfpg_gp8JhNHn7D2kl4i-Ey6-9ANMtz0,8678
|
|
6
|
-
mt/sql/version.py,sha256=
|
|
6
|
+
mt/sql/version.py,sha256=8tBsqtxQerl5F7BRwE4TukPbKKa8-uD8yD7uLxhpCC4,208
|
|
7
7
|
mt/sql/redshift/__init__.py,sha256=S-eRxJWcrvncF7LZXuulCdPV-UERu9eiw6uyDb5aGsM,443
|
|
8
8
|
mt/sql/redshift/commands.py,sha256=xhGUBf3bL66EYdZI5HCUtOx-XqPCnXT_P-LnhPgtzrY,40193
|
|
9
9
|
mt/sql/redshift/ddl.py,sha256=eUcZj9oIajiE1wKKBAP-V64gYJ7cVnSAt8dLFfluOJA,9777
|
|
10
10
|
mt/sql/redshift/dialect.py,sha256=-0JjJubZZHRw0abhl6H6rKWaUE9pKtGwAuX-62T0e_c,53399
|
|
11
11
|
mt/sql/redshift/main.py,sha256=H8_5sjtJ7dzWoCMXzPNjYhrMQ18eLUQ9xg-aYl5QeTc,17104
|
|
12
12
|
mt/sql/redshift/redshift-ca-bundle.crt,sha256=532qYkOpQOstFE0mdXE1GVtL3v00XDKgZNTr6gK5-KE,8621
|
|
13
|
-
mtsql-1.12.
|
|
14
|
-
mtsql-1.12.
|
|
15
|
-
mtsql-1.12.
|
|
16
|
-
mtsql-1.12.
|
|
17
|
-
mtsql-1.12.
|
|
13
|
+
mtsql-1.12.14.dist-info/licenses/LICENSE,sha256=PojkRlQzTT5Eg6Nj03XoIVEefN3u8iiIFf1p4rqe_t4,1070
|
|
14
|
+
mtsql-1.12.14.dist-info/METADATA,sha256=1cLDGhwMKvcfA_go8OoiJVXrcSgGCOreFfZPvh0OuC8,740
|
|
15
|
+
mtsql-1.12.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
mtsql-1.12.14.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
|
|
17
|
+
mtsql-1.12.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|