summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/_elements_constructors.py30
-rw-r--r--lib/sqlalchemy/sql/_selectable_constructors.py11
-rw-r--r--lib/sqlalchemy/sql/base.py7
-rw-r--r--lib/sqlalchemy/sql/compiler.py2
-rw-r--r--lib/sqlalchemy/sql/ddl.py4
-rw-r--r--lib/sqlalchemy/sql/dml.py32
-rw-r--r--lib/sqlalchemy/sql/elements.py19
-rw-r--r--lib/sqlalchemy/sql/functions.py21
-rw-r--r--lib/sqlalchemy/sql/operators.py9
-rw-r--r--lib/sqlalchemy/sql/schema.py97
-rw-r--r--lib/sqlalchemy/sql/selectable.py32
-rw-r--r--lib/sqlalchemy/sql/sqltypes.py26
-rw-r--r--lib/sqlalchemy/sql/type_api.py11
13 files changed, 1 insertions, 300 deletions
diff --git a/lib/sqlalchemy/sql/_elements_constructors.py b/lib/sqlalchemy/sql/_elements_constructors.py
index f54fff5ce..99a839cc9 100644
--- a/lib/sqlalchemy/sql/_elements_constructors.py
+++ b/lib/sqlalchemy/sql/_elements_constructors.py
@@ -411,8 +411,6 @@ def between(
:param symmetric: if True, will render " BETWEEN SYMMETRIC ". Note
that not all databases support this syntax.
- .. versionadded:: 0.9.5
-
.. seealso::
:meth:`_expression.ColumnElement.between`
@@ -878,11 +876,6 @@ def cast(
as well as the bound-value handling and result-row-handling behavior
of the type.
- .. versionchanged:: 0.9.0 :func:`.cast` now applies the given type
- to the expression such that it takes effect on the bound-value,
- e.g. the Python-to-database direction, in addition to the
- result handling, e.g. database-to-Python, direction.
-
An alternative to :func:`.cast` is the :func:`.type_coerce` function.
This function performs the second task of associating an expression
with a specific type, but does not render the ``CAST`` expression
@@ -978,10 +971,6 @@ def column(
:class:`_schema.MetaData`, DDL, or events, unlike its
:class:`_schema.Table` counterpart.
- .. versionchanged:: 1.0.0 :func:`_expression.column` can now
- be imported from the plain ``sqlalchemy`` namespace like any
- other SQL element.
-
:param text: the text of the element.
:param type: :class:`_types.TypeEngine` object which can associate
@@ -1178,10 +1167,6 @@ def false() -> False_:
>>> print(select(t.c.x).where(and_(t.c.x > 5, false())))
{printsql}SELECT x FROM t WHERE false{stop}
- .. versionchanged:: 0.9 :func:`.true` and :func:`.false` feature
- better integrated behavior within conjunctions and on dialects
- that don't support true/false constants.
-
.. seealso::
:func:`.true`
@@ -1209,8 +1194,6 @@ def funcfilter(
This function is also available from the :data:`~.expression.func`
construct itself via the :meth:`.FunctionElement.filter` method.
- .. versionadded:: 1.0.0
-
.. seealso::
:ref:`tutorial_functions_within_group` - in the
@@ -1514,9 +1497,6 @@ def over(
func.row_number().over(order_by='x', range_=(1, 3))
- .. versionadded:: 1.1 support for RANGE / ROWS within a window
-
-
:param element: a :class:`.FunctionElement`, :class:`.WithinGroup`,
or other compatible construct.
:param partition_by: a column element or string, or a list
@@ -1529,14 +1509,10 @@ def over(
tuple value which can contain integer values or ``None``,
and will render a RANGE BETWEEN PRECEDING / FOLLOWING clause.
- .. versionadded:: 1.1
-
:param rows: optional rows clause for the window. This is a tuple
value which can contain integer values or None, and will render
a ROWS BETWEEN PRECEDING / FOLLOWING clause.
- .. versionadded:: 1.1
-
This function is also available from the :data:`~.expression.func`
construct itself via the :meth:`.FunctionElement.over` method.
@@ -1661,10 +1637,6 @@ def true() -> True_:
>>> print(select(t.c.x).where(and_(t.c.x > 5, false())))
{printsql}SELECT x FROM t WHERE false{stop}
- .. versionchanged:: 0.9 :func:`.true` and :func:`.false` feature
- better integrated behavior within conjunctions and on dialects
- that don't support true/false constants.
-
.. seealso::
:func:`.false`
@@ -1817,8 +1789,6 @@ def within_group(
:param \*order_by: one or more column elements that will be used
as the ORDER BY clause of the WITHIN GROUP construct.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`tutorial_functions_within_group` - in the
diff --git a/lib/sqlalchemy/sql/_selectable_constructors.py b/lib/sqlalchemy/sql/_selectable_constructors.py
index 8081c93e4..41e8b6eb1 100644
--- a/lib/sqlalchemy/sql/_selectable_constructors.py
+++ b/lib/sqlalchemy/sql/_selectable_constructors.py
@@ -256,8 +256,6 @@ def join(
:param full: if True, render a FULL OUTER JOIN, instead of JOIN.
- .. versionadded:: 1.1
-
.. seealso::
:meth:`_expression.FromClause.join` - method form,
@@ -286,8 +284,6 @@ def lateral(
only supported by a small number of backends, currently more recent
PostgreSQL versions.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`tutorial_lateral_correlation` - overview of usage.
@@ -502,11 +498,6 @@ def table(name: str, *columns: ColumnClause[Any], **kw: Any) -> TableClause:
:class:`_schema.Table` object.
It may be used to construct lightweight table constructs.
- .. versionchanged:: 1.0.0 :func:`_expression.table` can now
- be imported from the plain ``sqlalchemy`` namespace like any
- other SQL element.
-
-
:param name: Name of the table.
:param columns: A collection of :func:`_expression.column` constructs.
@@ -557,8 +548,6 @@ def tablesample(
people AS alias TABLESAMPLE bernoulli(:bernoulli_1)
REPEATABLE (random())
- .. versionadded:: 1.1
-
:param sampling: a ``float`` percentage between 0 and 100 or
:class:`_functions.Function`.
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py
index 8186f6ade..6267fd814 100644
--- a/lib/sqlalchemy/sql/base.py
+++ b/lib/sqlalchemy/sql/base.py
@@ -471,8 +471,6 @@ class DialectKWArgs:
:param default: default value of the parameter.
- .. versionadded:: 0.9.4
-
"""
construct_arg_dictionary = DialectKWArgs._kw_registry[dialect_name]
@@ -499,11 +497,6 @@ class DialectKWArgs:
form ``<dialect>_<kwarg>`` where the value will be assembled
into the list of options.
- .. versionadded:: 0.9.2
-
- .. versionchanged:: 0.9.4 The :attr:`.DialectKWArgs.dialect_kwargs`
- collection is now writable.
-
.. seealso::
:attr:`.DialectKWArgs.dialect_options` - nested dictionary form
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index ad0a3b686..9c68b311a 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -679,8 +679,6 @@ class Compiled:
:param schema_translate_map: dictionary of schema names to be
translated when forming the resultant SQL
- .. versionadded:: 1.1
-
.. seealso::
:ref:`schema_translating`
diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py
index 75fa0ba1c..b87049e07 100644
--- a/lib/sqlalchemy/sql/ddl.py
+++ b/lib/sqlalchemy/sql/ddl.py
@@ -528,8 +528,6 @@ class CreateTable(_CreateBase):
inline within the CREATE construct; if omitted, all foreign key
constraints that do not specify use_alter=True are included.
- .. versionadded:: 1.0.0
-
:param if_not_exists: if True, an IF NOT EXISTS operator will be
applied to the construct.
@@ -1306,8 +1304,6 @@ def sort_tables_and_constraints(
:param extra_dependencies: a sequence of 2-tuples of tables which will
also be considered as dependent on each other.
- .. versionadded:: 1.0.0
-
.. seealso::
:func:`.sort_tables`
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py
index 316392c0c..830f845b4 100644
--- a/lib/sqlalchemy/sql/dml.py
+++ b/lib/sqlalchemy/sql/dml.py
@@ -1033,23 +1033,6 @@ class ValuesBase(UpdateBase):
the traditional Core method of multiple parameter set
invocation for INSERTs and other statements.
- .. versionchanged:: 1.0.0 an INSERT that uses a multiple-VALUES
- clause, even a list of length one,
- implies that the :paramref:`_expression.Insert.inline`
- flag is set to
- True, indicating that the statement will not attempt to fetch
- the "last inserted primary key" or other defaults. The
- statement deals with an arbitrary number of rows, so the
- :attr:`_engine.CursorResult.inserted_primary_key`
- accessor does not
- apply.
-
- .. versionchanged:: 1.0.0 A multiple-VALUES INSERT now supports
- columns with Python side default values and callables in the
- same way as that of an "executemany" style of invocation; the
- callable is invoked for each row. See :ref:`bug_3288`
- for other details.
-
The UPDATE construct also supports rendering the SET parameters
in a specific order. For this feature refer to the
:meth:`_expression.Update.ordered_values` method.
@@ -1230,21 +1213,6 @@ class Insert(ValuesBase):
will only be invoked **once** for the whole statement, and **not
per row**.
- .. versionadded:: 1.0.0 - :meth:`_expression.Insert.from_select`
- now renders
- Python-side and SQL expression column defaults into the
- SELECT statement for columns otherwise not included in the
- list of column names.
-
- .. versionchanged:: 1.0.0 an INSERT that uses FROM SELECT
- implies that the :paramref:`_expression.insert.inline`
- flag is set to
- True, indicating that the statement will not attempt to fetch
- the "last inserted primary key" or other defaults. The statement
- deals with an arbitrary number of rows, so the
- :attr:`_engine.CursorResult.inserted_primary_key`
- accessor does not apply.
-
"""
if self._values:
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 8bf834d11..0f356ae27 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -260,8 +260,6 @@ class CompilerElement(Visitable):
print(s.compile(compile_kwargs={"literal_binds": True}))
- .. versionadded:: 0.9.0
-
.. seealso::
:ref:`faq_sql_expression_string`
@@ -1648,8 +1646,6 @@ class ColumnElement(
:func:`_expression.type_coerce`
- .. versionadded:: 1.0.7
-
"""
return Cast(self, type_)
@@ -2475,11 +2471,6 @@ class TextClause(
query = session.query(User).from_statement(stmt).options(
contains_eager(User.addresses))
- .. versionadded:: 1.1 the :meth:`_expression.TextClause.columns`
- method now
- offers positional column targeting in the result set when
- the column expressions are passed purely positionally.
-
The :meth:`_expression.TextClause.columns` method provides a direct
route to calling :meth:`_expression.FromClause.subquery` as well as
:meth:`_expression.SelectBase.cte`
@@ -3359,10 +3350,6 @@ class TypeCoerce(WrapsColumnExpression[_T]):
:class:`.TypeCoerce` supplies the :func:`_expression.type_coerce`
function; see that function for usage details.
- .. versionchanged:: 1.1 The :func:`.type_coerce` function now produces
- a persistent :class:`.TypeCoerce` wrapper object rather than
- translating the given object in place.
-
.. seealso::
:func:`_expression.type_coerce`
@@ -4231,8 +4218,6 @@ class FunctionFilter(ColumnElement[_T]):
func.count(1).filter(True)
- .. versionadded:: 1.0.0
-
.. seealso::
:meth:`.FunctionElement.filter`
@@ -4988,8 +4973,6 @@ class quoted_name(util.MemoizedSlots, str):
passing the name exactly as ``"some_table"`` without converting to
upper case.
- .. versionadded:: 0.9.0
-
.. versionchanged:: 1.2 The :class:`.quoted_name` construct is now
importable from ``sqlalchemy.sql``, in addition to the previous
location of ``sqlalchemy.sql.elements``.
@@ -5178,8 +5161,6 @@ class conv(_truncated_label):
name here is final, and the name will render as ``"ck_t_x5"`` and not
``"ck_t_ck_t_x5"``
- .. versionadded:: 0.9.4
-
.. seealso::
:ref:`constraint_naming_conventions`
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index 0952ca0f1..30ef0b7e3 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -440,9 +440,6 @@ class FunctionElement(Executable, ColumnElement[_T], FromClause, Generative):
See :func:`_expression.within_group` for a full description.
- .. versionadded:: 1.1
-
-
.. seealso::
:ref:`tutorial_functions_within_group` -
@@ -467,8 +464,6 @@ class FunctionElement(Executable, ColumnElement[_T], FromClause, Generative):
from sqlalchemy import funcfilter
funcfilter(func.count(1), True)
- .. versionadded:: 1.0.0
-
.. seealso::
:ref:`tutorial_functions_within_group` -
@@ -1587,8 +1582,6 @@ class array_agg(GenericFunction[_T]):
stmt = select(func.array_agg(table.c.values)[2:5])
- .. versionadded:: 1.1
-
.. seealso::
:func:`_postgresql.array_agg` - PostgreSQL-specific version that
@@ -1646,8 +1639,6 @@ class mode(OrderedSetAgg[_T]):
The return type of this function is the same as the sort expression.
- .. versionadded:: 1.1
-
"""
inherit_cache = True
@@ -1663,8 +1654,6 @@ class percentile_cont(OrderedSetAgg[_T]):
or if the arguments are an array, an :class:`_types.ARRAY` of the sort
expression's type.
- .. versionadded:: 1.1
-
"""
array_for_multi_clause = True
@@ -1681,8 +1670,6 @@ class percentile_disc(OrderedSetAgg[_T]):
or if the arguments are an array, an :class:`_types.ARRAY` of the sort
expression's type.
- .. versionadded:: 1.1
-
"""
array_for_multi_clause = True
@@ -1697,8 +1684,6 @@ class rank(GenericFunction[int]):
The return type of this function is :class:`.Integer`.
- .. versionadded:: 1.1
-
"""
type = sqltypes.Integer()
@@ -1713,8 +1698,6 @@ class dense_rank(GenericFunction[int]):
The return type of this function is :class:`.Integer`.
- .. versionadded:: 1.1
-
"""
type = sqltypes.Integer()
@@ -1729,8 +1712,6 @@ class percent_rank(GenericFunction[decimal.Decimal]):
The return type of this function is :class:`.Numeric`.
- .. versionadded:: 1.1
-
"""
type: sqltypes.Numeric[decimal.Decimal] = sqltypes.Numeric()
@@ -1745,8 +1726,6 @@ class cume_dist(GenericFunction[decimal.Decimal]):
The return type of this function is :class:`.Numeric`.
- .. versionadded:: 1.1
-
"""
type: sqltypes.Numeric[decimal.Decimal] = sqltypes.Numeric()
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index ab9ddf85c..352e5b62d 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -553,8 +553,6 @@ class ColumnOperators(Operators):
Renders "a IS DISTINCT FROM b" on most platforms;
on some such as SQLite may render "a IS NOT b".
- .. versionadded:: 1.1
-
"""
return self.operate(is_distinct_from, other)
@@ -568,8 +566,6 @@ class ColumnOperators(Operators):
renamed from ``isnot_distinct_from()`` in previous releases.
The previous name remains available for backwards compatibility.
- .. versionadded:: 1.1
-
"""
return self.operate(is_not_distinct_from, other)
@@ -1760,8 +1756,6 @@ class ColumnOperators(Operators):
:meth:`_types.ARRAY.Comparator.any` method, which a different
calling syntax and usage pattern.
- .. versionadded:: 1.1
-
"""
return self.operate(any_op)
@@ -1777,9 +1771,6 @@ class ColumnOperators(Operators):
:meth:`_types.ARRAY.Comparator.all` method, which a different
calling syntax and usage pattern.
-
- .. versionadded:: 1.1
-
"""
return self.operate(all_op)
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index ab56d2552..c8d99cf89 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -139,8 +139,6 @@ class SchemaConst(Enum):
:paramref:`.Sequence.schema`
- .. versionadded:: 1.0.14
-
"""
NULL_UNSPECIFIED = 3
@@ -777,12 +775,6 @@ class Table(
:class:`_schema.MetaData`,
specify the special symbol :attr:`.BLANK_SCHEMA`.
- .. versionadded:: 1.0.14 Added the :attr:`.BLANK_SCHEMA` symbol to
- allow a :class:`_schema.Table`
- to have a blank schema name even when the
- parent :class:`_schema.MetaData` specifies
- :paramref:`_schema.MetaData.schema`.
-
The quoting rules for the schema name are the same as those for the
``name`` parameter, in that quoting is applied for reserved words or
case-sensitive names; to enable unconditional quoting for the schema
@@ -1271,16 +1263,12 @@ class Table(
new_table = table.to_metadata(m2, schema="alt_schema",
referred_schema_fn=referred_schema_fn)
- .. versionadded:: 0.9.2
-
:param name: optional string name indicating the target table name.
If not specified or None, the table name is retained. This allows
a :class:`_schema.Table` to be copied to the same
:class:`_schema.MetaData` target
with a new name.
- .. versionadded:: 1.0.0
-
"""
if name is None:
name = self.name
@@ -1438,12 +1426,6 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
well, at the moment that the foreign key is resolved against that
remote :class:`_schema.Column` object.
- .. versionchanged:: 0.9.0
- Support for propagation of type to a :class:`_schema.Column`
- from its
- :class:`_schema.ForeignKey` object has been improved and should be
- more reliable and timely.
-
:param \*args: Additional positional arguments include various
:class:`.SchemaItem` derived constructs which will be applied
as options to the column. These include instances of
@@ -1520,17 +1502,6 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
datatype of INTEGER in order to disable auto increment semantics
for that column.
- .. versionchanged:: 1.1 The autoincrement flag now defaults to
- ``"auto"`` which indicates autoincrement semantics by default
- for single-column integer primary keys only; for composite
- (multi-column) primary keys, autoincrement is never implicitly
- enabled; as always, ``autoincrement=True`` will allow for
- at most one of those columns to be an "autoincrement" column.
- ``autoincrement=True`` may also be set on a
- :class:`_schema.Column`
- that has an explicit client-side or server-side default,
- subject to limitations of the backend database and dialect.
-
The setting *only* has an effect for columns which are:
* Integer derived (i.e. INT, SMALLINT, BIGINT).
@@ -2612,8 +2583,6 @@ class ForeignKey(DialectKWArgs, SchemaItem):
:param info: Optional data dictionary which will be populated into the
:attr:`.SchemaItem.info` attribute of this object.
- .. versionadded:: 1.0.0
-
:param comment: Optional string that will render an SQL comment on
foreign key constraint creation.
@@ -2627,8 +2596,6 @@ class ForeignKey(DialectKWArgs, SchemaItem):
an individual dialect at :ref:`dialect_toplevel` for detail on
documented arguments.
- .. versionadded:: 0.9.2
-
"""
self._colspec = coercions.expect(roles.DDLReferredColumnRole, column)
@@ -3480,8 +3447,6 @@ class Sequence(HasSchemaAttr, IdentityOptions, DefaultGenerator):
minvalue of 1 and -2^63-1 for ascending and descending sequences,
respectively.
- .. versionadded:: 1.0.7
-
:param maxvalue: the maximum value of the sequence. This
value is used when the CREATE SEQUENCE command is emitted to
the database as the value of the "MAXVALUE" clause. If ``None``,
@@ -3489,8 +3454,6 @@ class Sequence(HasSchemaAttr, IdentityOptions, DefaultGenerator):
maxvalue of 2^63-1 and -1 for ascending and descending sequences,
respectively.
- .. versionadded:: 1.0.7
-
:param nominvalue: no minimum value of the sequence. This
value is used when the CREATE SEQUENCE command is emitted to
the database as the value of the "NO MINVALUE" clause. If ``None``,
@@ -3498,8 +3461,6 @@ class Sequence(HasSchemaAttr, IdentityOptions, DefaultGenerator):
minvalue of 1 and -2^63-1 for ascending and descending sequences,
respectively.
- .. versionadded:: 1.0.7
-
:param nomaxvalue: no maximum value of the sequence. This
value is used when the CREATE SEQUENCE command is emitted to
the database as the value of the "NO MAXVALUE" clause. If ``None``,
@@ -3507,8 +3468,6 @@ class Sequence(HasSchemaAttr, IdentityOptions, DefaultGenerator):
maxvalue of 2^63-1 and -1 for ascending and descending sequences,
respectively.
- .. versionadded:: 1.0.7
-
:param cycle: allows the sequence to wrap around when the maxvalue
or minvalue has been reached by an ascending or descending sequence
respectively. This value is used when the CREATE SEQUENCE command
@@ -3518,8 +3477,6 @@ class Sequence(HasSchemaAttr, IdentityOptions, DefaultGenerator):
after the sequence has reached its maximum value will return an
error.
- .. versionadded:: 1.0.7
-
:param schema: optional schema name for the sequence, if located
in a schema other than the default. The rules for selecting the
schema name when a :class:`_schema.MetaData`
@@ -3530,15 +3487,11 @@ class Sequence(HasSchemaAttr, IdentityOptions, DefaultGenerator):
sequence which are calculated in advance. Renders the CACHE keyword
understood by Oracle and PostgreSQL.
- .. versionadded:: 1.1.12
-
:param order: optional boolean value; if ``True``, renders the
ORDER keyword, understood by Oracle, indicating the sequence is
definitively ordered. May be necessary to provide deterministic
ordering using Oracle RAC.
- .. versionadded:: 1.1.12
-
:param data_type: The type to be returned by the sequence, for
dialects that allow us to choose between INTEGER, BIGINT, etc.
(e.g., mssql).
@@ -3836,8 +3789,6 @@ class Constraint(DialectKWArgs, HasConditionalDDL, SchemaItem):
:param info: Optional data dictionary which will be populated into the
:attr:`.SchemaItem.info` attribute of this object.
- .. versionadded:: 1.0.0
-
:param comment: Optional string that will render an SQL comment on
foreign key constraint creation.
@@ -4232,8 +4183,6 @@ class CheckConstraint(ColumnCollectionConstraint):
:param info: Optional data dictionary which will be populated into the
:attr:`.SchemaItem.info` attribute of this object.
- .. versionadded:: 1.0.0
-
"""
self.sqltext = coercions.expect(roles.DDLExpressionRole, sqltext)
@@ -4369,11 +4318,6 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
methods will perform this resolution
automatically, so the flag is normally not needed.
- .. versionchanged:: 1.0.0 Automatic resolution of foreign key
- cycles has been added, removing the need to use the
- :paramref:`_schema.ForeignKeyConstraint.use_alter` in typical use
- cases.
-
.. seealso::
:ref:`use_alter`
@@ -4385,8 +4329,6 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
:param info: Optional data dictionary which will be populated into the
:attr:`.SchemaItem.info` attribute of this object.
- .. versionadded:: 1.0.0
-
:param comment: Optional string that will render an SQL comment on
foreign key constraint creation.
@@ -4397,8 +4339,6 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
the documentation regarding an individual dialect at
:ref:`dialect_toplevel` for detail on documented arguments.
- .. versionadded:: 0.9.2
-
"""
Constraint.__init__(
@@ -4502,8 +4442,6 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
if the constraint and/or parent table is not yet associated with
a metadata collection that contains the referred table.
- .. versionadded:: 1.0.0
-
"""
return self.elements[0].column.table
@@ -4527,8 +4465,6 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
or if the constraint has been initialized with :class:`_schema.Column`
objects, is the string ``.key`` of each element.
- .. versionadded:: 1.0.0
-
"""
if hasattr(self, "parent"):
return self._columns.keys()
@@ -4647,13 +4583,6 @@ class PrimaryKeyConstraint(ColumnCollectionConstraint):
marked as ``primary_key=True`` are ignored. This behavior is intended to
be backwards compatible with previous behavior.
- .. versionchanged:: 0.9.2 Using a mixture of columns within a
- :class:`.PrimaryKeyConstraint` in addition to columns marked as
- ``primary_key=True`` now emits a warning if the lists don't match.
- The ultimate behavior of ignoring those columns marked with the flag
- only is currently maintained for backwards compatibility; this warning
- may raise an exception in a future release.
-
For the use case where specific options are to be specified on the
:class:`.PrimaryKeyConstraint`, but the usual style of using
``primary_key=True`` flags is still desirable, an empty
@@ -4669,13 +4598,6 @@ class PrimaryKeyConstraint(ColumnCollectionConstraint):
mssql_clustered=True)
)
- .. versionadded:: 0.9.2 an empty :class:`.PrimaryKeyConstraint` may now
- be specified for the purposes of establishing keyword arguments with
- the constraint, independently of the specification of "primary key"
- columns within the :class:`_schema.Table` itself; columns marked as
- ``primary_key=True`` will be gathered into the empty constraint's
- column collection.
-
"""
__visit_name__ = "primary_key_constraint"
@@ -4916,12 +4838,6 @@ class Index(
Index("some_index", text("lower(name)"))
)
- .. versionadded:: 0.9.5 the :func:`_expression.text`
- construct may be used to
- specify :class:`.Index` expressions, provided the :class:`.Index`
- is explicitly associated with the :class:`_schema.Table`.
-
-
.. seealso::
:ref:`schema_indexes` - General information on :class:`.Index`.
@@ -4976,8 +4892,6 @@ class Index(
:param info=None: Optional data dictionary which will be populated
into the :attr:`.SchemaItem.info` attribute of this object.
- .. versionadded:: 1.0.0
-
:param \**dialect_kw: Additional keyword arguments not mentioned above
are dialect specific, and passed in the form
``<dialectname>_<argname>``. See the documentation regarding an
@@ -5138,8 +5052,6 @@ class MetaData(HasSchemaAttr):
:param info: Optional data dictionary which will be populated into the
:attr:`.SchemaItem.info` attribute of this object.
- .. versionadded:: 1.0.0
-
:param naming_convention: a dictionary referring to values which
will establish default naming conventions for :class:`.Constraint`
and :class:`.Index` objects, for those objects which are not given
@@ -5429,14 +5341,10 @@ class MetaData(HasSchemaAttr):
:param extend_existing: Passed along to each :class:`_schema.Table` as
:paramref:`_schema.Table.extend_existing`.
- .. versionadded:: 0.9.1
-
:param autoload_replace: Passed along to each :class:`_schema.Table`
as
:paramref:`_schema.Table.autoload_replace`.
- .. versionadded:: 0.9.1
-
:param resolve_fks: if True, reflect :class:`_schema.Table`
objects linked
to :class:`_schema.ForeignKey` objects located in each
@@ -5468,11 +5376,6 @@ class MetaData(HasSchemaAttr):
individual dialect at :ref:`dialect_toplevel` for detail on
documented arguments.
- .. versionadded:: 0.9.2 - Added
- :paramref:`.MetaData.reflect.**dialect_kwargs` to support
- dialect-level reflection options for all :class:`_schema.Table`
- objects reflected.
-
"""
with inspection.inspect(bind)._inspection_context() as insp:
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index 56cca6f73..5f530ba7d 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -302,8 +302,6 @@ class Selectable(ReturnsRows):
The return value is the :class:`_expression.Lateral` construct also
provided by the top-level :func:`_expression.lateral` function.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`tutorial_lateral_correlation` - overview of usage.
@@ -491,8 +489,6 @@ class HasHints:
directives such as isolation levels, file directives, fetch directives,
etc.
- .. versionadded:: 1.0.0
-
.. seealso::
:meth:`_expression.Select.with_hint`
@@ -671,8 +667,6 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable):
:param full: if True, render a FULL OUTER JOIN, instead of LEFT OUTER
JOIN. Implies :paramref:`.FromClause.join.isouter`.
- .. versionadded:: 1.1
-
.. seealso::
:func:`_expression.join` - standalone function
@@ -722,8 +716,6 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable):
:param full: if True, render a FULL OUTER JOIN, instead of
LEFT OUTER JOIN.
- .. versionadded:: 1.1
-
.. seealso::
:meth:`_expression.FromClause.join`
@@ -769,8 +761,6 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable):
construct also
provided by the top-level :func:`_expression.tablesample` function.
- .. versionadded:: 1.1
-
.. seealso::
:func:`_expression.tablesample` - usage guidelines and parameters
@@ -1922,8 +1912,6 @@ class Lateral(FromClauseAlias, LateralFromClause):
While LATERAL is part of the SQL standard, currently only more recent
PostgreSQL versions provide support for this keyword.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`tutorial_lateral_correlation` - overview of usage.
@@ -1954,8 +1942,6 @@ class TableSample(FromClauseAlias):
method
available on all :class:`_expression.FromClause` subclasses.
- .. versionadded:: 1.1
-
.. seealso::
:func:`_expression.tablesample`
@@ -2399,11 +2385,7 @@ class SelectsRows(ReturnsRows):
class HasCTE(roles.HasCTERole, SelectsRows):
- """Mixin that declares a class to include CTE support.
-
- .. versionadded:: 1.1
-
- """
+ """Mixin that declares a class to include CTE support."""
_has_ctes_traverse_internals: _TraverseInternalsType = [
("_independent_ctes", InternalTraversal.dp_clauseelement_list),
@@ -2539,9 +2521,6 @@ class HasCTE(roles.HasCTERole, SelectsRows):
when combined with RETURNING, as well as a consumer of
CTE rows.
- .. versionchanged:: 1.1 Added support for UPDATE/INSERT/DELETE as
- CTE, CTEs added to UPDATE/INSERT/DELETE.
-
SQLAlchemy detects :class:`_expression.CTE` objects, which are treated
similarly to :class:`_expression.Alias` objects, as special elements
to be delivered to the FROM clause of the statement as well
@@ -3573,8 +3552,6 @@ class SelectBase(
The return value is the :class:`_expression.Lateral` construct also
provided by the top-level :func:`_expression.lateral` function.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`tutorial_lateral_correlation` - overview of usage.
@@ -4010,9 +3987,6 @@ class GenerativeSelect(SelectBase, Generative):
The :meth:`_sql.GenerativeSelect.limit` method will replace
any clause applied with :meth:`_sql.GenerativeSelect.fetch`.
- .. versionchanged:: 1.0.0 - :meth:`_expression.Select.limit` can now
- accept arbitrary SQL expressions as well as integer values.
-
:param limit: an integer LIMIT parameter, or a SQL expression
that provides an integer result. Pass ``None`` to reset it.
@@ -4095,10 +4069,6 @@ class GenerativeSelect(SelectBase, Generative):
support ``OFFSET`` will attempt to provide similar
functionality.
-
- .. versionchanged:: 1.0.0 - :meth:`_expression.Select.offset` can now
- accept arbitrary SQL expressions as well as integer values.
-
:param offset: an integer OFFSET parameter, or a SQL expression
that provides an integer result. Pass ``None`` to reset it.
diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py
index 553b07442..4e7514e38 100644
--- a/lib/sqlalchemy/sql/sqltypes.py
+++ b/lib/sqlalchemy/sql/sqltypes.py
@@ -146,10 +146,6 @@ class Indexable(TypeEngineMixin):
"""A mixin that marks a type as supporting indexing operations,
such as array or JSON structures.
-
- .. versionadded:: 1.1.0
-
-
"""
class Comparator(TypeEngine.Comparator[_T]):
@@ -692,8 +688,6 @@ class Float(Numeric[_N]):
MySQL float types, which do include "scale", will use "scale"
as the default for decimal_return_scale, if not otherwise specified.
- .. versionadded:: 0.9.0
-
""" # noqa: E501
self.precision = precision
self.asdecimal = asdecimal
@@ -1238,10 +1232,6 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]):
impacts usage of LIKE expressions with enumerated values (an unusual
use case).
- .. versionchanged:: 1.1 the :class:`.Enum` type now provides in-Python
- validation of input values as well as on data being returned by
- the database.
-
The source of enumerated values may be a list of string values, or
alternatively a PEP-435-compliant enumerated class. For the purposes
of the :class:`.Enum` datatype, this class need only provide a
@@ -1279,10 +1269,6 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]):
values to be persisted. For a simple enumeration that uses string values,
a callable such as ``lambda x: [e.value for e in x]`` is sufficient.
- .. versionadded:: 1.1 - support for PEP-435-style enumerated
- classes.
-
-
.. seealso::
:ref:`orm_declarative_mapped_column_enums` - background on using
@@ -1308,9 +1294,6 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]):
:param \*enums: either exactly one PEP-435 compliant enumerated type
or one or more string labels.
- .. versionadded:: 1.1 a PEP-435 style enumerated class may be
- passed.
-
:param create_constraint: defaults to False. When creating a
non-native enumerated type, also build a CHECK constraint on the
database against the valid values.
@@ -1406,8 +1389,6 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]):
for validity against the list of enumerated values. Unrecognized
values will result in a ``LookupError`` being raised.
- .. versionadded:: 1.1.0b2
-
:param values_callable: A callable which will be passed the PEP-435
compliant enumerated type, which should then return a list of string
values to be persisted. This allows for alternate usages such as
@@ -2367,9 +2348,6 @@ class JSON(Indexable, TypeEngine[Any]):
:class:`sqlalchemy.dialects.sqlite.JSON`
- .. versionadded:: 1.1
-
-
"""
__visit_name__ = "JSON"
@@ -2856,8 +2834,6 @@ class ARRAY(
Alternatively, assigning a new array value to an ORM element that
replaces the old one will always trigger a change event.
- .. versionadded:: 1.1.0
-
.. seealso::
:class:`sqlalchemy.dialects.postgresql.ARRAY`
@@ -3534,8 +3510,6 @@ class MatchType(Boolean):
The type allows dialects to inject result-processing functionality
if needed, and on MySQL will return floating-point values.
- .. versionadded:: 1.0.0
-
"""
diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py
index 7167430f1..ddbdb49a0 100644
--- a/lib/sqlalchemy/sql/type_api.py
+++ b/lib/sqlalchemy/sql/type_api.py
@@ -292,9 +292,6 @@ class TypeEngine(Visitable, Generic[_T]):
:meth:`.TypeEngine.evaluates_none`
- .. versionadded:: 1.1
-
-
"""
_variant_mapping: util.immutabledict[
@@ -337,8 +334,6 @@ class TypeEngine(Visitable, Generic[_T]):
``None``
still means "no default".
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_forcing_null` - in the ORM documentation
@@ -380,8 +375,6 @@ class TypeEngine(Visitable, Generic[_T]):
:param conn_type: the type object reflected from the backend.
- .. versionadded:: 1.0.3
-
"""
return None
@@ -1364,10 +1357,6 @@ class UserDefinedType(
introspection is used to check for this in order to support legacy
forms of this function.
- .. versionadded:: 1.0.0 the owning expression is passed to
- the ``get_col_spec()`` method via the keyword argument
- ``type_expression``, if it receives ``**kw`` in its signature.
-
The :attr:`.UserDefinedType.cache_ok` class-level flag indicates if this
custom :class:`.UserDefinedType` is safe to be used as part of a cache key.
This flag defaults to ``None`` which will initially generate a warning