dbobj3 0.9.0__tar.gz → 0.9.3__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.
dbobj3-0.9.3/.gitignore
ADDED
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dbobj3"
|
|
7
|
-
version = "0.9.
|
|
7
|
+
version = "0.9.3"
|
|
8
8
|
description = "High-level MySQL/MSSQL/Oracle access module"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.6"
|
|
@@ -16,7 +16,7 @@ dependencies = [
|
|
|
16
16
|
packages = ["src/dbobj3.py"]
|
|
17
17
|
|
|
18
18
|
[tool.bumpversion]
|
|
19
|
-
current_version = "0.9.
|
|
19
|
+
current_version = "0.9.3"
|
|
20
20
|
commit = true
|
|
21
21
|
tag = true
|
|
22
22
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)"
|
|
@@ -21,7 +21,7 @@ Example:
|
|
|
21
21
|
rsServices.next()
|
|
22
22
|
|
|
23
23
|
"""
|
|
24
|
-
__version__ = "0.9.
|
|
24
|
+
__version__ = "0.9.3"
|
|
25
25
|
|
|
26
26
|
import os
|
|
27
27
|
import importlib # needed for shim
|
|
@@ -155,8 +155,9 @@ def _is_mysql_connected(handle):
|
|
|
155
155
|
# mysqlclient: ping() raises exception if not connected
|
|
156
156
|
db_ping_res = None
|
|
157
157
|
db_ping_res = handle.ping()
|
|
158
|
+
# it appears that PyMySQL's ping() returns None when successful, but does it always?
|
|
158
159
|
if using_mysqlclient:
|
|
159
|
-
print("mysqlclient ping() result:", db_ping_res)
|
|
160
|
+
#print("mysqlclient ping() result:", db_ping_res)
|
|
160
161
|
return True
|
|
161
162
|
else:
|
|
162
163
|
return True
|
|
@@ -573,7 +574,6 @@ class dbObjConnection:
|
|
|
573
574
|
|
|
574
575
|
def mySqlConnect(self, prmHost, prmDb, prmUser, prmPass, prmPort=3306):
|
|
575
576
|
try:
|
|
576
|
-
|
|
577
577
|
kwargs = dict(host=prmHost, db=prmDb, user=prmUser, passwd=prmPass, port=prmPort)
|
|
578
578
|
if using_pymysql:
|
|
579
579
|
conv = _build_pymysql_conv()
|
|
@@ -739,7 +739,7 @@ class dbObjConnection:
|
|
|
739
739
|
self.reconnect()
|
|
740
740
|
if not _is_mysql_connected(self.connHandle):
|
|
741
741
|
raise RuntimeError(f"Cannot ensure connection: MySQL connection dead (host={self.host}, db={self.db})")
|
|
742
|
-
|
|
742
|
+
|
|
743
743
|
def getCursor(self):
|
|
744
744
|
# Reuse existing cursor if requested and still valid
|
|
745
745
|
if self.cursor and self.reuseCursor and _is_mysql_connected(self.connHandle):
|
|
@@ -1423,4 +1423,4 @@ if __name__ == '__main__':
|
|
|
1423
1423
|
return odb
|
|
1424
1424
|
|
|
1425
1425
|
# odb will be the interactively instantiated dbObj connection
|
|
1426
|
-
odb = run_test()
|
|
1426
|
+
odb = run_test()
|
|
File without changes
|