summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-08-04 10:27:59 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-08-05 10:39:39 -0400
commitfce1d954aa57feca9c163f9d8cf66df5e8ce7b65 (patch)
tree7412139205de0379b5e47e549b87c80bfe618da9 /lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
parenteeff036db61377b8159757e6cc2a2d83d85bf69e (diff)
downloadsqlalchemy-fce1d954aa57feca9c163f9d8cf66df5e8ce7b65.tar.gz
implement PG ranges/multiranges agnostically
Ranges now work using a new Range object, multiranges as lists of Range objects (this is what asyncpg does. not sure why psycopg has a "Multirange" type). psycopg, psycopg2, and asyncpg are currently supported. It's not clear how to make ranges work with pg8000, likely needs string conversion; this is straightforward with the new archicture and can be added later. Fixes: #8178 Change-Id: Iab8d8382873d5c14199adbe3f09fd0dc17e2b9f1
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/_psycopg_common.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/_psycopg_common.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py b/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
index efd1dbe41..92341d2da 100644
--- a/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
+++ b/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
@@ -4,6 +4,7 @@
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
# mypy: ignore-errors
+from __future__ import annotations
import decimal