From 31acba8ff7c123a20ae308b7f4ab6df3df264b48 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sun, 21 Nov 2021 21:17:27 +0100 Subject: Clean up most py3k compat Change-Id: I8172fdcc3103ff92aa049827728484c8779af6b7 --- lib/sqlalchemy/dialects/postgresql/asyncpg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py') diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py index fe1f9fd5a..d6cde0087 100644 --- a/lib/sqlalchemy/dialects/postgresql/asyncpg.py +++ b/lib/sqlalchemy/dialects/postgresql/asyncpg.py @@ -99,6 +99,7 @@ To disable the prepared statement cache, use a value of zero:: """ # noqa import collections +import collections.abc as collections_abc import decimal import json as _py_json import re @@ -216,8 +217,8 @@ class AsyncpgJSONStrIndexType(sqltypes.JSON.JSONStrIndexType): class AsyncpgJSONPathType(json.JSONPathType): def bind_processor(self, dialect): def process(value): - assert isinstance(value, util.collections_abc.Sequence) - tokens = [util.text_type(elem) for elem in value] + assert isinstance(value, collections_abc.Sequence) + tokens = [str(elem) for elem in value] return tokens return process -- cgit v1.2.1