From: Federico Caselli Date: Mon, 12 Jun 2023 20:08:19 +0000 (+0200) Subject: various minor docs improvements X-Git-Tag: rel_2_0_17~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd290c4329b80c85475c6a76eec2fd6574f9781f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git various minor docs improvements Change-Id: I5e7332047c03260792bf990aafd0ef4e15f5f082 --- diff --git a/doc/build/changelog/whatsnew_20.rst b/doc/build/changelog/whatsnew_20.rst index 1a0f29c4a9..179ed55f2d 100644 --- a/doc/build/changelog/whatsnew_20.rst +++ b/doc/build/changelog/whatsnew_20.rst @@ -684,8 +684,8 @@ or ``Mapped[user_fk]`` draw from both the ``Annotated`` construct directly in order to re-use pre-established typing and column configurations. -Step six - turn mapped classes into dataclasses_ -+++++++++++++++++++++++++++++++++++++++++++++++++ +Optional step - turn mapped classes into dataclasses_ ++++++++++++++++++++++++++++++++++++++++++++++++++++++ We can turn mapped classes into dataclasses_, where a key advantage is that we can build a strictly-typed ``__init__()`` method with explicit diff --git a/doc/build/orm/dataclasses.rst b/doc/build/orm/dataclasses.rst index 1421b0ad2b..639140b2fb 100644 --- a/doc/build/orm/dataclasses.rst +++ b/doc/build/orm/dataclasses.rst @@ -528,9 +528,10 @@ variable may be generated:: Integrating with Alternate Dataclass Providers such as Pydantic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. warning:: Pydantic's dataclass layer is **not fully compatible with - SQLAlchemy's class instrumentation without additional internal changes, and - many features such as related collections may not work correctly.**. +.. warning:: The dataclass layer of Pydantic version 1.x is **not fully + compatible with SQLAlchemy's class instrumentation without additional + internal changes, and many features such as related collections may + not work correctly.**. For Pydantic compatibility, please consider the `SQLModel ` ORM which is built with diff --git a/doc/build/tutorial/further_reading.rst b/doc/build/tutorial/further_reading.rst index d8b792f03d..2335f5f923 100644 --- a/doc/build/tutorial/further_reading.rst +++ b/doc/build/tutorial/further_reading.rst @@ -36,9 +36,4 @@ ORM Essential Reference * :ref:`session_toplevel` -* :doc:`/orm/loading_objects` - - - - - +* :doc:`queryguide/index` diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py index 151bd809d0..ad1267750b 100644 --- a/lib/sqlalchemy/dialects/postgresql/ext.py +++ b/lib/sqlalchemy/dialects/postgresql/ext.py @@ -158,6 +158,10 @@ class ExcludeConstraint(ColumnCollectionConstraint): ) ) + The exclude constraint defined in this example requires the + ``btree_gist`` extension, that can be created using the + command ``CREATE EXTENSION btree_gist;``. + :param \*elements: A sequence of two tuples of the form ``(column, operator)`` where