From 758dc7ed2b322069b80fb21b5cc3296d2a8c6c92 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Wed, 13 Jul 2022 23:18:57 +0200 Subject: [PATCH] Minor cleanup - remove unnecessary postgresql visit that's equal to the default compiler - clarify type_annotation_map documentation Change-Id: I0c1fa212d06f6af799a5894802574250622c855e --- lib/sqlalchemy/dialects/postgresql/base.py | 5 ----- lib/sqlalchemy/orm/decl_api.py | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 56bc02b236..20903b55f9 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -2188,11 +2188,6 @@ class PGDDLCompiler(compiler.DDLCompiler): text += self._define_constraint_validity(constraint) return text - def visit_drop_table_comment(self, drop): - return "COMMENT ON TABLE %s IS NULL" % self.preparer.format_table( - drop.element - ) - def visit_create_enum_type(self, create): type_ = create.element diff --git a/lib/sqlalchemy/orm/decl_api.py b/lib/sqlalchemy/orm/decl_api.py index 9c095c7401..e6e69a9e07 100644 --- a/lib/sqlalchemy/orm/decl_api.py +++ b/lib/sqlalchemy/orm/decl_api.py @@ -910,7 +910,8 @@ class registry: inter-base relationships. :param type_annotation_map: optional dictionary of Python types to - SQLAlchemy :class:`_types.TypeEngine` classes or instances. This + SQLAlchemy :class:`_types.TypeEngine` classes or instances. + The provided dict will update the default type mapping. This is used exclusively by the :class:`_orm.MappedColumn` construct to produce column types based on annotations within the :class:`_orm.Mapped` type. -- 2.47.2