From 349a7c5e0e2aeeac98fad789b0043a4bdfeed837 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 11 Feb 2022 04:54:45 -0500 Subject: add backend agnostic UUID datatype Added new backend-agnostic :class:`_types.Uuid` datatype generalized from the PostgreSQL dialects to now be a core type, as well as migrated :class:`_types.UUID` from the PostgreSQL dialect. Thanks to Trevor Gross for the help on this. also includes: * corrects some missing behaviors in the suite literal fixtures test where row round trips weren't being correctly asserted. * fixes some of the ISO literal date rendering added in 952383f9ee0 for #5052 to truncate datetime strings for date/time datatypes in the same way that drivers typically do for bound parameters; this was not working fully and wasn't caught by the broken test fixture Fixes: #7212 Change-Id: I981ac6d34d278c18281c144430a528764c241b04 --- lib/sqlalchemy/dialects/postgresql/psycopg.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg.py') diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg.py b/lib/sqlalchemy/dialects/postgresql/psycopg.py index 634cea38a..7ec26cb4e 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg.py @@ -62,11 +62,9 @@ import re from ._psycopg_common import _PGDialect_common_psycopg from ._psycopg_common import _PGExecutionContext_common_psycopg -from ._psycopg_common import _PsycopgUUID from .base import INTERVAL from .base import PGCompiler from .base import PGIdentifierPreparer -from .base import UUID from .json import JSON from .json import JSONB from .json import JSONPathType @@ -120,10 +118,6 @@ class _PGJSONPathType(JSONPathType): pass -class _PGUUID(_PsycopgUUID): - render_bind_cast = True - - class _PGInterval(INTERVAL): render_bind_cast = True @@ -201,7 +195,6 @@ class PGDialect_psycopg(_PGDialect_common_psycopg): sqltypes.JSON.JSONPathType: _PGJSONPathType, sqltypes.JSON.JSONIntIndexType: _PGJSONIntIndexType, sqltypes.JSON.JSONStrIndexType: _PGJSONStrIndexType, - UUID: _PGUUID, sqltypes.Interval: _PGInterval, INTERVAL: _PGInterval, sqltypes.Date: _PGDate, -- cgit v1.2.1