From: Federico Caselli Date: Thu, 22 Jan 2026 20:56:59 +0000 (+0100) Subject: ensure links render properly in the docs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f1f853d1a744bf526856667c52ba5256fb08f48;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git ensure links render properly in the docs Change-Id: Ie4d028d45f3c44e07b36a3d4fe16c9663ebe02ba --- diff --git a/doc/build/changelog/changelog_21.rst b/doc/build/changelog/changelog_21.rst index 59b4e67adc..f64174e8d3 100644 --- a/doc/build/changelog/changelog_21.rst +++ b/doc/build/changelog/changelog_21.rst @@ -222,10 +222,10 @@ :tags: typing :tickets: 10646 - The default implementation of :attr:`_sql.TypeEngine.python_type` now + The default implementation of :attr:`_types.TypeEngine.python_type` now returns ``object`` instead of ``NotImplementedError``, since that's the base for all types in Python3. - The ``python_type`` of :class:`_sql.JSON` no longer returns ``dict``, + The ``python_type`` of :class:`_types.JSON` no longer returns ``dict``, but instead fallbacks to the generic implementation. .. change:: @@ -734,8 +734,8 @@ Added support for per-session execution options that are merged into all queries executed within that session. The :class:`_orm.Session`, :class:`_orm.sessionmaker`, :class:`_orm.scoped_session`, - :class:`_ext.asyncio.AsyncSession`, and - :class:`_ext.asyncio.async_sessionmaker` constructors now accept an + :class:`_asyncio.AsyncSession`, and + :class:`_asyncio.async_sessionmaker` constructors now accept an :paramref:`_orm.Session.execution_options` parameter that will be applied to all explicit query executions (e.g. using :meth:`_orm.Session.execute`, :meth:`_orm.Session.get`, :meth:`_orm.Session.scalars`) for that session @@ -1243,8 +1243,8 @@ :tags: usecase, sql, orm :tickets: 8601 - The :meth:`_sql.Select.filter_by`, :meth:`_sql.Update.filter_by` and - :meth:`_sql.Delete.filter_by` methods now search across all entities + The :meth:`_sql.Select.filter_by`, :meth:`.Update.filter_by` and + :meth:`.Delete.filter_by` methods now search across all entities present in the statement, rather than limiting their search to only the last joined entity or the first FROM entity. This allows these methods to locate attributes unambiguously across multiple joined tables, diff --git a/doc/build/core/dml.rst b/doc/build/core/dml.rst index 1724dd6985..7c7349a92b 100644 --- a/doc/build/core/dml.rst +++ b/doc/build/core/dml.rst @@ -32,6 +32,10 @@ Class documentation for the constructors listed at .. automethod:: Delete.where + .. automethod:: Delete.filter + + .. automethod:: Delete.filter_by + .. automethod:: Delete.with_dialect_options .. automethod:: Delete.returning @@ -52,6 +56,10 @@ Class documentation for the constructors listed at .. automethod:: Update.where + .. automethod:: Update.filter + + .. automethod:: Update.filter_by + .. automethod:: Update.with_dialect_options .. automethod:: Update.values diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index cfca218ebe..adad1ebda9 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -1537,7 +1537,7 @@ class DMLWhereBase: return self def filter(self, *criteria: roles.ExpressionElementRole[Any]) -> Self: - """A synonym for the :meth:`_dml.DMLWhereBase.where` method. + """A synonym for the :meth:`.where` method. .. versionadded:: 1.4 @@ -1569,7 +1569,7 @@ class DMLWhereBase: .. seealso:: - :meth:`.DMLWhereBase.where` - filter on SQL expressions. + :meth:`.where` - filter on SQL expressions. :meth:`_sql.Select.filter_by` diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index ba2489f3ce..55101b8e11 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -3216,11 +3216,18 @@ class TableClause(roles.DMLTableRole, Immutable, NamedFromClause): self._columns.add(c, index=index) c.table = self - def append_column(self, c: ColumnClause[Any]) -> None: - self._insert_col_impl(c) + def append_column(self, column: ColumnClause[Any]) -> None: + """Append a :class:`.ColumnClause` to this :class:`.TableClause`.""" + self._insert_col_impl(column) - def insert_column(self, c: ColumnClause[Any], index: int) -> None: - self._insert_col_impl(c, index=index) + def insert_column(self, column: ColumnClause[Any], index: int) -> None: + """Insert a :class:`.ColumnClause` to this :class:`.TableClause` at + a specific position. + + .. versionadded:: 2.1 + + """ + self._insert_col_impl(column, index=index) @util.preload_module("sqlalchemy.sql.dml") def insert(self) -> util.preloaded.sql_dml.Insert: