1.4 Changelog
=============
+This document details individual issue-level changes made throughout
+1.4 releases. For a narrative overview of what's new in 1.4, see
+:ref:`migration_14_toplevel`.
+
+
.. changelog_imports::
.. include:: changelog_13.rst
.. change::
- :tags: usecase, sql
+ :tags: feature, sql
:tickets: 1390
Add support for regular expression on supported backends.
.. change::
- :tags: reflection, usecase
+ :tags: engine, feature
:tickets: 2056
Added new reflection method :meth:`.Inspector.get_sequence_names` which
.. change::
- :tags: bug, easy, inheritance, orm
+ :tags: bug, inheritance, orm
:tickets: 4212
- An :class:`.ArgumentError` is now raised if both the selectable and flat
- parameters are set to True in :func:`.orm.with_polymorphic`.
- The selectable name is already aliased and applying flat=True
- overrides the selectable name with an anonymous name that would've
- previously caused the code to break. Pull request courtesy Ramon Williams.
+ An :class:`.ArgumentError` is now raised if both the ``selectable`` and
+ ``flat`` parameters are set to True in :func:`.orm.with_polymorphic`. The
+ selectable name is already aliased and applying flat=True overrides the
+ selectable name with an anonymous name that would've previously caused the
+ code to break. Pull request courtesy Ramon Williams.
.. change::
- :tags: sql, mssql
+ :tags: mssql, feature
:tickets: 4235, 4633
Added support for "CREATE SEQUENCE" and full :class:`.Sequence` support for
.. change::
- :tags: bug, types
+ :tags: bug, schema
:tickets: 4262
Cleaned up the internal ``str()`` for datatypes so that all types produce a
.. change::
- :tags: feature, pool
+ :tags: performance, engine
:tickets: 4524
The pool "pre-ping" feature has been refined to not invoke for a DBAPI
.. change::
- :tags: change, sql
+ :tags: renamed, sql
:tickets: 4617
The :meth:`_expression.SelectBase.as_scalar` and :meth:`_query.Query.as_scalar` methods have
.. change::
- :tags: change, sql
+ :tags: removed, sql
:tickets: 4632
The "threadlocal" execution strategy, deprecated in 1.3, has been
.. change::
- :tags: change, engine
+ :tags: deprecated, engine
:tickets: 4634
The :paramref:`_schema.MetaData.bind` argument as well as the overall
.. change::
- :tags: change, ext
+ :tags: change, extensions
:tickets: 5142
Added new parameter :paramref:`_automap.AutomapBase.prepare.autoload_with`
.. change::
- :tags: change, general
+ :tags: orm, removed
:tickets: 4638
All long-deprecated "extension" classes have been removed, including
.. change::
- :tags: feature, performance
+ :tags: performance, sql
:tickets: 4639
An all-encompassing reorganization and refactoring of Core and ORM
.. change::
- :tags: orm
+ :tags: orm, removed
:tickets: 4642
Remove the deprecated loader options ``joinedload_all``, ``subqueryload_all``,
.. change::
- :tags: change, engine
+ :tags: engine, removed
:tickets: 4643
- Remove deprecated method ``get_primary_keys` in the :class:`.Dialect` and
+ Remove deprecated method ``get_primary_keys`` in the :class:`.Dialect` and
:class:`_reflection.Inspector` classes. Please refer to the
:meth:`.Dialect.get_pk_constraint` and :meth:`_reflection.Inspector.get_primary_keys`
methods.
Remove deprecated event ``dbapi_error`` and the method
- ``ConnectionEvents.dbapi_error`. Please refer to the
+ ``ConnectionEvents.dbapi_error``. Please refer to the
:meth:`_events.ConnectionEvents.handle_error` event.
- This chance also removes the attributes ``ExecutionContext.is_disconnect``
- and ``ExecutionContext.exception``
+ This change also removes the attributes ``ExecutionContext.is_disconnect``
+ and ``ExecutionContext.exception``.
.. change::
- :tags: change, postgresql
+ :tags: removed, postgresql
:tickets: 4643
Remove support for deprecated engine URLs of the form ``postgres://``;
using ``postgresql://``.
.. change::
- :tags: change, mysql
+ :tags: removed, mysql
:tickets: 4643
Remove deprecated dialect ``mysql+gaerdbms`` that has been deprecated
enum or the set are quoted by SQLAlchemy when needed automatically.
.. change::
- :tags: change, orm
+ :tags: removed, orm
:tickets: 4643
Remove deprecated function ``comparable_property``. Please refer to the
Remove deprecated parameter ``mapper.order_by``. Use :meth:`_query.Query.order_by`
to determine the ordering of a result set.
- Remove deprecated parameter ``Session._enable_transaction_accounting`.
+ Remove deprecated parameter ``Session._enable_transaction_accounting``.
Remove deprecated parameter ``Session.is_modified.passive``.
.. change::
- :tags: change, types
+ :tags: removed, schema
:tickets: 4643
Remove deprecated class ``Binary``. Please use :class:`.LargeBinary`.
.. change::
- :tags: change, sql, core
+ :tags: removed, sql
:tickets: 4643
Remove deprecated methods ``Compiled.compile``, ``ClauseElement.__and__`` and
:attr:`.func` namespace.
.. change::
- :tags: change, sql
+ :tags: removed, sql
:tickets: 4643
Remove deprecated parameters ``text.bindparams`` and ``text.typemap``.
:tags: feature, engine, alchemy2
:tickets: 4644
- Implemented the SQLAlchemy 2 :func:`_future.create_engine` function which
- is used for forwards compatibility with SQLAlchemy 2. This engine
- features always-transactional behavior with autobegin.
+ Implemented the :paramref:`_sa.create_engine.future` parameter which
+ enables forwards compatibility with SQLAlchemy 2. is used for forwards
+ compatibility with SQLAlchemy 2. This engine features
+ always-transactional behavior with autobegin.
.. seealso::
.. change::
- :tags: change, orm
+ :tags: deprecated, orm
:tickets: 4705, 5202
Using strings to represent relationship names in ORM operations such as
.. change::
- :tags: bug, orm
+ :tags: deprecated, orm
:tickets: 4719
Calling the :meth:`_query.Query.instances` method without passing a
.. change::
- :tags: change,engine
+ :tags: feature, sql
:tickets: 4753
The :func:`_expression.select` construct and related constructs now allow for
.. change::
- :tags: changed, engine
+ :tags: deprecated, engine
:tickets: 4755
Deprecated remaining engine-level introspection and utility methods
introspection tasks are suited by the :class:`_reflection.Inspector` object.
.. change::
- :tags: changed, engine
+ :tags: removed, engine
:tickets: 4755
The internal dialect method ``Dialect.reflecttable`` has been removed. A
.. change::
- :tags: changed, engine
+ :tags: removed, engine
:tickets: 4755
The long-deprecated ``Inspector.get_table_names.order_by`` parameter has
.. change::
- :tags: change, tests
+ :tags: change, general
:tickets: 4789
"python setup.py test" is no longer a test runner, as this is deprecated by
:tags: bug, orm
:tickets: 4829
- Added new entity-targeting capabilities to the :class:`_query.Query` object to
+ Added new entity-targeting capabilities to the ORM query context
help with the case where the :class:`.Session` is using a bind dictionary
against mapped classes, rather than a single bind, and the :class:`_query.Query`
is against a Core statement that was ultimately generated from a method
- such as :meth:`_query.Query.subquery`; a deep search is performed to locate
- any ORM entity related to the query in order to locate a mapper if
- one is not otherwise present.
+ such as :meth:`_query.Query.subquery`. First implemented using a deep
+ search, the current approach leverages the unified :func:`_sql.select`
+ construct to keep track of the first mapper that is part of
+ the construct.
.. change::
- :tags: engine
+ :tags: deprecated, engine
:tickets: 4846
"Implicit autocommit", which is the COMMIT that occurs when a DML or DDL
.. change::
- :tags: bug, engine
+ :tags: deprecated, engine
:tickets: 4877
Deprecated the behavior by which a :class:`_schema.Column` can be used as the key
.. change::
- :tags: change, engine
+ :tags: deprecated, engine
:tickets: 4878
The :paramref:`.case_sensitive` flag on :func:`_sa.create_engine` is
.. change::
- :tags: usecase, ext
+ :tags: usecase, extensions
:tickets: 4887
Custom compiler constructs created using the :mod:`sqlalchemy.ext.compiled`
.. change::
- :tags: change, sql
+ :tags: deprecated, sql
:tickets: 5010
The :meth:`_sql.Join.alias` method is deprecated and will be removed in
.. change::
- :tags: usecase, orm
+ :tags: feature, orm
:tickets: 5027
Added support for direct mapping of Python classes that are defined using
.. change::
- :tags: change, platform
+ :tags: removed, platform
:tickets: 5094
Removed all dialect code related to support for Jython and zxJDBC. Jython
.. change::
- :tags: usecase, engine
+ :tags: deprecated, engine
:tickets: 5131
The :meth:`_engine.Connection.connect` method is deprecated as is the concept of
.. change::
- :tags: orm, bug
+ :tags: orm, deprecated
:tickets: 5134
Deprecated logic in :meth:`_query.Query.distinct` that automatically adds
--- /dev/null
+.. change::
+ :tags: feature, orm
+ :tickets: 5159
+
+ The ORM can now generate queries previously only available when using
+ :class:`_orm.Query` using the :func:`_sql.select` construct directly.
+ A new system by which ORM "plugins" may establish themselves within a
+ Core :class:`_sql.Select` allow the majority of query building logic
+ previously inside of :class:`_orm.Query` to now take place within
+ a compilation-level extension for :class:`_sql.Select`. Similar changes
+ have been made for the :class:`_sql.Update` and :class:`_sql.Delete`
+ constructs as well. The constructs when invoked using :meth:`_orm.Session.execute`
+ now do ORM-related work within the method. For :class:`_sql.Select`,
+ the :class:`_engine.Result` object returned now contains ORM-level
+ entities and results.
+
+ .. seealso::
+
+ :ref:`change_5159`
\ No newline at end of file
.. change::
- :tags: dialects, deprecations
+ :tags: firebird, deprecated
:tickets: 5189
- Deprecate unsupported dialects and dbapi
- - Deprecate dialects firefis and sybase.
- - Deprecate DBAPI
- - adodbapi and mxODBC for mssql
- - oursql for mysql
- - pygresql and py-postgresql for postgresql
+ The Firebird dialect is deprecated, as there is now a 3rd party
+ dialect that supports this database.
+
+.. change::
+ :tags: misc, deprecated
+ :tickets: 5189
+
+ The Sybase dialect is deprecated.
+
+
+.. change::
+ :tags: mssql, deprecated
+ :tickets: 5189
+
+ The adodbapi and mxODBC dialects are deprecated.
+
+
+.. change::
+ :tags: mysql, deprecated
+ :tickets: 5189
+
+ The OurSQL dialect is deprecated.
+
+.. change::
+ :tags: postgresql, deprecated
+ :tickets: 5189
+
+ The pygresql and py-postgresql dialects are deprecated.
.. change::
- :tags: orm
+ :tags: orm, deprecated
:tickets: 5192
The :func:`.eagerload` and :func:`.relation` were old aliases and are
.. change::
- :tags: change, reflection
+ :tags: renamed, engine
:tickets: 5244
The :meth:`_reflection.Inspector.reflecttable` was renamed to
.. change::
- :tags: bug, schema
+ :tags: change, schema
:tickets: 5367
The :paramref:`.Enum.create_constraint` and
.. change::
- :tags: feature, performance
+ :tags: feature, sql
:tickets: 5380
Along with the new transparent statement caching feature introduced as part
.. change::
- :tags: change, installation
+ :tags: change, platform
:tickets: 5400
The ``importlib_metadata`` library is used to scan for setuptools
.. change::
- :tags: installation
+ :tags: change, platform
:tickets: 5404
Installation has been modernized to use setup.cfg for most package
.. change::
- :tags: deprecations, schema
+ :tags: renamed, schema
:tickets: 5413
Renamed the :meth:`_schema.Table.tometadata` method to
+++ /dev/null
-.. change::
- :tags: change, sql
- :tickets: 5429
-
- Several operators are renamed to achieve more consistent naming across
- SQLAlchemy.
-
- The operator changes are:
-
- * `isnot` is now `is_not`
- * `not_in_` is now `not_in`
-
- Because these are core operators, the internal migration strategy for this
- change is to support legacy terms for an extended period of time -- if not
- indefinitely -- but update all documentation, tutorials, and internal usage
- to the new terms. The new terms are used to define the functions, and
- the legacy terms have been deprecated into aliases of the new terms.
.. change::
- :tags: change, sql
- :tickets: 5435
+ :tags: renamed, sql
+ :tickets: 5435, 5429
Several operators are renamed to achieve more consistent naming across
SQLAlchemy.
The operator changes are:
- * `isfalse` is now `is_false`
- * `isnot_distinct_from` is now `is_not_distinct_from`
- * `istrue` is now `is_true`
- * `notbetween` is now `not_between`
- * `notcontains` is now `not_contains`
- * `notendswith` is now `not_endswith`
- * `notilike` is now `not_ilike`
- * `notlike` is now `not_like`
- * `notmatch` is now `not_match`
- * `notstartswith` is now `not_startswith`
- * `nullsfirst` is now `nulls_first`
- * `nullslast` is now `nulls_last`
+ * ``isfalse`` is now ``is_false``
+ * ``isnot_distinct_from`` is now ``is_not_distinct_from``
+ * ``istrue`` is now ``is_true``
+ * ``notbetween`` is now ``not_between``
+ * ``notcontains`` is now ``not_contains``
+ * ``notendswith`` is now ``not_endswith``
+ * ``notilike`` is now ``not_ilike``
+ * ``notlike`` is now ``not_like``
+ * ``notmatch`` is now ``not_match``
+ * ``notstartswith`` is now ``not_startswith``
+ * ``nullsfirst`` is now ``nulls_first``
+ * ``nullslast`` is now ``nulls_last``
+ * ``isnot`` is now ``is_not``
+ * ``not_in_`` is now ``not_in``
Because these are core operators, the internal migration strategy for this
change is to support legacy terms for an extended period of time -- if not
indefinitely -- but update all documentation, tutorials, and internal usage
to the new terms. The new terms are used to define the functions, and
the legacy terms have been deprecated into aliases of the new terms.
+
+
.. change::
- :tags: engine, change
+ :tags: mysql, feature
:tickets: 5459
Added support for MariaDB Connector/Python to the mysql dialect. Original
.. change::
- :tags: engine, change
+ :tags: engine, bug
:tickets: 5497
Adjusted the dialect initialization process such that the
.. change::
- :tags: change, orm
+ :tags: feature, orm
:tickets: 5508
The ORM Declarative system is now unified into the ORM itself, with new
.. change::
- :tags: change, engine
+ :tags: deprecated, engine
:tickets: 5526
The :class:`_engine.URL` object is now an immutable named tuple. To modify
.. change::
- :tags: change, orm
+ :tags: deprecated, orm
:tickets: 5573
Passing keyword arguments to methods such as :meth:`_orm.Session.execute`
.. change::
- :tags: change, orm
+ :tags: deprecated, orm
:tickets: 5606
The "slice index" feature used by :class:`_orm.Query` as well as by the
.. change::
- :tags: change
+ :tags: removed, platform
:tickets: 5634
- Dropped support for python 3.5 that has reached EOL. SQLAlchemy 1.4 series
- requires python 2.7 or 3.6+.
+ Dropped support for python 3.4 and 3.5 that has reached EOL. SQLAlchemy 1.4
+ series requires python 2.7 or 3.6+.
.. seealso::
.. change::
- :tags: bug, engine, pyodbc
+ :tags: feature, engine, pyodbc
:tickets: 5649
Reworked the "setinputsizes()" set of dialect hooks to be correctly
.. change::
- :tags: change, engine
+ :tags: removed, sql
Removed the concept of a bound engine from the :class:`.Compiler` object,
- and removed the ``.execute()`` and ``.scalar()`` methods from :class:`.Compiler`.
- These were essentially forgotten methods from over a decade ago and had no
- practical use, and it's not appropriate for the :class:`.Compiler` object
- itself to be maintaining a reference to an :class:`_engine.Engine`.
+ and removed the ``.execute()`` and ``.scalar()`` methods from
+ :class:`.Compiler`. These were essentially forgotten methods from over a
+ decade ago and had no practical use, and it's not appropriate for the
+ :class:`.Compiler` object itself to be maintaining a reference to an
+ :class:`_engine.Engine`.
+++ /dev/null
-.. change::
- :tags: change
-
- Python 3.4 has reached EOL and its support has been dropped from
- SQLAlchemy.
version of the pg8000 driver for PostgreSQL. Changes to the dialect
include:
- * All data types are now sent as text rather than binary.
+ * All data types are now sent as text rather than binary.
- * Using adapters, custom types can be plugged in to pg8000.
+ * Using adapters, custom types can be plugged in to pg8000.
- * Previously, named prepared statements were used for all statements.
- Now unnamed prepared statements are used by default, and named
- prepared statements can be used explicitly by calling the
- Connection.prepare() method, which returns a PreparedStatement
- object.
+ * Previously, named prepared statements were used for all statements.
+ Now unnamed prepared statements are used by default, and named
+ prepared statements can be used explicitly by calling the
+ Connection.prepare() method, which returns a PreparedStatement
+ object.
Pull request courtesy Tony Locke.
.. change::
- :tags: change, sql
+ :tags: removed, sql
Removed the ``sqlalchemy.sql.visitors.iterate_depthfirst`` and
``sqlalchemy.sql.visitors.traverse_depthfirst`` functions. These functions
.. change::
- :tags: feature, core
+ :tags: feature, engine
:tickets: 5087, 4395, 4959
Implemented an all-new :class:`_result.Result` object that replaces the previous
.. change::
- :tags: change, engine
+ :tags: deprecated, engine
The ``server_side_cursors`` engine-wide parameter is deprecated and will be
removed in a future release. For unbuffered cursors, the
.. change::
- :tags: change, sql
+ :tags: renamed, sql
:class:`_schema.Table` parameter ``mustexist`` has been renamed
to :paramref:`_schema.Table.must_exist` and will now warn when used.
.. change::
- :tags: change, sql
- :tickets: 5526
+ :tags: deprecated, sql
The :class:`_schema.Table` class now raises a deprecation warning
when columns with the same name are defined. To replace a column a new
# section names used by the changelog extension.
changelog_sections = [
"general",
+ "platform",
"orm",
"orm declarative",
"orm querying",
"engine",
"sql",
"schema",
+ "extensions",
"postgresql",
"mysql",
"sqlite",
# tags to sort on inside of sections
changelog_inner_tag_sort = [
"feature",
- "changed",
"usecase",
- "removed",
+ "change",
+ "changed",
+ "performance",
"bug",
+ "deprecated",
+ "removed",
+ "renamed",
"moved",
]