macrostrat.database 3.3.2__tar.gz → 3.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: macrostrat.database
3
- Version: 3.3.2
3
+ Version: 3.3.3
4
4
  Summary: A SQLAlchemy-based database toolkit.
5
5
  Author: Daven Quinn
6
6
  Author-email: dev@davenquinn.com
@@ -333,9 +333,10 @@ def _should_raise_query_error(err):
333
333
  return True
334
334
 
335
335
  # If we cancel statements midstream, we should raise the error.
336
- # We might want to change this behavior in the future.
336
+ # We might want to change this behavior in the future, or support more graceful handling of errors from other
337
+ # database backends.
337
338
  # Ideally we could handle operational errors more gracefully
338
- if isinstance(orig_err, psycopg2.errors.QueryCanceled) or orig_err.pgcode == "57014":
339
+ if isinstance(orig_err, psycopg2.errors.QueryCanceled) or getattr(orig_err, "pgcode", None) == "57014":
339
340
  return True
340
341
 
341
342
  return False
@@ -3,7 +3,7 @@ authors = ["Daven Quinn <dev@davenquinn.com>"]
3
3
  description = "A SQLAlchemy-based database toolkit."
4
4
  name = "macrostrat.database"
5
5
  packages = [{ include = "macrostrat" }]
6
- version = "3.3.2"
6
+ version = "3.3.3"
7
7
 
8
8
  [tool.poetry.dependencies]
9
9
  GeoAlchemy2 = "^0.14.0"