From: Federico Caselli Date: Sun, 16 Mar 2025 20:51:00 +0000 (+0100) Subject: Removes old version added and change notes X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc1982f4a17efa473100b0e3d9de846a139cd84b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Removes old version added and change notes Removes documentation notes for changes and addition prior to 1.3 included. Change-Id: Ibabb5222ccafa0c27c8ec40e31b149707d9c8aa3 --- diff --git a/doc/build/core/constraints.rst b/doc/build/core/constraints.rst index c63ad858e2..7927b1fbe6 100644 --- a/doc/build/core/constraints.rst +++ b/doc/build/core/constraints.rst @@ -645,11 +645,6 @@ name as follows:: `The Importance of Naming Constraints `_ - in the Alembic documentation. - -.. versionadded:: 1.3.0 added multi-column naming tokens such as ``%(column_0_N_name)s``. - Generated names that go beyond the character limit for the target database will be - deterministically truncated. - .. _naming_check_constraints: Naming CHECK Constraints diff --git a/doc/build/core/defaults.rst b/doc/build/core/defaults.rst index 586f053143..70dfed9641 100644 --- a/doc/build/core/defaults.rst +++ b/doc/build/core/defaults.rst @@ -171,14 +171,6 @@ multi-valued INSERT construct, the subset of parameters that corresponds to the individual VALUES clause is isolated from the full parameter dictionary and returned alone. -.. versionadded:: 1.2 - - Added :meth:`.DefaultExecutionContext.get_current_parameters` method, - which improves upon the still-present - :attr:`.DefaultExecutionContext.current_parameters` attribute - by offering the service of organizing multiple VALUES clauses - into individual parameter dictionaries. - .. _defaults_client_invoked_sql: Client-Invoked SQL Expressions @@ -634,8 +626,6 @@ including the default schema, if any. Computed Columns (GENERATED ALWAYS AS) -------------------------------------- -.. versionadded:: 1.3.11 - The :class:`.Computed` construct allows a :class:`_schema.Column` to be declared in DDL as a "GENERATED ALWAYS AS" column, that is, one which has a value that is computed by the database server. The construct accepts a SQL expression diff --git a/doc/build/core/pooling.rst b/doc/build/core/pooling.rst index 1a4865ba2b..21ce165fe3 100644 --- a/doc/build/core/pooling.rst +++ b/doc/build/core/pooling.rst @@ -566,8 +566,6 @@ handled by the connection pool and replaced with a new connection. Note that the flag only applies to :class:`.QueuePool` use. -.. versionadded:: 1.3 - .. seealso:: :ref:`pool_disconnects` diff --git a/doc/build/dialects/oracle.rst b/doc/build/dialects/oracle.rst index b3d44858ce..757cc03ed2 100644 --- a/doc/build/dialects/oracle.rst +++ b/doc/build/dialects/oracle.rst @@ -33,9 +33,6 @@ originate from :mod:`sqlalchemy.types` or from the local dialect:: VARCHAR2, ) -.. versionadded:: 1.2.19 Added :class:`_types.NCHAR` to the list of datatypes - exported by the Oracle dialect. - Types which are specific to Oracle Database, or have Oracle-specific construction arguments, are as follows: diff --git a/doc/build/dialects/postgresql.rst b/doc/build/dialects/postgresql.rst index 2d377e3623..cbd357db7a 100644 --- a/doc/build/dialects/postgresql.rst +++ b/doc/build/dialects/postgresql.rst @@ -69,9 +69,6 @@ The combination of ENUM and ARRAY is not directly supported by backend DBAPIs at this time. Prior to SQLAlchemy 1.3.17, a special workaround was needed in order to allow this combination to work, described below. -.. versionchanged:: 1.3.17 The combination of ENUM and ARRAY is now directly - handled by SQLAlchemy's implementation without any workarounds needed. - .. sourcecode:: python from sqlalchemy import TypeDecorator @@ -120,10 +117,6 @@ Similar to using ENUM, prior to SQLAlchemy 1.3.17, for an ARRAY of JSON/JSONB we need to render the appropriate CAST. Current psycopg2 drivers accommodate the result set correctly without any special steps. -.. versionchanged:: 1.3.17 The combination of JSON/JSONB and ARRAY is now - directly handled by SQLAlchemy's implementation without any workarounds - needed. - .. sourcecode:: python class CastingArray(ARRAY): diff --git a/doc/build/errors.rst b/doc/build/errors.rst index e3ba5cce8f..e3f6cb9032 100644 --- a/doc/build/errors.rst +++ b/doc/build/errors.rst @@ -1142,11 +1142,6 @@ Overall, "delete-orphan" cascade is usually applied on the "one" side of a one-to-many relationship so that it deletes objects in the "many" side, and not the other way around. -.. versionchanged:: 1.3.18 The text of the "delete-orphan" error message - when used on a many-to-one or many-to-many relationship has been updated - to be more descriptive. - - .. seealso:: :ref:`unitofwork_cascades` diff --git a/doc/build/faq/connections.rst b/doc/build/faq/connections.rst index 1f3bf1ba14..0622b27944 100644 --- a/doc/build/faq/connections.rst +++ b/doc/build/faq/connections.rst @@ -342,7 +342,7 @@ reconnect operation: ping: 1 ... -.. versionadded: 1.4 the above recipe makes use of 1.4-specific behaviors and will +.. versionadded:: 1.4 the above recipe makes use of 1.4-specific behaviors and will not work as given on previous SQLAlchemy versions. The above recipe is tested for SQLAlchemy 1.4. diff --git a/doc/build/orm/extensions/associationproxy.rst b/doc/build/orm/extensions/associationproxy.rst index 36c8ef2277..d7c715c0b2 100644 --- a/doc/build/orm/extensions/associationproxy.rst +++ b/doc/build/orm/extensions/associationproxy.rst @@ -619,19 +619,11 @@ convenient for generating WHERE criteria quickly, SQL results should be inspected and "unrolled" into explicit JOIN criteria for best use, especially when chaining association proxies together. - -.. versionchanged:: 1.3 Association proxy features distinct querying modes - based on the type of target. See :ref:`change_4351`. - - - .. _cascade_scalar_deletes: Cascading Scalar Deletes ------------------------ -.. versionadded:: 1.3 - Given a mapping as:: from __future__ import annotations diff --git a/doc/build/orm/extensions/baked.rst b/doc/build/orm/extensions/baked.rst index b495f42a42..8e718ec98c 100644 --- a/doc/build/orm/extensions/baked.rst +++ b/doc/build/orm/extensions/baked.rst @@ -403,8 +403,6 @@ of the baked query:: # the "query" argument, pass that. my_q += lambda q: q.filter(my_subq.to_query(q).exists()) -.. versionadded:: 1.3 - .. _baked_with_before_compile: Using the before_compile event @@ -433,12 +431,6 @@ The above strategy is appropriate for an event that will modify a given :class:`_query.Query` in exactly the same way every time, not dependent on specific parameters or external state that changes. -.. versionadded:: 1.3.11 - added the "bake_ok" flag to the - :meth:`.QueryEvents.before_compile` event and disallowed caching via - the "baked" extension from occurring for event handlers that - return a new :class:`_query.Query` object if this flag is not set. - - Disabling Baked Queries Session-wide ------------------------------------ @@ -456,8 +448,6 @@ which is seeing issues potentially due to cache key conflicts from user-defined baked queries or other baked query issues can turn the behavior off, in order to identify or eliminate baked queries as the cause of an issue. -.. versionadded:: 1.2 - Lazy Loading Integration ------------------------ diff --git a/doc/build/orm/join_conditions.rst b/doc/build/orm/join_conditions.rst index 1a26d94a8b..ef0575d661 100644 --- a/doc/build/orm/join_conditions.rst +++ b/doc/build/orm/join_conditions.rst @@ -360,8 +360,6 @@ Above, the :meth:`.FunctionElement.as_comparison` indicates that the ``Point.geom`` expressions. The :func:`.foreign` annotation additionally notes which column takes on the "foreign key" role in this particular relationship. -.. versionadded:: 1.3 Added :meth:`.FunctionElement.as_comparison`. - .. _relationship_overlapping_foreignkeys: Overlapping Foreign Keys diff --git a/doc/build/orm/nonstandard_mappings.rst b/doc/build/orm/nonstandard_mappings.rst index d71343e99f..10142cfcfb 100644 --- a/doc/build/orm/nonstandard_mappings.rst +++ b/doc/build/orm/nonstandard_mappings.rst @@ -86,10 +86,6 @@ may be used:: stmt = select(AddressUser).group_by(*AddressUser.id.expressions) -.. versionadded:: 1.3.17 Added the - :attr:`.ColumnProperty.Comparator.expressions` accessor. - - .. note:: A mapping against multiple tables as illustrated above supports diff --git a/doc/build/orm/persistence_techniques.rst b/doc/build/orm/persistence_techniques.rst index a877fcd0e0..14a1ac9935 100644 --- a/doc/build/orm/persistence_techniques.rst +++ b/doc/build/orm/persistence_techniques.rst @@ -67,12 +67,6 @@ On PostgreSQL, the above :class:`.Session` will emit the following INSERT: ((SELECT coalesce(max(foo.foopk) + %(max_1)s, %(coalesce_2)s) AS coalesce_1 FROM foo), %(bar)s) RETURNING foo.foopk -.. versionadded:: 1.3 - SQL expressions can now be passed to a primary key column during an ORM - flush; if the database supports RETURNING, or if pysqlite is in use, the - ORM will be able to retrieve the server-generated value as the value - of the primary key attribute. - .. _session_sql_expressions: Using SQL Expressions with Sessions diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index a2b9d37dad..a7e1a16491 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -168,13 +168,6 @@ The CREATE TABLE for the above :class:`_schema.Table` object would be: addition to ``start`` and ``increment``. These are not supported by SQL Server and will be ignored when generating the CREATE TABLE ddl. -.. versionchanged:: 1.3.19 The :class:`_schema.Identity` object is - now used to affect the - ``IDENTITY`` generator for a :class:`_schema.Column` under SQL Server. - Previously, the :class:`.Sequence` object was used. As SQL Server now - supports real sequences as a separate construct, :class:`.Sequence` will be - functional in the normal way starting from SQLAlchemy version 1.4. - Using IDENTITY with Non-Integer numeric types ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -717,10 +710,6 @@ or embedded dots, use two sets of brackets:: schema="[MyDataBase.Period].[MyOwner.Dot]", ) -.. versionchanged:: 1.2 the SQL Server dialect now treats brackets as - identifier delimiters splitting the schema into separate database - and owner tokens, to allow dots within either name itself. - .. _legacy_schema_rendering: Legacy Schema Mode @@ -880,8 +869,6 @@ names:: would render the index as ``CREATE INDEX my_index ON table (x) WHERE x > 10``. -.. versionadded:: 1.3.4 - Index ordering ^^^^^^^^^^^^^^ @@ -1407,8 +1394,6 @@ class TIMESTAMP(sqltypes._Binary): TIMESTAMP type, which is not supported by SQL Server. It is a read-only datatype that does not support INSERT of values. - .. versionadded:: 1.2 - .. seealso:: :class:`_mssql.ROWVERSION` @@ -1426,8 +1411,6 @@ class TIMESTAMP(sqltypes._Binary): :param convert_int: if True, binary integer values will be converted to integers on read. - .. versionadded:: 1.2 - """ self.convert_int = convert_int @@ -1461,8 +1444,6 @@ class ROWVERSION(TIMESTAMP): This is a read-only datatype that does not support INSERT of values. - .. versionadded:: 1.2 - .. seealso:: :class:`_mssql.TIMESTAMP` @@ -1624,7 +1605,7 @@ class UNIQUEIDENTIFIER(sqltypes.Uuid[sqltypes._UUID_RETURN]): as Python uuid objects, converting to/from string via the DBAPI. - .. versionchanged: 2.0 Added direct "uuid" support to the + .. versionchanged:: 2.0 Added direct "uuid" support to the :class:`_mssql.UNIQUEIDENTIFIER` datatype; uuid interpretation defaults to ``True``. diff --git a/lib/sqlalchemy/dialects/mssql/pyodbc.py b/lib/sqlalchemy/dialects/mssql/pyodbc.py index cbf0adbfe0..17fc0bb283 100644 --- a/lib/sqlalchemy/dialects/mssql/pyodbc.py +++ b/lib/sqlalchemy/dialects/mssql/pyodbc.py @@ -325,8 +325,6 @@ Server dialect supports this parameter by passing the feature would cause ``fast_executemany`` to not be used in most cases even if specified. -.. versionadded:: 1.3 - .. seealso:: `fast executemany `_ diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index fd60d7ba65..a99b6952f2 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -672,9 +672,6 @@ this context is unambiguous: {printsql}INSERT INTO my_table (id, data) VALUES (%s, %s) ON DUPLICATE KEY UPDATE data = %s, updated_at = CURRENT_TIMESTAMP -.. versionchanged:: 1.3 support for parameter-ordered UPDATE clause within - MySQL ON DUPLICATE KEY UPDATE - .. warning:: The :meth:`_mysql.Insert.on_duplicate_key_update` @@ -709,10 +706,6 @@ table: When rendered, the "inserted" namespace will produce the expression ``VALUES()``. -.. versionadded:: 1.2 Added support for MySQL ON DUPLICATE KEY UPDATE clause - - - rowcount Support ---------------- @@ -817,9 +810,6 @@ is available using the keyword argument ``mysql_with_parser``:: mariadb_with_parser="ngram", ) -.. versionadded:: 1.3 - - .. _mysql_foreign_keys: MySQL / MariaDB Foreign Keys diff --git a/lib/sqlalchemy/dialects/mysql/dml.py b/lib/sqlalchemy/dialects/mysql/dml.py index 61476af022..43fb2e672f 100644 --- a/lib/sqlalchemy/dialects/mysql/dml.py +++ b/lib/sqlalchemy/dialects/mysql/dml.py @@ -110,8 +110,6 @@ class Insert(StandardInsert): The :class:`~.mysql.Insert` object is created using the :func:`sqlalchemy.dialects.mysql.insert` function. - .. versionadded:: 1.2 - """ stringify_dialect = "mysql" @@ -198,13 +196,6 @@ class Insert(StandardInsert): ] ) - .. versionchanged:: 1.3 parameters can be specified as a dictionary - or list of 2-tuples; the latter form provides for parameter - ordering. - - - .. versionadded:: 1.2 - .. seealso:: :ref:`mysql_insert_on_duplicate_key_update` diff --git a/lib/sqlalchemy/dialects/mysql/enumerated.py b/lib/sqlalchemy/dialects/mysql/enumerated.py index 6745cae55e..f0917f07fa 100644 --- a/lib/sqlalchemy/dialects/mysql/enumerated.py +++ b/lib/sqlalchemy/dialects/mysql/enumerated.py @@ -35,9 +35,6 @@ class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum, _StringType): quotes when generating the schema. This object may also be a PEP-435-compliant enumerated type. - .. versionadded: 1.1 added support for PEP-435-compliant enumerated - types. - :param strict: This flag has no effect. .. versionchanged:: The MySQL ENUM type as well as the base Enum diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py index 3d3ff9d517..69af577d56 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -146,17 +146,6 @@ Valid values for ``isolation_level`` include: warning is emitted for this initial first-connect condition as it is expected to be a common restriction on Oracle databases. -.. versionadded:: 1.3.16 added support for AUTOCOMMIT to the cx_Oracle dialect - as well as the notion of a default isolation level - -.. versionadded:: 1.3.21 Added support for SERIALIZABLE as well as live - reading of the isolation level. - -.. versionchanged:: 1.3.22 In the event that the default isolation - level cannot be read due to permissions on the v$transaction view as - is common in Oracle installations, the default isolation level is hardcoded - to "READ COMMITTED" which was the behavior prior to 1.3.21. - .. seealso:: :ref:`dbapi_autocommit` @@ -553,9 +542,6 @@ Raw information regarding these constraints can be acquired using :meth:`_reflection.Inspector.get_check_constraints`, and :meth:`_reflection.Inspector.get_indexes`. -.. versionchanged:: 1.2 The Oracle Database dialect can now reflect UNIQUE and - CHECK constraints. - When using reflection at the :class:`_schema.Table` level, the :class:`_schema.Table` will also include these constraints. diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index a0ebea4402..b5328f3427 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -117,12 +117,6 @@ symbol:: "oracle+cx_oracle://user:pass@dsn?encoding=UTF-8&nencoding=UTF-8&mode=SYSDBA&events=true" ) -.. versionchanged:: 1.3 the cx_Oracle dialect now accepts all argument names - within the URL string itself, to be passed to the cx_Oracle DBAPI. As - was the case earlier but not correctly documented, the - :paramref:`_sa.create_engine.connect_args` parameter also accepts all - cx_Oracle DBAPI connect arguments. - To pass arguments directly to ``.connect()`` without using the query string, use the :paramref:`_sa.create_engine.connect_args` dictionary. Any cx_Oracle parameter value and/or constant may be passed, such as:: @@ -323,12 +317,6 @@ set, the two options are to use the :class:`_types.NCHAR` and the SQLAlchemy dialect to use NCHAR/NCLOB for the :class:`.Unicode` / :class:`.UnicodeText` datatypes instead of VARCHAR/CLOB. -.. versionchanged:: 1.3 The :class:`.Unicode` and :class:`.UnicodeText` - datatypes now correspond to the ``VARCHAR2`` and ``CLOB`` Oracle Database - datatypes unless the ``use_nchar_for_unicode=True`` is passed to the dialect - when :func:`_sa.create_engine` is called. - - .. _cx_oracle_unicode_encoding_errors: Encoding Errors @@ -343,9 +331,6 @@ is passed both via cx_Oracle's ``encodingErrors`` parameter consumed by ``Cursor.var()``, as well as SQLAlchemy's own decoding function, as the cx_Oracle dialect makes use of both under different circumstances. -.. versionadded:: 1.3.11 - - .. _cx_oracle_setinputsizes: Fine grained control over cx_Oracle data binding performance with setinputsizes @@ -372,9 +357,6 @@ be used both for runtime visibility (e.g. logging) of the setinputsizes step as well as to fully control how ``setinputsizes()`` is used on a per-statement basis. -.. versionadded:: 1.2.9 Added :meth:`.DialectEvents.setinputsizes` - - Example 1 - logging all setinputsizes calls ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -484,10 +466,6 @@ The ``coerce_to_decimal`` flag only impacts the results of plain string SQL statements that are not otherwise associated with a :class:`.Numeric` SQLAlchemy type (or a subclass of such). -.. versionchanged:: 1.2 The numeric handling system for cx_Oracle has been - reworked to take advantage of newer cx_Oracle features as well - as better integration of outputtypehandlers. - """ # noqa from __future__ import annotations diff --git a/lib/sqlalchemy/dialects/oracle/oracledb.py b/lib/sqlalchemy/dialects/oracle/oracledb.py index 8105608837..d4fb99befa 100644 --- a/lib/sqlalchemy/dialects/oracle/oracledb.py +++ b/lib/sqlalchemy/dialects/oracle/oracledb.py @@ -416,12 +416,6 @@ set, the two options are to use the :class:`_types.NCHAR` and the SQLAlchemy dialect to use NCHAR/NCLOB for the :class:`.Unicode` / :class:`.UnicodeText` datatypes instead of VARCHAR/CLOB. -.. versionchanged:: 1.3 The :class:`.Unicode` and :class:`.UnicodeText` - datatypes now correspond to the ``VARCHAR2`` and ``CLOB`` Oracle Database - datatypes unless the ``use_nchar_for_unicode=True`` is passed to the dialect - when :func:`_sa.create_engine` is called. - - .. _oracledb_unicode_encoding_errors: Encoding Errors @@ -436,9 +430,6 @@ is passed both via python-oracledb's ``encodingErrors`` parameter consumed by ``Cursor.var()``, as well as SQLAlchemy's own decoding function, as the python-oracledb dialect makes use of both under different circumstances. -.. versionadded:: 1.3.11 - - .. _oracledb_setinputsizes: Fine grained control over python-oracledb data binding with setinputsizes @@ -465,9 +456,6 @@ be used both for runtime visibility (e.g. logging) of the setinputsizes step as well as to fully control how ``setinputsizes()`` is used on a per-statement basis. -.. versionadded:: 1.2.9 Added :meth:`.DialectEvents.setinputsizes` - - Example 1 - logging all setinputsizes calls ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -585,10 +573,6 @@ The ``coerce_to_decimal`` flag only impacts the results of plain string SQL statements that are not otherwise associated with a :class:`.Numeric` SQLAlchemy type (or a subclass of such). -.. versionchanged:: 1.2 The numeric handling system for the oracle dialects has - been reworked to take advantage of newer driver features as well as better - integration of outputtypehandlers. - .. versionadded:: 2.0.0 added support for the python-oracledb driver. """ # noqa diff --git a/lib/sqlalchemy/dialects/postgresql/array.py b/lib/sqlalchemy/dialects/postgresql/array.py index 7708769cb5..0f31b9f327 100644 --- a/lib/sqlalchemy/dialects/postgresql/array.py +++ b/lib/sqlalchemy/dialects/postgresql/array.py @@ -94,8 +94,6 @@ class array(expression.ExpressionClauseList[_T]): ARRAY[q, x] ] AS anon_1 - .. versionadded:: 1.3.6 added support for multidimensional array literals - .. seealso:: :class:`_postgresql.ARRAY` diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 1f00127bfa..6516ebd127 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1042,10 +1042,6 @@ Operator classes are also supported by the :paramref:`_postgresql.ExcludeConstraint.ops` parameter. See that parameter for details. -.. versionadded:: 1.3.21 added support for operator classes with - :class:`_postgresql.ExcludeConstraint`. - - Index Types ^^^^^^^^^^^ @@ -1186,8 +1182,6 @@ dialect in conjunction with the :class:`_schema.Table` construct: postgresql_partition_by="LIST (part_column)", ) - .. versionadded:: 1.2.6 - * ``TABLESPACE``:: diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py index 94466ae0a1..37dab86dd8 100644 --- a/lib/sqlalchemy/dialects/postgresql/ext.py +++ b/lib/sqlalchemy/dialects/postgresql/ext.py @@ -58,8 +58,6 @@ class aggregate_order_by(expression.ColumnElement): SELECT string_agg(a, ',' ORDER BY a) FROM table; - .. versionchanged:: 1.2.13 - the ORDER BY argument may be multiple terms - .. seealso:: :class:`_functions.array_agg` @@ -210,8 +208,6 @@ class ExcludeConstraint(ColumnCollectionConstraint): :ref:`postgresql_ops ` parameter specified to the :class:`_schema.Index` construct. - .. versionadded:: 1.3.21 - .. seealso:: :ref:`postgresql_operator_classes` - general description of how diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index eeb7604f79..b8d7205d2b 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -171,9 +171,6 @@ For example, to indicate two hosts using the ``primary`` strategy:: is repaired, previously ports were not correctly interpreted in this context. libpq comma-separated format is also now supported. -.. versionadded:: 1.3.20 Support for multiple hosts in PostgreSQL connection - string. - .. seealso:: `libpq connection strings `_ - please refer @@ -198,8 +195,6 @@ initial scheme:: In the above form, a blank "dsn" string is passed to the ``psycopg2.connect()`` function which in turn represents an empty DSN passed to libpq. -.. versionadded:: 1.3.2 support for parameter-less connections with psycopg2. - .. seealso:: `Environment Variables\ diff --git a/lib/sqlalchemy/dialects/postgresql/types.py b/lib/sqlalchemy/dialects/postgresql/types.py index 1aed2bf472..ff5e967ef6 100644 --- a/lib/sqlalchemy/dialects/postgresql/types.py +++ b/lib/sqlalchemy/dialects/postgresql/types.py @@ -130,8 +130,6 @@ class MONEY(sqltypes.TypeEngine[str]): def column_expression(self, column: Any): return cast(column, Numeric()) - .. versionadded:: 1.2 - """ # noqa: E501 __visit_name__ = "MONEY" @@ -164,11 +162,7 @@ class TSQUERY(sqltypes.TypeEngine[str]): class REGCLASS(sqltypes.TypeEngine[str]): - """Provide the PostgreSQL REGCLASS type. - - .. versionadded:: 1.2.7 - - """ + """Provide the PostgreSQL REGCLASS type.""" __visit_name__ = "REGCLASS" @@ -229,8 +223,6 @@ class INTERVAL(type_api.NativeForEmulated, sqltypes._AbstractInterval): to be limited, such as ``"YEAR"``, ``"MONTH"``, ``"DAY TO HOUR"``, etc. - .. versionadded:: 1.2 - """ self.precision = precision self.fields = fields diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 7b8e42a285..ffd7921eb7 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -205,10 +205,6 @@ available, which will alter the pysqlite connection using the ``.isolation_level attribute on the DBAPI connection and set it to None for the duration of the setting. -.. versionadded:: 1.3.16 added support for SQLite AUTOCOMMIT isolation level - when using the pysqlite / sqlite3 SQLite driver. - - The other axis along which SQLite's transactional locking is impacted is via the nature of the ``BEGIN`` statement used. The three varieties are "deferred", "immediate", and "exclusive", as described at @@ -379,9 +375,6 @@ indicated from a :class:`_schema.Column` object. `ON CONFLICT `_ - in the SQLite documentation -.. versionadded:: 1.3 - - The ``sqlite_on_conflict`` parameters accept a string argument which is just the resolution name to be chosen, which on SQLite can be one of ROLLBACK, ABORT, FAIL, IGNORE, and REPLACE. For example, to add a UNIQUE constraint diff --git a/lib/sqlalchemy/dialects/sqlite/json.py b/lib/sqlalchemy/dialects/sqlite/json.py index 02f4ea4c90..d0110abc77 100644 --- a/lib/sqlalchemy/dialects/sqlite/json.py +++ b/lib/sqlalchemy/dialects/sqlite/json.py @@ -33,9 +33,6 @@ class JSON(sqltypes.JSON): always JSON string values. - .. versionadded:: 1.3 - - .. _JSON1: https://www.sqlite.org/json1.html """ diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py index 73a74eb710..a2f8ce0ac2 100644 --- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py +++ b/lib/sqlalchemy/dialects/sqlite/pysqlite.py @@ -122,8 +122,6 @@ can be bypassed in :func:`_sa.create_engine` through the use of the parameter which allows for a custom callable that creates a Python sqlite3 driver level connection directly. -.. versionadded:: 1.3.9 - .. seealso:: `Uniform Resource Identifiers `_ - in diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index fbbbb2cff0..464d2d2ab3 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -537,8 +537,6 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): def get_execution_options(self) -> _ExecuteOptions: """Get the non-SQL options which will take effect during execution. - .. versionadded:: 1.3 - .. seealso:: :meth:`_engine.Connection.execution_options` @@ -3138,8 +3136,6 @@ class Engine( def get_execution_options(self) -> _ExecuteOptions: """Get the non-SQL options which will take effect during execution. - .. versionadded: 1.3 - .. seealso:: :meth:`_engine.Engine.execution_options` diff --git a/lib/sqlalchemy/engine/create.py b/lib/sqlalchemy/engine/create.py index 88690785d7..da312ab683 100644 --- a/lib/sqlalchemy/engine/create.py +++ b/lib/sqlalchemy/engine/create.py @@ -262,8 +262,6 @@ def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: will not be displayed in INFO logging nor will they be formatted into the string representation of :class:`.StatementError` objects. - .. versionadded:: 1.3.8 - .. seealso:: :ref:`dbengine_logging` - further detail on how to configure @@ -326,17 +324,10 @@ def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: to a Python object. By default, the Python ``json.loads`` function is used. - .. versionchanged:: 1.3.7 The SQLite dialect renamed this from - ``_json_deserializer``. - :param json_serializer: for dialects that support the :class:`_types.JSON` datatype, this is a Python callable that will render a given object as JSON. By default, the Python ``json.dumps`` function is used. - .. versionchanged:: 1.3.7 The SQLite dialect renamed this from - ``_json_serializer``. - - :param label_length=None: optional integer value which limits the size of dynamically generated column labels to that many characters. If less than 6, labels are generated as @@ -373,8 +364,6 @@ def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: SQLAlchemy's dialect has not been adjusted, the value may be passed here. - .. versionadded:: 1.3.9 - .. seealso:: :paramref:`_sa.create_engine.label_length` @@ -432,8 +421,6 @@ def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: "pre-ping" feature that tests connections for liveness upon each checkout. - .. versionadded:: 1.2 - .. seealso:: :ref:`pool_disconnects_pessimistic` @@ -483,8 +470,6 @@ def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: use. When planning for server-side timeouts, ensure that a recycle or pre-ping strategy is in use to gracefully handle stale connections. - .. versionadded:: 1.3 - .. seealso:: :ref:`pool_use_lifo` @@ -494,8 +479,6 @@ def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: :param plugins: string list of plugin names to load. See :class:`.CreateEnginePlugin` for background. - .. versionadded:: 1.2.3 - :param query_cache_size: size of the cache used to cache the SQL string form of queries. Set to zero to disable caching. diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index ba59ac297b..3ad4eb8779 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -571,8 +571,6 @@ class DefaultDialect(Dialect): If the dialect's class level max_identifier_length should be used, can return None. - .. versionadded:: 1.3.9 - """ return None @@ -587,8 +585,6 @@ class DefaultDialect(Dialect): By default, calls the :meth:`_engine.Interfaces.get_isolation_level` method, propagating any exceptions raised. - .. versionadded:: 1.3.22 - """ return self.get_isolation_level(dbapi_conn) @@ -2258,12 +2254,6 @@ class DefaultExecutionContext(ExecutionContext): raw parameters of the statement are returned including the naming convention used in the case of multi-valued INSERT. - .. versionadded:: 1.2 added - :meth:`.DefaultExecutionContext.get_current_parameters` - which provides more functionality over the existing - :attr:`.DefaultExecutionContext.current_parameters` - attribute. - .. seealso:: :attr:`.DefaultExecutionContext.current_parameters` diff --git a/lib/sqlalchemy/engine/events.py b/lib/sqlalchemy/engine/events.py index dbaac3789e..fab3cb3040 100644 --- a/lib/sqlalchemy/engine/events.py +++ b/lib/sqlalchemy/engine/events.py @@ -253,7 +253,7 @@ class ConnectionEvents(event.Events[ConnectionEventsTarget]): the connection, and those passed in to the method itself for the 2.0 style of execution. - .. versionadded: 1.4 + .. versionadded:: 1.4 .. seealso:: @@ -296,7 +296,7 @@ class ConnectionEvents(event.Events[ConnectionEventsTarget]): the connection, and those passed in to the method itself for the 2.0 style of execution. - .. versionadded: 1.4 + .. versionadded:: 1.4 :param result: :class:`_engine.CursorResult` generated by the execution. @@ -957,8 +957,6 @@ class DialectEvents(event.Events[Dialect]): :ref:`mssql_pyodbc_setinputsizes` - .. versionadded:: 1.2.9 - .. seealso:: :ref:`cx_oracle_setinputsizes` diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index 35c52ae3b9..6b37862ef2 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -386,8 +386,6 @@ class ReflectedColumn(TypedDict): computed: NotRequired[ReflectedComputed] """indicates that this column is computed by the database. Only some dialects return this key. - - .. versionadded:: 1.3.16 - added support for computed reflection. """ identity: NotRequired[ReflectedIdentity] @@ -430,8 +428,6 @@ class ReflectedCheckConstraint(ReflectedConstraint): dialect_options: NotRequired[Dict[str, Any]] """Additional dialect-specific options detected for this check constraint - - .. versionadded:: 1.3.8 """ @@ -540,8 +536,6 @@ class ReflectedIndex(TypedDict): """optional dict mapping column names or expressions to tuple of sort keywords, which may include ``asc``, ``desc``, ``nulls_first``, ``nulls_last``. - - .. versionadded:: 1.3.5 """ dialect_options: NotRequired[Dict[str, Any]] @@ -1750,8 +1744,6 @@ class Dialect(EventTarget): :raise: ``NotImplementedError`` for dialects that don't support comments. - .. versionadded:: 1.2 - """ raise NotImplementedError() @@ -2476,8 +2468,6 @@ class Dialect(EventTarget): The method defaults to using the :meth:`.Dialect.get_isolation_level` method unless overridden by a dialect. - .. versionadded:: 1.3.22 - """ raise NotImplementedError() @@ -2588,8 +2578,6 @@ class Dialect(EventTarget): except ImportError: pass - .. versionadded:: 1.3.14 - """ @classmethod @@ -2748,9 +2736,6 @@ class CreateEnginePlugin: "mysql+pymysql://scott:tiger@localhost/test", plugins=["myplugin"] ) - .. versionadded:: 1.2.3 plugin names can also be specified - to :func:`_sa.create_engine` as a list - A plugin may consume plugin-specific arguments from the :class:`_engine.URL` object as well as the ``kwargs`` dictionary, which is the dictionary of arguments passed to the :func:`_sa.create_engine` diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index e284cb4009..9b68358385 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -1316,8 +1316,6 @@ class Inspector(inspection.Inspectable["Inspector"]): :return: a dictionary, with the table comment. - .. versionadded:: 1.2 - .. seealso:: :meth:`Inspector.get_multi_table_comment` """ diff --git a/lib/sqlalchemy/event/attr.py b/lib/sqlalchemy/event/attr.py index 7e28a00cb9..0e11df7d46 100644 --- a/lib/sqlalchemy/event/attr.py +++ b/lib/sqlalchemy/event/attr.py @@ -459,8 +459,6 @@ class _CompoundListener(_InstanceLevelDispatch[_ET]): If exec_once was already called, then this method will never run the callable regardless of whether it raised or not. - .. versionadded:: 1.3.8 - """ if not self._exec_once: self._exec_once_impl(True, *args, **kw) diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index c66124d6c8..4ad1e0227f 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -277,8 +277,6 @@ class InvalidatePoolError(DisconnectionError): :class:`_exc.DisconnectionError`, allowing three attempts to reconnect before giving up. - .. versionadded:: 1.2 - """ invalidate_pool: bool = True @@ -412,11 +410,7 @@ class NoSuchTableError(InvalidRequestError): class UnreflectableTableError(InvalidRequestError): - """Table exists but can't be reflected for some reason. - - .. versionadded:: 1.2 - - """ + """Table exists but can't be reflected for some reason.""" class UnboundExecutionError(InvalidRequestError): diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py index c5d85860f2..f96018e51e 100644 --- a/lib/sqlalchemy/ext/associationproxy.py +++ b/lib/sqlalchemy/ext/associationproxy.py @@ -152,8 +152,6 @@ def association_proxy( source, as this object may have other state that is still to be kept. - .. versionadded:: 1.3 - .. seealso:: :ref:`cascade_scalar_deletes` - complete usage example @@ -477,11 +475,6 @@ class AssociationProxy( to look at the type of the actual destination object to get the complete path. - .. versionadded:: 1.3 - :class:`.AssociationProxy` no longer stores - any state specific to a particular parent class; the state is now - stored in per-class :class:`.AssociationProxyInstance` objects. - - """ return self._as_instance(class_, obj) @@ -589,8 +582,6 @@ class AssociationProxyInstance(SQLORMOperations[_T]): >>> proxy_state.scalar False - .. versionadded:: 1.3 - """ # noqa collection_class: Optional[Type[Any]] diff --git a/lib/sqlalchemy/ext/asyncio/engine.py b/lib/sqlalchemy/ext/asyncio/engine.py index f8c063a2f4..0595668eb3 100644 --- a/lib/sqlalchemy/ext/asyncio/engine.py +++ b/lib/sqlalchemy/ext/asyncio/engine.py @@ -1208,8 +1208,6 @@ class AsyncEngine(ProxyComparable[Engine], AsyncConnectable): Proxied for the :class:`_engine.Engine` class on behalf of the :class:`_asyncio.AsyncEngine` class. - .. versionadded: 1.3 - .. seealso:: :meth:`_engine.Engine.execution_options` diff --git a/lib/sqlalchemy/ext/automap.py b/lib/sqlalchemy/ext/automap.py index 169bebfbf3..fff08e922b 100644 --- a/lib/sqlalchemy/ext/automap.py +++ b/lib/sqlalchemy/ext/automap.py @@ -229,7 +229,7 @@ the same series of classes as what would be seen in :attr:`.AutomapBase.by_module` when explicit ``__module__`` conventions are present. -.. versionadded: 2.0 +.. versionadded:: 2.0 Added the :attr:`.AutomapBase.by_module` collection, which stores classes within a named hierarchy based on dot-separated module names, diff --git a/lib/sqlalchemy/ext/baked.py b/lib/sqlalchemy/ext/baked.py index cd3e087931..6c6ad0e8ad 100644 --- a/lib/sqlalchemy/ext/baked.py +++ b/lib/sqlalchemy/ext/baked.py @@ -39,9 +39,6 @@ class Bakery: :meth:`.BakedQuery.bakery`. It exists as an object so that the "cache" can be easily inspected. - .. versionadded:: 1.2 - - """ __slots__ = "cls", "cache" @@ -277,10 +274,6 @@ class BakedQuery: :class:`.Session` object, that is assumed to be within the context of an enclosing :class:`.BakedQuery` callable. - - .. versionadded:: 1.3 - - """ # noqa: E501 if isinstance(query_or_session, Session): @@ -360,10 +353,6 @@ class Result: :meth:`_query.Query.execution_options` methods should be used. - - .. versionadded:: 1.2 - - """ return self._using_post_criteria([fn]) diff --git a/lib/sqlalchemy/ext/declarative/extensions.py b/lib/sqlalchemy/ext/declarative/extensions.py index 3dc6bf698c..4f8b0aabc4 100644 --- a/lib/sqlalchemy/ext/declarative/extensions.py +++ b/lib/sqlalchemy/ext/declarative/extensions.py @@ -80,10 +80,6 @@ class ConcreteBase: class Employee(ConcreteBase, Base): _concrete_discriminator_name = "_concrete_discriminator" - .. versionadded:: 1.3.19 Added the ``_concrete_discriminator_name`` - attribute to :class:`_declarative.ConcreteBase` so that the - virtual discriminator column name can be customized. - .. versionchanged:: 1.4.2 The ``_concrete_discriminator_name`` attribute need only be placed on the basemost class to take correct effect for all subclasses. An explicit error message is now raised if the diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 6a22fb614d..cbf5e591c1 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -1187,8 +1187,6 @@ class hybrid_property(interfaces.InspectionAttrInfo, ORMDescriptor[_T]): def foobar(cls): return func.subfoobar(self._foobar) - .. versionadded:: 1.2 - .. seealso:: :ref:`hybrid_reuse_subclass` @@ -1272,11 +1270,7 @@ class hybrid_property(interfaces.InspectionAttrInfo, ORMDescriptor[_T]): return hybrid_property._InPlace(self) def getter(self, fget: _HybridGetterType[_T]) -> hybrid_property[_T]: - """Provide a modifying decorator that defines a getter method. - - .. versionadded:: 1.2 - - """ + """Provide a modifying decorator that defines a getter method.""" return self._copy(fget=fget) @@ -1391,8 +1385,6 @@ class hybrid_property(interfaces.InspectionAttrInfo, ORMDescriptor[_T]): fname, lname = value.split(" ", 1) return [(cls.first_name, fname), (cls.last_name, lname)] - .. versionadded:: 1.2 - """ return self._copy(update_expr=meth) diff --git a/lib/sqlalchemy/orm/_orm_constructors.py b/lib/sqlalchemy/orm/_orm_constructors.py index b2acc93b43..63ba5cd796 100644 --- a/lib/sqlalchemy/orm/_orm_constructors.py +++ b/lib/sqlalchemy/orm/_orm_constructors.py @@ -1795,8 +1795,6 @@ def relationship( default, changes in state will be back-populated only if neither sides of a relationship is viewonly. - .. versionadded:: 1.3.17 - .. versionchanged:: 1.4 - A relationship that specifies :paramref:`_orm.relationship.viewonly` automatically implies that :paramref:`_orm.relationship.sync_backref` is ``False``. @@ -1816,11 +1814,6 @@ def relationship( automatically detected; if it is not detected, then the optimization is not supported. - .. versionchanged:: 1.3.11 setting ``omit_join`` to True will now - emit a warning as this was not the intended use of this flag. - - .. versionadded:: 1.3 - :param init: Specific to :ref:`orm_declarative_native_dataclasses`, specifies if the mapped attribute should be part of the ``__init__()`` method as generated by the dataclass process. @@ -2209,8 +2202,6 @@ def query_expression( :param default_expr: Optional SQL expression object that will be used in all cases if not assigned later with :func:`_orm.with_expression`. - .. versionadded:: 1.2 - .. seealso:: :ref:`orm_queryguide_with_expression` - background and usage examples diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 85ef9746fd..651ea5cce2 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -2753,8 +2753,6 @@ def set_attribute( is being supplied; the object may be used to track the origin of the chain of events. - .. versionadded:: 1.2.3 - """ state, dict_ = instance_state(instance), instance_dict(instance) state.manager[key].impl.set(state, dict_, value, initiator) @@ -2823,8 +2821,6 @@ def flag_dirty(instance: object) -> None: may establish changes on it, which will then be included in the SQL emitted. - .. versionadded:: 1.2 - .. seealso:: :func:`.attributes.flag_modified` diff --git a/lib/sqlalchemy/orm/base.py b/lib/sqlalchemy/orm/base.py index ae0ba1029d..14a0eae6f7 100644 --- a/lib/sqlalchemy/orm/base.py +++ b/lib/sqlalchemy/orm/base.py @@ -620,11 +620,7 @@ class InspectionAttr: """ _is_internal_proxy = False - """True if this object is an internal proxy object. - - .. versionadded:: 1.2.12 - - """ + """True if this object is an internal proxy object.""" is_clause_element = False """True if this object is an instance of diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py index 63e7ff2046..e478c9ed65 100644 --- a/lib/sqlalchemy/orm/events.py +++ b/lib/sqlalchemy/orm/events.py @@ -245,9 +245,6 @@ class InstanceEvents(event.Events[ClassManager[Any]]): object is moved to a new loader context from within one of these events if this flag is not set. - .. versionadded:: 1.3.14 - - """ _target_class_doc = "SomeClass" @@ -462,15 +459,6 @@ class InstanceEvents(event.Events[ClassManager[Any]]): def on_load(instance, context): instance.some_unloaded_attribute - .. versionchanged:: 1.3.14 Added - :paramref:`.InstanceEvents.restore_load_context` - and :paramref:`.SessionEvents.restore_load_context` flags which - apply to "on load" events, which will ensure that the loading - context for an object is restored when the event hook is - complete; a warning is emitted if the load context of the object - changes without this flag being set. - - The :meth:`.InstanceEvents.load` event is also available in a class-method decorator format called :func:`_orm.reconstructor`. @@ -989,8 +977,6 @@ class MapperEvents(event.Events[mapperlib.Mapper[Any]]): meaningful return value when it is registered with the ``retval=True`` parameter. - .. versionadded:: 1.3 - e.g.:: from sqlalchemy.orm import EXT_SKIP @@ -1574,8 +1560,6 @@ class SessionEvents(event.Events[Session]): objects will be the instance's :class:`.InstanceState` management object, rather than the mapped instance itself. - .. versionadded:: 1.3.14 - :param restore_load_context=False: Applies to the :meth:`.SessionEvents.loaded_as_persistent` event. Restores the loader context of the object when the event hook is complete, so that ongoing @@ -1583,8 +1567,6 @@ class SessionEvents(event.Events[Session]): warning is emitted if the object is moved to a new loader context from within this event if this flag is not set. - .. versionadded:: 1.3.14 - """ _target_class_doc = "SomeSessionClassOrObject" @@ -2705,8 +2687,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]): else: return value - .. versionadded:: 1.2 - :param target: the object instance receiving the event. If the listener is registered with ``raw=True``, this will be the :class:`.InstanceState` object. @@ -2993,11 +2973,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]): The old collection received will contain its previous contents. - .. versionchanged:: 1.2 The collection passed to - :meth:`.AttributeEvents.dispose_collection` will now have its - contents before the dispose intact; previously, the collection - would be empty. - .. seealso:: :class:`.AttributeEvents` - background on listener options such @@ -3012,8 +2987,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]): function is used to trigger a modify event on an attribute without any specific value being set. - .. versionadded:: 1.2 - :param target: the object instance receiving the event. If the listener is registered with ``raw=True``, this will be the :class:`.InstanceState` object. @@ -3098,11 +3071,6 @@ class QueryEvents(event.Events[Query[Any]]): once, and not called for subsequent invocations of a particular query that is being cached. - .. versionadded:: 1.3.11 - added the "bake_ok" flag to the - :meth:`.QueryEvents.before_compile` event and disallowed caching via - the "baked" extension from occurring for event handlers that - return a new :class:`_query.Query` object if this flag is not set. - .. seealso:: :meth:`.QueryEvents.before_compile_update` @@ -3156,8 +3124,6 @@ class QueryEvents(event.Events[Query[Any]]): dictionary can be modified to alter the VALUES clause of the resulting UPDATE statement. - .. versionadded:: 1.2.17 - .. seealso:: :meth:`.QueryEvents.before_compile` @@ -3197,8 +3163,6 @@ class QueryEvents(event.Events[Query[Any]]): the same kind of object as described in :paramref:`.QueryEvents.after_bulk_delete.delete_context`. - .. versionadded:: 1.2.17 - .. seealso:: :meth:`.QueryEvents.before_compile` diff --git a/lib/sqlalchemy/orm/instrumentation.py b/lib/sqlalchemy/orm/instrumentation.py index 95f25b573b..c95d0a0673 100644 --- a/lib/sqlalchemy/orm/instrumentation.py +++ b/lib/sqlalchemy/orm/instrumentation.py @@ -21,13 +21,6 @@ or global basis using the :mod:`sqlalchemy.ext.instrumentation` module, which provides the means to build and specify alternate instrumentation forms. -.. versionchanged: 0.8 - The instrumentation extension system was moved out of the - ORM and into the external :mod:`sqlalchemy.ext.instrumentation` - package. When that package is imported, it installs - itself within sqlalchemy.orm so that its more comprehensive - resolution mechanics take effect. - """ diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 6fb46a2bd8..d771e5ebab 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -528,8 +528,6 @@ class Mapper( the columns specific to this subclass. The SELECT uses IN to fetch multiple subclasses at once. - .. versionadded:: 1.2 - .. seealso:: :ref:`with_polymorphic_mapper_config` @@ -3101,9 +3099,6 @@ class Mapper( The above process produces an ordering that is deterministic in terms of the order in which attributes were assigned to the class. - .. versionchanged:: 1.3.19 ensured deterministic ordering for - :meth:`_orm.Mapper.all_orm_descriptors`. - When dealing with a :class:`.QueryableAttribute`, the :attr:`.QueryableAttribute.property` attribute refers to the :class:`.MapperProperty` property, which is what you get when diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 2ffa53fb8e..f120f0d03a 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -379,8 +379,6 @@ class ColumnProperty( """The full sequence of columns referenced by this attribute, adjusted for any aliasing in progress. - .. versionadded:: 1.3.17 - .. seealso:: :ref:`maptojoin` - usage example @@ -451,8 +449,6 @@ class ColumnProperty( """The full sequence of columns referenced by this attribute, adjusted for any aliasing in progress. - .. versionadded:: 1.3.17 - """ if self.adapter: return [ diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 00607203c1..39b25378d2 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -873,8 +873,6 @@ class Query( in its result list, and False if this query returns a tuple of entities for each result. - .. versionadded:: 1.3.11 - .. seealso:: :meth:`_query.Query.only_return_tuples` @@ -1129,12 +1127,6 @@ class Query( my_object = query.get({"id": 5, "version_id": 10}) - .. versionadded:: 1.3 the :meth:`_query.Query.get` - method now optionally - accepts a dictionary of attribute names to values in order to - indicate a primary key identifier. - - :return: The object instance, or ``None``. """ # noqa: E501 @@ -1716,8 +1708,6 @@ class Query( def get_execution_options(self) -> _ImmutableExecuteOptions: """Get the non-SQL options which will take effect during execution. - .. versionadded:: 1.3 - .. seealso:: :meth:`_query.Query.execution_options` diff --git a/lib/sqlalchemy/orm/scoping.py b/lib/sqlalchemy/orm/scoping.py index 61cd0bd75d..a8cf03c517 100644 --- a/lib/sqlalchemy/orm/scoping.py +++ b/lib/sqlalchemy/orm/scoping.py @@ -694,7 +694,7 @@ class scoped_session(Generic[_S]): :meth:`.Session.delete` - main documentation on delete - .. versionadded: 2.1 + .. versionadded:: 2.1 """ # noqa: E501 @@ -1078,7 +1078,7 @@ class scoped_session(Generic[_S]): Contents of this dictionary are passed to the :meth:`.Session.get_bind` method. - .. versionadded: 2.0.0rc1 + .. versionadded:: 2.0.0rc1 :return: The object instance, or ``None``. @@ -1617,7 +1617,7 @@ class scoped_session(Generic[_S]): :meth:`.Session.merge` - main documentation on merge - .. versionadded: 2.1 + .. versionadded:: 2.1 """ # noqa: E501 diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index e5dd55d12f..b0634c4ee9 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -3560,7 +3560,7 @@ class Session(_SessionClassMethods, EventTarget): :meth:`.Session.delete` - main documentation on delete - .. versionadded: 2.1 + .. versionadded:: 2.1 """ @@ -3715,7 +3715,7 @@ class Session(_SessionClassMethods, EventTarget): Contents of this dictionary are passed to the :meth:`.Session.get_bind` method. - .. versionadded: 2.0.0rc1 + .. versionadded:: 2.0.0rc1 :return: The object instance, or ``None``. @@ -4004,7 +4004,7 @@ class Session(_SessionClassMethods, EventTarget): :meth:`.Session.merge` - main documentation on merge - .. versionadded: 2.1 + .. versionadded:: 2.1 """ @@ -5240,8 +5240,6 @@ def close_all_sessions() -> None: This function is not for general use but may be useful for test suites within the teardown scheme. - .. versionadded:: 1.3 - """ for sess in _sessions.values(): diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py index b5ba1615ca..0f879f3d1e 100644 --- a/lib/sqlalchemy/orm/state.py +++ b/lib/sqlalchemy/orm/state.py @@ -269,8 +269,6 @@ class InstanceState(interfaces.InspectionAttrInfo, Generic[_O]): :class:`.Session`, use the :attr:`.InstanceState.was_deleted` accessor. - .. versionadded: 1.1 - .. seealso:: :ref:`session_object_states` @@ -337,8 +335,6 @@ class InstanceState(interfaces.InspectionAttrInfo, Generic[_O]): """Track the last known value of a particular key after expiration operations. - .. versionadded:: 1.3 - """ lkv = self._last_known_values diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 5d21237198..04987b16fb 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -730,8 +730,6 @@ class _AbstractLoad(traversals.GenerativeOnTraversal, LoaderOption): with_expression(SomeClass.x_y_expr, SomeClass.x + SomeClass.y) ) - .. versionadded:: 1.2 - :param key: Attribute to be populated :param expr: SQL expression to be applied to the attribute. @@ -759,8 +757,6 @@ class _AbstractLoad(traversals.GenerativeOnTraversal, LoaderOption): key values, and is the per-query analogue to the ``"selectin"`` setting on the :paramref:`.mapper.polymorphic_load` parameter. - .. versionadded:: 1.2 - .. seealso:: :ref:`polymorphic_selectin` @@ -1206,8 +1202,6 @@ class Load(_AbstractLoad): :class:`_orm.Load` objects) which should be applied to the path specified by this :class:`_orm.Load` object. - .. versionadded:: 1.3.6 - .. seealso:: :func:`.defaultload` diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py index 81233f6554..4d4ce9b3e8 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -423,9 +423,6 @@ def identity_key( :param ident: primary key, may be a scalar or tuple argument. :param identity_token: optional identity token - .. versionadded:: 1.2 added identity_token - - * ``identity_key(instance=instance)`` This form will produce the identity key for a given instance. The @@ -462,8 +459,6 @@ def identity_key( (must be given as a keyword arg) :param identity_token: optional identity token - .. versionadded:: 1.2 added identity_token - """ # noqa: E501 if class_ is not None: mapper = class_mapper(class_) @@ -1998,8 +1993,6 @@ def with_parent( Entity in which to consider as the left side. This defaults to the "zero" entity of the :class:`_query.Query` itself. - .. versionadded:: 1.2 - """ # noqa: E501 prop_t: RelationshipProperty[Any] diff --git a/lib/sqlalchemy/pool/base.py b/lib/sqlalchemy/pool/base.py index 511eca9234..3faa3de864 100644 --- a/lib/sqlalchemy/pool/base.py +++ b/lib/sqlalchemy/pool/base.py @@ -271,8 +271,6 @@ class Pool(log.Identified, event.EventTarget): invalidated. Requires that a dialect is passed as well to interpret the disconnection error. - .. versionadded:: 1.2 - """ if logging_name: self.logging_name = self._orig_logging_name = logging_name diff --git a/lib/sqlalchemy/pool/impl.py b/lib/sqlalchemy/pool/impl.py index 44529fb169..1355ca8e1c 100644 --- a/lib/sqlalchemy/pool/impl.py +++ b/lib/sqlalchemy/pool/impl.py @@ -119,8 +119,6 @@ class QueuePool(Pool): timeouts, ensure that a recycle or pre-ping strategy is in use to gracefully handle stale connections. - .. versionadded:: 1.3 - .. seealso:: :ref:`pool_use_lifo` diff --git a/lib/sqlalchemy/sql/_elements_constructors.py b/lib/sqlalchemy/sql/_elements_constructors.py index b628fcc9b5..799c87c82b 100644 --- a/lib/sqlalchemy/sql/_elements_constructors.py +++ b/lib/sqlalchemy/sql/_elements_constructors.py @@ -358,9 +358,6 @@ def collate( The collation expression is also quoted if it is a case sensitive identifier, e.g. contains uppercase characters. - .. versionchanged:: 1.2 quoting is automatically applied to COLLATE - expressions if they are case sensitive. - """ return CollationClause._create_collation_expression(expression, collation) @@ -687,11 +684,6 @@ def bindparam( .. note:: The "expanding" feature does not support "executemany"- style parameter sets. - .. versionadded:: 1.2 - - .. versionchanged:: 1.3 the "expanding" bound parameter feature now - supports empty lists. - :param literal_execute: if True, the bound parameter will be rendered in the compile phase with a special "POSTCOMPILE" token, and the SQLAlchemy compiler will @@ -1723,8 +1715,6 @@ def tuple_( tuple_(table.c.col1, table.c.col2).in_([(1, 2), (5, 12), (10, 19)]) - .. versionchanged:: 1.3.6 Added support for SQLite IN tuples. - .. warning:: The composite IN construct is not supported by all backends, and is diff --git a/lib/sqlalchemy/sql/_selectable_constructors.py b/lib/sqlalchemy/sql/_selectable_constructors.py index 08149771b1..f90512b1f7 100644 --- a/lib/sqlalchemy/sql/_selectable_constructors.py +++ b/lib/sqlalchemy/sql/_selectable_constructors.py @@ -564,8 +564,6 @@ def table(name: str, *columns: ColumnClause[Any], **kw: Any) -> TableClause: :param schema: The schema name for this table. - .. versionadded:: 1.3.18 :func:`_expression.table` can now - accept a ``schema`` argument. """ return TableClause(name, *columns, **kw) diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index ee4037a2ff..11496aea60 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -1507,8 +1507,6 @@ class Executable(roles.StatementRole): def get_execution_options(self) -> _ExecuteOptions: """Get the non-SQL options which will take effect during execution. - .. versionadded:: 1.3 - .. seealso:: :meth:`.Executable.execution_options` diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 32043dd7bb..8eb7282e2d 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -1491,8 +1491,6 @@ class SQLCompiler(Compiled): a VALUES expression, the string is assigned here, where it can be used for insert batching schemes to rewrite the VALUES expression. - .. versionadded:: 1.3.8 - .. versionchanged:: 2.0 This collection is no longer used by SQLAlchemy's built-in dialects, in favor of the currently internal ``_insertmanyvalues`` collection that is used only by @@ -1553,19 +1551,6 @@ class SQLCompiler(Compiled): by a ``visit_`` method, as it is not guaranteed to be assigned nor guaranteed to correspond to the current statement being compiled. - .. versionadded:: 1.3.21 - - For compatibility with previous versions, use the following - recipe:: - - statement = getattr(self, "current_executable", False) - if statement is False: - statement = self.stack[-1]["selectable"] - - For versions 1.4 and above, ensure only .current_executable - is used; the format of "self.stack" may change. - - """ try: return self.stack[-1]["selectable"] @@ -7519,8 +7504,6 @@ class IdentifierPreparer: such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters should be present. - .. versionadded:: 1.3 - """ if element is not None and not reg.match(element): diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py index 4e1973ea02..6d3af4bdc0 100644 --- a/lib/sqlalchemy/sql/ddl.py +++ b/lib/sqlalchemy/sql/ddl.py @@ -1266,13 +1266,6 @@ def sort_tables( collection when cycles are detected so that they may be applied to a schema separately. - .. versionchanged:: 1.3.17 - a warning is emitted when - :func:`_schema.sort_tables` cannot perform a proper sort due to - cyclical dependencies. This will be an exception in a future - release. Additionally, the sort will continue to return - other tables not involved in the cycle in dependency order - which was not the case previously. - :param tables: a sequence of :class:`_schema.Table` objects. :param skip_fn: optional callable which will be passed a diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index 49a43b8eee..589f4f3504 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -463,7 +463,7 @@ class UpdateBase( upd = table.update().dialect_options(mysql_limit=10) - .. versionadded: 1.4 - this method supersedes the dialect options + .. versionadded:: 1.4 - this method supersedes the dialect options associated with the constructor. diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 3f28f83579..499a642703 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -2420,11 +2420,6 @@ class TextClause( select id from table where name=:name_1 UNION ALL select id from table where name=:name_2 - .. versionadded:: 1.3.11 Added support for the - :paramref:`.BindParameter.unique` flag to work with - :func:`_expression.text` - constructs. - """ # noqa: E501 self._bindparams = new_params = self._bindparams.copy() @@ -5301,10 +5296,6 @@ class quoted_name(util.MemoizedSlots, str): backend, passing the name exactly as ``"some_table"`` without converting to upper case. - .. versionchanged:: 1.2 The :class:`.quoted_name` construct is now - importable from ``sqlalchemy.sql``, in addition to the previous - location of ``sqlalchemy.sql.elements``. - """ __slots__ = "quote", "lower", "upper" diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index b905913d37..87a68cfd90 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -598,8 +598,6 @@ class FunctionElement(Executable, ColumnElement[_T], FromClause, Generative): :param right_index: the integer 1-based index of the function argument that serves as the "right" side of the expression. - .. versionadded:: 1.3 - .. seealso:: :ref:`relationship_custom_operator_sql_function` - @@ -1455,12 +1453,6 @@ class GenericFunction(Function[_T]): connection.scalar(select(func.as_utc())) - .. versionadded:: 1.3.13 The :class:`.quoted_name` construct is now - recognized for quoting when used with the "name" attribute of the - object, so that quoting can be forced on or off for the function - name. - - """ coerce_arguments = True @@ -1980,8 +1972,6 @@ class cube(GenericFunction[_T]): func.sum(table.c.value), table.c.col_1, table.c.col_2 ).group_by(func.cube(table.c.col_1, table.c.col_2)) - .. versionadded:: 1.2 - """ _has_args = True @@ -1998,8 +1988,6 @@ class rollup(GenericFunction[_T]): func.sum(table.c.value), table.c.col_1, table.c.col_2 ).group_by(func.rollup(table.c.col_1, table.c.col_2)) - .. versionadded:: 1.2 - """ _has_args = True @@ -2029,8 +2017,6 @@ class grouping_sets(GenericFunction[_T]): ) ) - .. versionadded:: 1.2 - """ # noqa: E501 _has_args = True @@ -2052,7 +2038,7 @@ class aggregate_strings(GenericFunction[str]): The return type of this function is :class:`.String`. - .. versionadded: 2.0.21 + .. versionadded:: 2.0.21 """ diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index addcf7a7f9..f93864478f 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -908,8 +908,6 @@ class ColumnOperators(Operators): WHERE COL IN (?, ?, ?) - .. versionadded:: 1.2 added "expanding" bound parameters - If an empty list is passed, a special "empty list" expression, which is specific to the database in use, is rendered. On SQLite this would be: @@ -918,9 +916,6 @@ class ColumnOperators(Operators): WHERE COL IN (SELECT 1 FROM (SELECT 1) WHERE 1!=1) - .. versionadded:: 1.3 "expanding" bound parameters now support - empty lists - * a :func:`_expression.select` construct, which is usually a correlated scalar select:: @@ -958,11 +953,6 @@ class ColumnOperators(Operators): ``notin_()`` in previous releases. The previous name remains available for backwards compatibility. - .. versionchanged:: 1.2 The :meth:`.ColumnOperators.in_` and - :meth:`.ColumnOperators.not_in` operators - now produce a "static" expression for an empty IN sequence - by default. - .. seealso:: :meth:`.ColumnOperators.in_` diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index a9c21eabc4..c9680becbc 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -684,8 +684,6 @@ class Table( :class:`_schema.Table` will resolve to that table normally. - .. versionadded:: 1.3 - .. seealso:: :paramref:`.MetaData.reflect.resolve_fks` @@ -799,10 +797,6 @@ class Table( :param comment: Optional string that will render an SQL comment on table creation. - .. versionadded:: 1.2 Added the :paramref:`_schema.Table.comment` - parameter - to :class:`_schema.Table`. - :param \**kw: Additional keyword arguments not mentioned above are dialect specific, and passed in the form ``_``. See the documentation regarding an individual dialect at @@ -1763,7 +1757,7 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]): :param insert_default: An alias of :paramref:`.Column.default` for compatibility with :func:`_orm.mapped_column`. - .. versionadded: 2.0.31 + .. versionadded:: 2.0.31 :param doc: optional String that can be used by the ORM or similar to document attributes on the Python side. This attribute does @@ -2030,10 +2024,6 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]): :param comment: Optional string that will render an SQL comment on table creation. - .. versionadded:: 1.2 Added the - :paramref:`_schema.Column.comment` - parameter to :class:`_schema.Column`. - :param insert_sentinel: Marks this :class:`_schema.Column` as an :term:`insert sentinel` used for optimizing the performance of the :term:`insertmanyvalues` feature for tables that don't @@ -3515,7 +3505,7 @@ class ColumnDefault(DefaultGenerator, ABC): class ScalarElementColumnDefault(ColumnDefault): """default generator for a fixed scalar Python value - .. versionadded: 2.0 + .. versionadded:: 2.0 """ @@ -3664,8 +3654,6 @@ class CallableColumnDefault(ColumnDefault): class IdentityOptions(DialectKWArgs): """Defines options for a named database sequence or an identity column. - .. versionadded:: 1.3.18 - .. seealso:: :class:`.Sequence` @@ -5585,11 +5573,6 @@ class MetaData(HasSchemaAttr): it along with a ``fn(constraint, table)`` callable to the naming_convention dictionary. - .. versionadded:: 1.3.0 - added new ``%(column_0N_name)s``, - ``%(column_0_N_name)s``, and related tokens that produce - concatenations of names, keys, or labels for all columns referred - to by a given constraint. - .. seealso:: :ref:`constraint_naming_conventions` - for detailed usage @@ -5721,13 +5704,6 @@ class MetaData(HasSchemaAttr): collection when cycles are detected so that they may be applied to a schema separately. - .. versionchanged:: 1.3.17 - a warning is emitted when - :attr:`.MetaData.sorted_tables` cannot perform a proper sort - due to cyclical dependencies. This will be an exception in a - future release. Additionally, the sort will continue to return - other tables not involved in the cycle in dependency order which - was not the case previously. - .. seealso:: :func:`_schema.sort_tables` @@ -5852,8 +5828,6 @@ class MetaData(HasSchemaAttr): operation is complete. Defaults to True. - .. versionadded:: 1.3.0 - .. seealso:: :paramref:`_schema.Table.resolve_fks` @@ -6034,8 +6008,6 @@ class Computed(FetchedValue, SchemaItem): See the linked documentation below for complete details. - .. versionadded:: 1.3.11 - .. seealso:: :ref:`computed_ddl` diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 40f9dbe004..29cbd00072 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -2660,9 +2660,6 @@ class HasCTE(roles.HasCTERole, SelectsRows): method may be used to establish these. - .. versionchanged:: 1.3.13 Added support for prefixes. - In particular - MATERIALIZED and NOT MATERIALIZED. - :param name: name given to the common table expression. Like :meth:`_expression.FromClause.alias`, the name can be left as ``None`` in which case an anonymous symbol will be used at query @@ -3672,7 +3669,7 @@ class SelectBase( :meth:`_expression.SelectBase.subquery` method. - .. versionchanged: 1.4 - the ``.as_scalar()`` method was renamed to + .. versionchanged:: 1.4 - the ``.as_scalar()`` method was renamed to :meth:`_expression.SelectBase.scalar_subquery`. .. seealso:: diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index d7de2b1a10..1b279085ae 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1441,8 +1441,6 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]): ``__member__`` attribute. For example ``lambda x: [i.value for i in x]``. - .. versionadded:: 1.2.3 - :param sort_key_function: a Python callable which may be used as the "key" argument in the Python ``sorted()`` built-in. The SQLAlchemy ORM requires that primary key columns which are mapped must @@ -1452,8 +1450,6 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]): default, the database value of the enumeration is used as the sorting function. - .. versionadded:: 1.3.8 - :param omit_aliases: A boolean that when true will remove aliases from pep 435 enums. defaults to ``True``. @@ -1951,10 +1947,6 @@ class Boolean(SchemaType, Emulated, TypeEngine[bool]): don't support a "native boolean" datatype, an option exists to also create a CHECK constraint on the target column - .. versionchanged:: 1.2 the :class:`.Boolean` datatype now asserts that - incoming Python values are already in pure boolean form. - - """ __visit_name__ = "boolean" @@ -2288,8 +2280,6 @@ class JSON(Indexable, TypeEngine[Any]): data_table.c.data["some key"].as_integer() - .. versionadded:: 1.3.11 - Additional operations may be available from the dialect-specific versions of :class:`_types.JSON`, such as :class:`sqlalchemy.dialects.postgresql.JSON` and @@ -2325,9 +2315,6 @@ class JSON(Indexable, TypeEngine[Any]): # boolean comparison data_table.c.data["some_boolean"].as_boolean() == True - .. versionadded:: 1.3.11 Added type-specific casters for the basic JSON - data element types. - .. note:: The data caster functions are new in version 1.3.11, and supersede @@ -2408,12 +2395,6 @@ class JSON(Indexable, TypeEngine[Any]): json_serializer=lambda obj: json.dumps(obj, ensure_ascii=False), ) - .. versionchanged:: 1.3.7 - - SQLite dialect's ``json_serializer`` and ``json_deserializer`` - parameters renamed from ``_json_serializer`` and - ``_json_deserializer``. - .. seealso:: :class:`sqlalchemy.dialects.postgresql.JSON` @@ -2637,8 +2618,6 @@ class JSON(Indexable, TypeEngine[Any]): mytable.c.json_column["some_data"].as_boolean() == True ) - .. versionadded:: 1.3.11 - """ # noqa: E501 return self._binary_w_type(Boolean(), "as_boolean") @@ -2654,8 +2633,6 @@ class JSON(Indexable, TypeEngine[Any]): mytable.c.json_column["some_data"].as_string() == "some string" ) - .. versionadded:: 1.3.11 - """ # noqa: E501 return self._binary_w_type(Unicode(), "as_string") @@ -2671,8 +2648,6 @@ class JSON(Indexable, TypeEngine[Any]): mytable.c.json_column["some_data"].as_integer() == 5 ) - .. versionadded:: 1.3.11 - """ # noqa: E501 return self._binary_w_type(Integer(), "as_integer") @@ -2688,8 +2663,6 @@ class JSON(Indexable, TypeEngine[Any]): mytable.c.json_column["some_data"].as_float() == 29.75 ) - .. versionadded:: 1.3.11 - """ # noqa: E501 return self._binary_w_type(Float(), "as_float") @@ -2728,8 +2701,6 @@ class JSON(Indexable, TypeEngine[Any]): Note that comparison of full JSON structures may not be supported by all backends. - .. versionadded:: 1.3.11 - """ return self.expr @@ -3680,7 +3651,7 @@ class Uuid(Emulated, TypeEngine[_UUID_RETURN]): as Python uuid objects, converting to/from string via the DBAPI. - .. versionchanged: 2.0 ``as_uuid`` now defaults to ``True``. + .. versionchanged:: 2.0 ``as_uuid`` now defaults to ``True``. :param native_uuid=True: if True, backends that support either the ``UUID`` datatype directly, or a UUID-storing value @@ -3830,7 +3801,7 @@ class UUID(Uuid[_UUID_RETURN], type_api.NativeForEmulated): as Python uuid objects, converting to/from string via the DBAPI. - .. versionchanged: 2.0 ``as_uuid`` now defaults to ``True``. + .. versionchanged:: 2.0 ``as_uuid`` now defaults to ``True``. """ self.as_uuid = as_uuid diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index bdc56b46ac..c98b8415dd 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -291,8 +291,6 @@ class TypeEngine(Visitable, Generic[_T]): The default value of ``None`` indicates that the values stored by this type are self-sorting. - .. versionadded:: 1.3.8 - """ should_evaluate_none: bool = False @@ -1407,8 +1405,6 @@ class Emulated(TypeEngineMixin): Current examples of :class:`.Emulated` are: :class:`.Interval`, :class:`.Enum`, :class:`.Boolean`. - .. versionadded:: 1.2.0b3 - """ native: bool @@ -1466,11 +1462,7 @@ def _is_native_for_emulated( class NativeForEmulated(TypeEngineMixin): - """Indicates DB-native types supported by an :class:`.Emulated` type. - - .. versionadded:: 1.2.0b3 - - """ + """Indicates DB-native types supported by an :class:`.Emulated` type.""" @classmethod def adapt_native_to_emulated(