:released: March 10, 2015
.. change::
:tags: feature, postgresql
:versions: 1.0.0b1
Added support for the ``CONCURRENTLY`` keyword with PostgreSQL
indexes, established using ``postgresql_concurrently``. Pull
request courtesy Iuri de Silvio.
.. seealso::
:ref:`postgresql_index_concurrently`
.. change::
:tags: bug, ext, py3k
:versions: 1.0.0b1
Fixed bug where the association proxy list class would not interpret
slices correctly under Py3K. Pull request courtesy
Gilles Dartiguelongue.
.. change::
:tags: feature, sqlite
:versions: 1.0.0b1
Added support for partial indexes (e.g. with a WHERE clause) on
SQLite. Pull request courtesy Kai Groner.
.. seealso::
:ref:`sqlite_partial_index`
.. change::
:tags: bug, orm
:tickets: 3310
:versions: 1.0.0b1
Fixed bugs in ORM object comparisons where comparison of
many-to-one ``!= None`` would fail if the source were an aliased
class, or if the query needed to apply special aliasing to the
expression due to aliased joins or polymorphic querying; also fixed
bug in the case where comparing a many-to-one to an object state
would fail if the query needed to apply special aliasing
due to aliased joins or polymorphic querying.
.. change::
:tags: bug, orm
:tickets: 3309
:versions: 1.0.0b1
Fixed bug where internal assertion would fail in the case where
an ``after_rollback()`` handler for a :class:`.Session` incorrectly
adds state to that :class:`.Session` within the handler, and the task
to warn and remove this state (established by :ticket:`2389`) attempts
to proceed.
.. change::
:tags: bug, orm
:versions: 1.0.0b1
Fixed bug where TypeError raised when :meth:`_query.Query.join` called
with unknown kw arguments would raise its own TypeError due
to broken formatting. Pull request courtesy Malthe Borch.
.. change::
:tags: bug, engine
:tickets: 3302
:versions: 1.0.0b1
Fixed bug in :class:`_engine.Connection` and pool where the
:meth:`_engine.Connection.invalidate` method, or an invalidation due
to a database disconnect, would fail if the
``isolation_level`` parameter had been used with
:meth:`_engine.Connection.execution_options`; the "finalizer" that resets
the isolation level would be called on the no longer opened connection.
.. change::
:tags: feature, orm
:tickets: 3296
:versions: 1.0.0b1
Added new parameter :paramref:`.Session.connection.execution_options`
which may be used to set up execution options on a :class:`_engine.Connection`
when it is first checked out, before the transaction has begun.
This is used to set up options such as isolation level on the
connection before the transaction starts.
.. seealso::
:ref:`session_transaction_isolation` - new documentation section
detailing best practices for setting transaction isolation with
sessions.
.. change::
:tags: bug, engine
:tickets: 3296
:versions: 1.0.0b1
A warning is emitted if the ``isolation_level`` parameter is used
with :meth:`_engine.Connection.execution_options` when a :class:`.Transaction`
is in play; DBAPIs and/or SQLAlchemy dialects such as psycopg2,
MySQLdb may implicitly rollback or commit the transaction, or
not change the setting til next transaction, so this is never safe.
.. change::
:tags: bug, orm
:tickets: 3300
:versions: 1.0.0b1
Fixed bug in lazy loading SQL construction whereby a complex
primaryjoin that referred to the same "local" column multiple
times in the "column that points to itself" style of self-referential
join would not be substituted in all cases. The logic to determine
substitutions here has been reworked to be more open-ended.
.. change::
:tags: bug, postgresql
:tickets: 2940
:versions: 1.0.0b1
Repaired support for PostgreSQL UUID types in conjunction with
the ARRAY type when using psycopg2. The psycopg2 dialect now
employs use of the psycopg2.extras.register_uuid() hook
so that UUID values are always passed to/from the DBAPI as
UUID() objects. The :paramref:`.UUID.as_uuid` flag is still
honored, except with psycopg2 we need to convert returned
UUID objects back into strings when this is disabled.
.. change::
:tags: bug, postgresql
:versions: 1.0.0b1
Added support for the :class:`postgresql.JSONB` datatype when
using psycopg2 2.5.4 or greater, which features native conversion
of JSONB data so that SQLAlchemy's converters must be disabled;
additionally, the newly added psycopg2 extension
``extras.register_default_jsonb`` is used to establish a JSON
deserializer passed to the dialect via the ``json_deserializer``
argument. Also repaired the PostgreSQL integration tests which
weren't actually round-tripping the JSONB type as opposed to the
JSON type. Pull request courtesy Mateusz Susik.
.. change::
:tags: bug, postgresql
:versions: 1.0.0b1
Repaired the use of the "array_oid" flag when registering the
HSTORE type with older psycopg2 versions < 2.4.3, which does not
support this flag, as well as use of the native json serializer
hook "register_default_json" with user-defined ``json_deserializer``
on psycopg2 versions < 2.5, which does not include native json.
.. change::
:tags: bug, schema
:tickets: 3298, 1765
Fixed bug in 0.9's foreign key setup system, such that
the logic used to link a :class:`_schema.ForeignKey` to its parent could fail
when the foreign key used "link_to_name=True" in conjunction with
a target :class:`_schema.Table` that would not receive its parent column until
later, such as within a reflection + "useexisting" scenario,
if the target column in fact had a key value different from its name,
as would occur in reflection if column reflect events were used to
alter the .key of reflected :class:`_schema.Column` objects so that the
link_to_name becomes significant. Also repaired support for column
type via FK transmission in a similar way when target columns had a
different key and were referenced using link_to_name.
.. change::
:tags: feature, engine
:versions: 1.0.0b1
Added new user-space accessors for viewing transaction isolation
levels; :meth:`_engine.Connection.get_isolation_level`,
:attr:`_engine.Connection.default_isolation_level`.
.. change::
:tags: bug, postgresql
:versions: 1.0.0b1
:tickets: 3174
Fixed bug where PostgreSQL dialect would fail to render an
expression in an :class:`.Index` that did not correspond directly
to a table-bound column; typically when a :func:`_expression.text` construct
was one of the expressions within the index; or could misinterpret the
list of expressions if one or more of them were such an expression.
.. change::
:tags: bug, orm
:versions: 1.0.0b1
:tickets: 3287
The "wildcard" loader options, in particular the one set up by
the :func:`_orm.load_only` option to cover all attributes not
explicitly mentioned, now takes into account the superclasses
of a given entity, if that entity is mapped with inheritance mapping,
so that attribute names within the superclasses are also omitted
from the load. Additionally, the polymorphic discriminator column
is unconditionally included in the list, just in the same way that
primary key columns are, so that even with load_only() set up,
polymorphic loading of subtypes continues to function correctly.
.. change::
:tags: bug, sql
:versions: 1.0.0b1
Added the ``native_enum`` flag to the ``__repr__()`` output
of :class:`.Enum`, which is mostly important when using it with
Alembic autogenerate. Pull request courtesy Dimitris Theodorou.
.. change::
:tags: bug, orm, pypy
:versions: 1.0.0b1
:tickets: 3285
Fixed bug where if an exception were thrown at the start of a
:class:`_query.Query` before it fetched results, particularly when
row processors can't be formed, the cursor would stay open with
results pending and not actually be closed. This is typically only
an issue on an interpreter like PyPy where the cursor isn't
immediately GC'ed, and can in some circumstances lead to transactions/
locks being open longer than is desirable.
.. change::
:tags: change, mysql
:versions: 1.0.0b1
:tickets: 3275
The ``gaerdbms`` dialect is no longer necessary, and emits a
deprecation warning. Google now recommends using the MySQLdb
dialect directly.
.. change::
:tags: bug, sql
:versions: 1.0.0b1
:tickets: 3278
Fixed bug where using a :class:`.TypeDecorator` that implemented
a type that was also a :class:`.TypeDecorator` would fail with
Python's "Cannot create a consistent method resolution order (MRO)"
error, when any kind of SQL comparison expression were used against
an object using this type.
.. change::
:tags: bug, mysql
:versions: 1.0.0b1
:tickets: 3274
Added a version check to the MySQLdb dialect surrounding the
check for 'utf8_bin' collation, as this fails on MySQL server < 5.0.
.. change::
:tags: feature, orm
:versions: 1.0.0b1
Added new method :meth:`.Session.invalidate`, functions similarly
to :meth:`.Session.close`, except also calls
:meth:`_engine.Connection.invalidate`
on all connections, guaranteeing that they will not be returned to
the connection pool. This is useful in situations e.g. dealing
with gevent timeouts when it is not safe to use the connection further,
even for rollbacks.
.. change::
:tags: bug, examples
:versions: 1.0.0b1
Updated the :ref:`examples_versioned_history` example such that
mapped columns are re-mapped to
match column names as well as grouping of columns; in particular,
this allows columns that are explicitly grouped in a same-column-named
joined inheritance scenario to be mapped in the same way in the
history mappings, avoiding warnings added in the 0.9 series
regarding this pattern and allowing the same view of attribute
keys.
.. change::
:tags: bug, examples
:versions: 1.0.0b1
Fixed a bug in the examples/generic_associations/discriminator_on_association.py
example, where the subclasses of AddressAssociation were not being
mapped as "single table inheritance", leading to problems when trying
to use the mappings further.
.. change::
:tags: bug, orm
:versions: 1.0.0b1
:tickets: 3251
Fixed a leak which would occur in the unsupported and highly
non-recommended use case of replacing a relationship on a fixed
mapped class many times, referring to an arbitrarily growing number of
target mappers. A warning is emitted when the old relationship is
replaced, however if the mapping were already used for querying, the
old relationship would still be referenced within some registries.
.. change::
:tags: bug, sql
:versions: 1.0.0b1
:tickets: 3248
Fixed issue where the columns from a SELECT embedded in an
INSERT, either through the values clause or as a "from select",
would pollute the column types used in the result set produced by
the RETURNING clause when columns from both statements shared the
same name, leading to potential errors or mis-adaptation when
retrieving the returning rows.
.. change::
:tags: bug, orm, sqlite
:versions: 1.0.0b1
:tickets: 3241
Fixed bug regarding expression mutations which could express
itself as a "Could not locate column" error when using
:class:`_query.Query` to select from multiple, anonymous column
entities when querying against SQLite, as a side effect of the
"join rewriting" feature used by the SQLite dialect.
.. change::
:tags: feature, sqlite
:versions: 1.0.0b1
Added a new SQLite backend for the SQLCipher backend. This backend
provides for encrypted SQLite databases using the pysqlcipher Python
driver, which is very similar to the pysqlite driver.
.. seealso::
:mod:`~sqlalchemy.dialects.sqlite.pysqlcipher`
.. change::
:tags: bug, orm
:tickets: 3232
:versions: 1.0.0b1
Fixed bug where the ON clause for :meth:`_query.Query.join`,
and :meth:`_query.Query.outerjoin` to a single-inheritance subclass
using ``of_type()`` would not render the "single table criteria" in
the ON clause if the ``from_joinpoint=True`` flag were set.
.. changelog::