rda-python-common 3.0.0__tar.gz → 3.0.1__tar.gz
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.
- {rda_python_common-3.0.0/src/rda_python_common.egg-info → rda_python_common-3.0.1}/PKG-INFO +1 -1
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/pyproject.toml +1 -1
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgDBI.py +6 -2
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_dbi.py +11 -3
- {rda_python_common-3.0.0 → rda_python_common-3.0.1/src/rda_python_common.egg-info}/PKG-INFO +1 -1
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/LICENSE +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/README.md +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/setup.cfg +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgCMD.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgFile.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgLOG.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgLock.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgOPT.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgSIG.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgSplit.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/PgUtil.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/__init__.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_cmd.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_file.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_lock.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_log.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_opt.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_password.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_sig.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_split.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pg_util.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pgpassword.py +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common/pgpassword.usg +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/entry_points.txt +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/requires.txt +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/top_level.txt +0 -0
- {rda_python_common-3.0.0 → rda_python_common-3.0.1}/test/test_common.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
@@ -328,8 +328,12 @@ def starttran():
|
|
|
328
328
|
pgconnect(0, 0, False)
|
|
329
329
|
else:
|
|
330
330
|
try:
|
|
331
|
-
|
|
332
|
-
|
|
331
|
+
# Liveness probe: psycopg2's isolation_level getter could raise on a
|
|
332
|
+
# dead connection, but psycopg3's is a cached attribute that never
|
|
333
|
+
# touches the server. A trivial round-trip detects a broken
|
|
334
|
+
# connection under either driver.
|
|
335
|
+
pgdb.cursor().execute("SELECT 1")
|
|
336
|
+
except PgSQL.Error as e:
|
|
333
337
|
pgconnect(0, 0, False)
|
|
334
338
|
if pgdb.closed:
|
|
335
339
|
pgconnect(0, 0, False)
|
|
@@ -410,8 +410,12 @@ class PgDBI(PgLOG):
|
|
|
410
410
|
self.pgconnect(0, 0, False)
|
|
411
411
|
else:
|
|
412
412
|
try:
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
# Liveness probe: psycopg2's isolation_level getter could raise on a
|
|
414
|
+
# dead connection, but psycopg3's is a cached attribute that never
|
|
415
|
+
# touches the server. A trivial round-trip detects a broken
|
|
416
|
+
# connection under either driver.
|
|
417
|
+
self.pgdb.cursor().execute("SELECT 1")
|
|
418
|
+
except PgSQL.Error as e:
|
|
415
419
|
self.pgconnect(0, 0, False)
|
|
416
420
|
if self.pgdb.closed:
|
|
417
421
|
self.pgconnect(0, 0, False)
|
|
@@ -533,7 +537,11 @@ class PgDBI(PgLOG):
|
|
|
533
537
|
dberror (str): Full database error string to inspect.
|
|
534
538
|
logact (int): Logging action flags forwarded to add_new_table().
|
|
535
539
|
"""
|
|
536
|
-
|
|
540
|
+
# The caller (check_dberror) only invokes this after pgcode == '42P01', so
|
|
541
|
+
# match just the relation message. psycopg2's pgerror includes the
|
|
542
|
+
# 'ERROR: ' severity prefix while psycopg3's message_primary does not, so
|
|
543
|
+
# anchoring on that prefix only matched under psycopg2.
|
|
544
|
+
ms = re.search(r'relation "(.+)" does not exist', dberror)
|
|
537
545
|
if ms:
|
|
538
546
|
tname = ms.group(1)
|
|
539
547
|
self.add_new_table(tname, logact = logact)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_common-3.0.0 → rda_python_common-3.0.1}/src/rda_python_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|