database-wrapper-pgsql 0.2.23__tar.gz → 0.2.24__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.
Files changed (17) hide show
  1. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/PKG-INFO +2 -2
  2. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/connector.py +16 -6
  3. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql.egg-info/PKG-INFO +2 -2
  4. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql.egg-info/requires.txt +1 -1
  5. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/pyproject.toml +2 -2
  6. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/README.md +0 -0
  7. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/__init__.py +0 -0
  8. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/db_wrapper_pgsql.py +0 -0
  9. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/db_wrapper_pgsql_async.py +0 -0
  10. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/db_wrapper_pgsql_mixin.py +0 -0
  11. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/pg_introspector.py +0 -0
  12. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/py.typed +0 -0
  13. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql/type_mapping.py +0 -0
  14. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql.egg-info/SOURCES.txt +0 -0
  15. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql.egg-info/dependency_links.txt +0 -0
  16. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/database_wrapper_pgsql.egg-info/top_level.txt +0 -0
  17. {database_wrapper_pgsql-0.2.23 → database_wrapper_pgsql-0.2.24}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: database_wrapper_pgsql
3
- Version: 0.2.23
3
+ Version: 0.2.24
4
4
  Summary: database_wrapper for PostgreSQL database
5
5
  Author-email: Gints Murans <gm@gm.lv>
6
6
  License: GNU General Public License v3.0 (GPL-3.0)
@@ -32,7 +32,7 @@ Classifier: Topic :: Software Development
32
32
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
33
33
  Requires-Python: >=3.8
34
34
  Description-Content-Type: text/markdown
35
- Requires-Dist: database_wrapper==0.2.23
35
+ Requires-Dist: database_wrapper==0.2.24
36
36
  Requires-Dist: psycopg[binary]>=3.2.0
37
37
  Requires-Dist: psycopg[pool]>=3.2.0
38
38
 
@@ -220,13 +220,23 @@ class PgsqlAsync(DatabaseBackend):
220
220
 
221
221
  async def close(self) -> Any:
222
222
  """Close connections"""
223
- if self.cursor:
224
- self.logger.debug("Closing cursor")
225
- await self.cursor.close()
223
+ try:
224
+ if hasattr(self, "cursor") and self.cursor:
225
+ self.logger.debug("Closing cursor")
226
+ await self.cursor.close()
227
+ except Exception as e:
228
+ self.logger.debug(f"Error while closing cursor: {e}")
229
+ finally:
230
+ self.cursor = None
226
231
 
227
- if self.connection:
228
- self.logger.debug("Closing connection")
229
- await self.connection.close()
232
+ try:
233
+ if hasattr(self, "connection") and self.connection:
234
+ self.logger.debug("Closing connection")
235
+ await self.connection.close()
236
+ except Exception as e:
237
+ self.logger.debug(f"Error while closing connection: {e}")
238
+ finally:
239
+ self.connection = None
230
240
 
231
241
  async def ping(self) -> bool:
232
242
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: database_wrapper_pgsql
3
- Version: 0.2.23
3
+ Version: 0.2.24
4
4
  Summary: database_wrapper for PostgreSQL database
5
5
  Author-email: Gints Murans <gm@gm.lv>
6
6
  License: GNU General Public License v3.0 (GPL-3.0)
@@ -32,7 +32,7 @@ Classifier: Topic :: Software Development
32
32
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
33
33
  Requires-Python: >=3.8
34
34
  Description-Content-Type: text/markdown
35
- Requires-Dist: database_wrapper==0.2.23
35
+ Requires-Dist: database_wrapper==0.2.24
36
36
  Requires-Dist: psycopg[binary]>=3.2.0
37
37
  Requires-Dist: psycopg[pool]>=3.2.0
38
38
 
@@ -1,3 +1,3 @@
1
- database_wrapper==0.2.23
1
+ database_wrapper==0.2.24
2
2
  psycopg[binary]>=3.2.0
3
3
  psycopg[pool]>=3.2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "database_wrapper_pgsql"
7
- version = "0.2.23"
7
+ version = "0.2.24"
8
8
  description = "database_wrapper for PostgreSQL database"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -33,7 +33,7 @@ classifiers = [
33
33
  ]
34
34
  keywords = ["database", "wrapper", "python", "postgresql", "pgsql"]
35
35
  dependencies = [
36
- "database_wrapper == 0.2.23",
36
+ "database_wrapper == 0.2.24",
37
37
  "psycopg[binary] >= 3.2.0",
38
38
  "psycopg[pool] >= 3.2.0",
39
39
  ]