Releases: sqlalchemy/sqlalchemy
1.2.0b1
1.2.0b1
Released: July 10, 2017
-
[feature] [oracle] [postgresql] Added new keywords
Sequence.cache
and
Sequence.order
toSequence
, to allow rendering
of the CACHE parameter understood by Oracle and PostgreSQL, and the
ORDER parameter understood by Oracle. Pull request
courtesy David Moore.This change is also backported to: 1.1.12
-
[bug] [sql] Fixed AttributeError which would occur in
WithinGroup
construct during an iteration of the structure.This change is also backported to: 1.1.11
References: #4012
-
[bug] [orm] Fixed issue with subquery eagerloading which continues on from
the series of issues fixed in #2699, #3106,
#3893 involving that the "subquery" contains the correct
FROM clause when beginning from a joined inheritance subclass
and then subquery eager loading onto a relationship from
the base class, while the query also includes criteria against
the subclass. The fix in the previous tickets did not accommodate
for additional subqueryload operations loading more deeply from
the first level, so the fix has been further generalized.This change is also backported to: 1.1.11
References: #4011
-
[bug] [postgresql] Continuing with the fix that correctly handles PostgreSQL
version string "10devel" released in 1.1.8, an additional regexp
bump to handle version strings of the form "10beta1". While
PostgreSQL now offers better ways to get this information, we
are sticking w/ the regexp at least through 1.1.x for the least
amount of risk to compatibility w/ older or alternate PostgreSQL
databases.This change is also backported to: 1.1.11
References: #4005
-
[bug] [postgresql] Fixed bug where using
ARRAY
with a string type that
features a collation would fail to produce the correct syntax
within CREATE TABLE.This change is also backported to: 1.1.11
References: #4006
-
[bug] [mysql] MySQL 5.7 has introduced permission limiting for the "SHOW VARIABLES"
command; the MySQL dialect will now handle when SHOW returns no
row, in particular for the initial fetch of SQL_MODE, and will
emit a warning that user permissions should be modified to allow the
row to be present.This change is also backported to: 1.1.11
References: #4007
-
[bug] [mssql] Fixed bug where SQL Server transaction isolation must be fetched
from a different view when using Azure data warehouse, the query
is now attempted against both views and then a NotImplemented
is raised unconditionally if failure continues to provide the
best resiliency against future arbitrary API changes in new
SQL Server versions.This change is also backported to: 1.1.11
References: #3994
-
[bug] [oracle] Support for two-phase transactions has been removed entirely for
cx_Oracle when version 6.0b1 or later of the DBAPI is in use. The two-
phase feature historically has never been usable under cx_Oracle 5.x in
any case, and cx_Oracle 6.x has removed the connection-level "twophase"
flag upon which this feature relied.This change is also backported to: 1.1.11
References: #3997
-
[bug] [mssql] Added a placeholder type
mssql.XML
to the SQL Server
dialect, so that a reflected table which includes this type can
be re-rendered as a CREATE TABLE. The type has no special round-trip
behavior nor does it currently support additional qualifying
arguments.This change is also backported to: 1.1.11
References: #3973
-
[bug] [orm] Fixed bug where a cascade such as "delete-orphan" (but others as well)
would fail to locate an object linked to a relationship that itself
is local to a subclass in an inheritance relationship, thus causing
the operation to not take place.This change is also backported to: 1.1.10
References: #3986
-
[bug] [oracle] Fixed bug in cx_Oracle dialect where version string parsing would
fail for cx_Oracle version 6.0b1 due to the "b" character. Version
string parsing is now via a regexp rather than a simple split.This change is also backported to: 1.1.10
References: #3975
-
[bug] [schema] An
ArgumentError
is now raised if a
ForeignKeyConstraint
object is created with a mismatched
number of "local" and "remote" columns, which otherwise causes the
internal state of the constraint to be incorrect. Note that this
also impacts the condition where a dialect's reflection process
produces a mismatched set of columns for a foreign key constraint.This change is also backported to: 1.1.10
References: #3949
-
[bug] [ext] Protected against testing "None" as a class in the case where
declarative classes are being garbage collected and new
automap prepare() operations are taking place concurrently, very
infrequently hitting a weakref that has not been fully acted upon
after gc.This change is also backported to: 1.1.10
References: #3980
-
[bug] [postgresql] Added "autocommit" support for GRANT, REVOKE keywords. Pull request
courtesy Jacob Hayes.This change is also backported to: 1.1.10
-
[bug] [mysql] Removed an ancient and unnecessary intercept of the UTC_TIMESTAMP
MySQL function, which was getting in the way of using it with a
parameter.This change is also backported to: 1.1.10
References: #3966
-
[bug] [mysql] Fixed bug in MySQL dialect regarding rendering of table options in
conjunction with PARTITION options when rendering CREATE TABLE.
The PARTITION related options need to follow the table options,
whereas previously this ordering was not enforced.This change is also backported to: 1.1.10
References: #3961
-
[bug] [sql] Fixed regression released in 1.1.5 due to #3859 where
adjustments to the "right-hand-side" evaluation of an expression
based onVariant
to honor the underlying type's
"right-hand-side" rules caused theVariant
type
to be inappropriately lost, in those cases when we do want the
left-hand side type to be transferred directly to the right hand side
so that bind-level rules can be applied to the expression's argument.This change is also backported to: 1.1.9
References: #3952
-
[bug] [postgresql] [sql] Changed the mechanics of
ResultProxy
to unconditionally
delay the "autoclose" step until theConnection
is done
with the object; in the case where PostgreSQL ON CONFLICT with
RETURNING returns no rows, autoclose was occurring in this previously
non-existent use case, causing the usual autocommit behavior that
occurs unconditionally upon INSERT/UPDATE/DELETE to fail.This change is also backported to: 1.1.9
References: #3955
-
[bug] [ext] Fixed bug in
sqlalchemy.ext.mutable
where the
Mutable.as_mutable()
method would not track a type that had
been copied usingTypeEngine.copy()
. This became more of
a regression in 1.1 compared to 1.0 because theTypeDecorator
class is now a subclass ofSchemaEventTarget
, which among
other things indicates to the parentColumn
that the type
should be copied when theColumn
is. These copies are
common when using declarative with mixins or abstract classes.This change is also backported to: 1.1.8
References: #3950
-
[bug] [ext] Added support for bound parameters, e.g. those normally set up
viaQuery.params()
, to thebaked.Result.count()
method. Previously, support for parameters were omitted. Pull request
courtesy Pat Deegan.This change is also backported to: 1.1.8
-
[bug] [postgresql] Added support for parsing the PostgreSQL version string for
a development version like "PostgreSQL 10devel". Pull request
courtesy Sean McCully.This change is also backported to: 1.1.8
-
[feature] [orm] An
aliased()
construct can now be passed to the
Query.select_entity_from()
method. Entities will be pulled
from the selectable represented by thealiased()
construct.
This allows special options foraliased()
such as
aliased.adapt_on_names
to be used in conjunction with
Query.select_entity_from()
.This change is also backported to: 1.1.7
References: #3933
-
[bug] [engine] Added an exception handler that will warn for the "cause" exception on
Py2K when the "autorollback" feature ofConnection
itself
raises an exception. In Py3K, the two exceptions are naturally reported
by the interpreter as one occurring during the handling of the other.
This is continuing with the series of changes for rollback failure
handling that were last visited as part of #2696 in 1.0.12.This change is also backported to: 1.1.7
References: #3946
-
[bug] [orm] Fixed a race condition which could occur under threaded environments
as a result of the caching added via #3915. An internal
collection ofColumn
objects could be regenerated on an alias
object inappropriately, confusing a joined eager loader when it
attempts to render SQL and collect results and resulting in an
attribute error. The collection is now generated up fr...
v1.1.11
1.1.11
Released: Monday, June 19, 2017
orm
-
[orm] [bug] Fixed issue with subquery eagerloading which continues on from
the series of issues fixed in #2699, #3106,
#3893 involving that the "subquery" contains the correct
FROM clause when beginning from a joined inheritance subclass
and then subquery eager loading onto a relationship from
the base class, while the query also includes criteria against
the subclass. The fix in the previous tickets did not accommodate
for additional subqueryload operations loading more deeply from
the first level, so the fix has been further generalized.References: #4011
sql
-
[sql] [bug] Fixed AttributeError which would occur in
WithinGroup
construct during an iteration of the structure.References: #4012
postgresql
-
[postgresql] [bug] Continuing with the fix that correctly handles PostgreSQL
version string "10devel" released in 1.1.8, an additional regexp
bump to handle version strings of the form "10beta1". While
PostgreSQL now offers better ways to get this information, we
are sticking w/ the regexp at least through 1.1.x for the least
amount of risk to compatibility w/ older or alternate PostgreSQL
databases.References: #4005
-
[postgresql] [bug] Fixed bug where using
ARRAY
with a string type that
features a collation would fail to produce the correct syntax
within CREATE TABLE.References: #4006
mysql
-
[mysql] [bug] MySQL 5.7 has introduced permission limiting for the "SHOW VARIABLES"
command; the MySQL dialect will now handle when SHOW returns no
row, in particular for the initial fetch of SQL_MODE, and will
emit a warning that user permissions should be modified to allow the
row to be present.References: #4007
mssql
-
[mssql] [bug] Fixed bug where SQL Server transaction isolation must be fetched
from a different view when using Azure data warehouse, the query
is now attempted against both views and then a NotImplemented
is raised unconditionally if failure continues to provide the
best resiliency against future arbitrary API changes in new
SQL Server versions.References: #3994
-
[mssql] [bug] Added a placeholder type
mssql.XML
to the SQL Server
dialect, so that a reflected table which includes this type can
be re-rendered as a CREATE TABLE. The type has no special round-trip
behavior nor does it currently support additional qualifying
arguments.References: #3973
oracle
-
[oracle] [bug] Support for two-phase transactions has been removed entirely for
cx_Oracle when version 6.0b1 or later of the DBAPI is in use. The two-
phase feature historically has never been usable under cx_Oracle 5.x in
any case, and cx_Oracle 6.x has removed the connection-level "twophase"
flag upon which this feature relied.References: #3997
v1.1.10
1.1.10
Released: Friday, May 19, 2017
orm
-
[orm] [bug] Fixed bug where a cascade such as "delete-orphan" (but others as well)
would fail to locate an object linked to a relationship that itself
is local to a subclass in an inheritance relationship, thus causing
the operation to not take place.References: #3986
schema
-
[schema] [bug] An
ArgumentError
is now raised if a
ForeignKeyConstraint
object is created with a mismatched
number of "local" and "remote" columns, which otherwise causes the
internal state of the constraint to be incorrect. Note that this
also impacts the condition where a dialect's reflection process
produces a mismatched set of columns for a foreign key constraint.References: #3949
postgresql
- [postgresql] [bug] Added "autocommit" support for GRANT, REVOKE keywords. Pull request
courtesy Jacob Hayes.
mysql
-
[mysql] [bug] Removed an ancient and unnecessary intercept of the UTC_TIMESTAMP
MySQL function, which was getting in the way of using it with a
parameter.References: #3966
-
[mysql] [bug] Fixed bug in MySQL dialect regarding rendering of table options in
conjunction with PARTITION options when rendering CREATE TABLE.
The PARTITION related options need to follow the table options,
whereas previously this ordering was not enforced.References: #3961
oracle
-
[oracle] [bug] Fixed bug in cx_Oracle dialect where version string parsing would
fail for cx_Oracle version 6.0b1 due to the "b" character. Version
string parsing is now via a regexp rather than a simple split.References: #3975
misc
-
[bug] [ext] Protected against testing "None" as a class in the case where
declarative classes are being garbage collected and new
automap prepare() operations are taking place concurrently, very
infrequently hitting a weakref that has not been fully acted upon
after gc.References: #3980
v1.1.9
1.1.9
Released: April 4, 2017
sql
-
[sql] [bug] Fixed regression released in 1.1.5 due to #3859 where
adjustments to the "right-hand-side" evaluation of an expression
based onVariant
to honor the underlying type's
"right-hand-side" rules caused theVariant
type
to be inappropriately lost, in those cases when we do want the
left-hand side type to be transferred directly to the right hand side
so that bind-level rules can be applied to the expression's argument.References: #3952
-
[sql] [bug] [postgresql] Changed the mechanics of
ResultProxy
to unconditionally
delay the "autoclose" step until theConnection
is done
with the object; in the case where PostgreSQL ON CONFLICT with
RETURNING returns no rows, autoclose was occurring in this previously
non-existent use case, causing the usual autocommit behavior that
occurs unconditionally upon INSERT/UPDATE/DELETE to fail.References: #3955
misc
v1.1.8
1.1.8
Released: March 31, 2017
postgresql
- [postgresql] [bug] Added support for parsing the PostgreSQL version string for
a development version like "PostgreSQL 10devel". Pull request
courtesy Sean McCully.
misc
-
[bug] [ext] Fixed bug in
sqlalchemy.ext.mutable
where the
Mutable.as_mutable()
method would not track a type that had
been copied usingTypeEngine.copy()
. This became more of
a regression in 1.1 compared to 1.0 because theTypeDecorator
class is now a subclass ofSchemaEventTarget
, which among
other things indicates to the parentColumn
that the type
should be copied when theColumn
is. These copies are
common when using declarative with mixins or abstract classes.References: #3950
-
[bug] [ext] Added support for bound parameters, e.g. those normally set up
viaQuery.params()
, to thebaked.Result.count()
method. Previously, support for parameters were omitted. Pull request
courtesy Pat Deegan.
v1.1.7
1.1.7
Released: March 27, 2017
orm
-
[orm] [feature] An
aliased()
construct can now be passed to the
Query.select_entity_from()
method. Entities will be pulled
from the selectable represented by thealiased()
construct.
This allows special options foraliased()
such as
aliased.adapt_on_names
to be used in conjunction with
Query.select_entity_from()
.References: #3933
-
[orm] [bug] Fixed a race condition which could occur under threaded environments
as a result of the caching added via #3915. An internal
collection ofColumn
objects could be regenerated on an alias
object inappropriately, confusing a joined eager loader when it
attempts to render SQL and collect results and resulting in an
attribute error. The collection is now generated up front before
the alias object is cached and shared among threads.References: #3947
engine
-
[engine] [bug] Added an exception handler that will warn for the "cause" exception on
Py2K when the "autorollback" feature ofConnection
itself
raises an exception. In Py3K, the two exceptions are naturally reported
by the interpreter as one occurring during the handling of the other.
This is continuing with the series of changes for rollback failure
handling that were last visited as part of #2696 in 1.0.12.References: #3946
sql
-
[sql] [bug] [postgresql] Added support for the
Variant
and theSchemaType
objects to be compatible with each other. That is, a variant
can be created against a type likeEnum
, and the instructions
to create constraints and/or database-specific type objects will
propagate correctly as per the variant's dialect mapping.References: #2892
-
[sql] [bug] Fixed bug in compiler where the string identifier of a savepoint would
be cached in the identifier quoting dictionary; as these identifiers
are arbitrary, a small memory leak could occur if a single
Connection
had an unbounded number of savepoints used,
as well as if the savepoint clause constructs were used directly
with an unbounded umber of savepoint names. The memory leak does
not impact the vast majority of cases as normally the
Connection
, which renders savepoint names with a simple
counter starting at "1", is used on a per-transaction or
per-fixed-number-of-transactions basis before being discarded.References: #3931
-
[sql] [bug] Fixed bug in new "schema translate" feature where the translated schema
name would be invoked in terms of an alias name when rendered along
with a column expression; occurred only when the source translate
name was "None". The "schema translate" feature now only takes
effect forSchemaItem
andSchemaType
subclasses,
that is, objects that correspond to a DDL-creatable structure in
a database.References: #3924
oracle
-
[oracle] [bug] A fix to cx_Oracle's WITH_UNICODE mode which was uncovered by the
fact that cx_Oracle 5.3 now seems to hardcode this flag on in
the build; an internal method that uses this mode wasn't using
the correct signature.This change is also backported to: 1.0.18
References: #3937
v1.1.6
1.1.6
Released: February 28, 2017
orm
-
[orm] [bug] Addressed some long unattended performance concerns within the joined
eager loader query construction system that have accumulated since
earlier versions as a result of increased abstraction. The use of ad-
hocAliasedClass
objects per query, which produces lots of
column lookup overhead each time, has been replaced with a cached
approach that makes use of a small pool ofAliasedClass
objects that are reused between invocations of joined eager loading.
Some mechanics involving eager join path construction have also been
optimized. Callcounts for an end-to-end query construction + single
row fetch test with a worst-case joined loader scenario have been
reduced by about 60% vs. 1.1.5 and 42% vs. that of 0.8.6.References: #3915
-
[orm] [bug] Fixed a major inefficiency in the "eager_defaults" feature whereby
an unnecessary SELECT would be emitted for column values where the
ORM had explicitly inserted NULL, corresponding to attributes that
were unset on the object but did not have any server default
specified, as well as expired attributes on update that nevertheless
had no server onupdate set up. As these columns are not part of the
RETURNING that eager_defaults tries to use, they should not be
post-SELECTed either.References: #3909
-
[orm] [bug] Fixed two closely related bugs involving the mapper eager_defaults
flag in conjunction with single-table inheritance; one where the
eager defaults logic would inadvertently try to access a column
that's part of the mapper's "exclude_properties" list (used by
Declarative with single table inheritance) during the eager defaults
fetch, and the other where the full load of the row in order to
fetch the defaults would fail to use the correct inheriting mapper.References: #3908
-
[orm] [bug] Fixed bug first introduced in 0.9.7 as a result of #3106
which would cause an incorrect query in some forms of multi-level
subqueryload against aliased entities, with an unnecessary extra
FROM entity in the innermost subquery.References: #3893
orm declarative
-
[bug] [declarative] [orm] Fixed bug where the "automatic exclude" feature of declarative that
ensures a column local to a single table inheritance subclass does
not appear as an attribute on other derivations of the base would
not take effect for multiple levels of subclassing from the base.References: #3895
sql
-
[sql] [bug] Fixed bug whereby the
DDLEvents.column_reflect()
event would not
allow a non-textual expression to be passed as the value of the
"default" for the new column, such as aFetchedValue
object to indicate a generic triggered default or a
sql.expression.text()
construct. Clarified the documentation
in this regard as well.References: #3905
postgresql
-
[postgresql] [bug] Added regular expressions for the "IMPORT FOREIGN SCHEMA",
"REFRESH MATERIALIZED VIEW" PostgreSQL statements so that they
autocommit when invoked via a connection or engine without
an explicit transaction. Pull requests courtesy Frazer McLean
and Paweł Stiasny.References: #3804
-
[postgresql] [bug] Fixed bug in PostgreSQL
ExcludeConstraint
where the
"whereclause" and "using" parameters would not be copied during an
operation likeTable.tometadata()
.References: #3900
mysql
- [mysql] [bug] Added new MySQL 8.0 reserved words to the MySQL dialect for proper
quoting. Pull request courtesy Hanno Schlichting.
mssql
-
[mssql] [bug] Added a version check to the "get_isolation_level" feature, which is
invoked upon first connect, so that it skips for SQL Server version
2000, as the necessary system view is not available prior to SQL Server
2005.References: #3898
misc
v1.1.5
1.1.5
Released: January 17, 2017
orm
-
[orm] [bug] Fixed bug involving joined eager loading against multiple entities
when polymorphic inheritance is also in use which would throw
"'NoneType' object has no attribute 'isa'". The issue was introduced
by the fix for #3611.This change is also backported to: 1.0.17
References: #3884
-
[orm] [bug] Fixed bug in subquery loading where an object encountered as an
"existing" row, e.g. already loaded from a different path in the
same query, would not invoke subquery loaders for unloaded attributes
that specified this loading. This issue is in the same area
as that of #3431, #3811 which involved
similar issues with joined loading.References: #3854
-
[orm] [bug] The
Session.no_autoflush
context manager now ensures that
the autoflush flag is reset within a "finally" block, so that if
an exception is raised within the block, the state still resets
appropriately. Pull request courtesy Emin Arakelian. -
[orm] [bug] Fixed bug where the single-table inheritance query criteria would not
be inserted into the query in the case that theBundle
construct were used as the selection criteria.References: #3874
-
[orm] [bug] Fixed bug related to #3177, where a UNION or other set operation
emitted by aQuery
would apply "single-inheritance" criteria
to the outside of the union (also referencing the wrong selectable),
even though this criteria is now expected to
be already present on the inside subqueries. The single-inheritance
criteria is now omitted once union() or another set operation is
called againstQuery
in the same way asQuery.from_self()
.References: #3856
engine
-
[engine] [bug] The "extend_existing" option of
Table
reflection would
cause indexes and constraints to be doubled up in the case that the parameter
were used withMetaData.reflect()
(as the automap extension does)
due to tables being reflected both within the foreign key path as well
as directly. A new de-duplicating set is passed through within the
MetaData.reflect()
sequence to prevent double reflection in this
way.References: #3861
sql
-
[sql] [bug] Fixed bug originally introduced in 0.9 via #1068 where
order_by(<some Label()>) would order by the label name based on name
alone, that is, even if the labeled expression were not at all the same
expression otherwise present, implicitly or explicitly, in the
selectable. The logic that orders by label now ensures that the
labeled expression is related to the one that resolves to that name
before ordering by the label name; additionally, the name has to
resolve to an actual label explicit in the expression elsewhere, not
just a column name. This logic is carefully kept separate from the
order by(textual name) feature that has a slightly different purpose. -
[sql] [bug] Fixed 1.1 regression where "import *" would not work for
sqlalchemy.sql.expression, due to mis-spelledany_
andall_
functions.References: #3878
-
[sql] [bg] Fixed bug where literal_binds compiler flag was not honored by the
Insert
construct for the "multiple values" feature; the
subsequent values are now rendered as literals.References: #3880
-
[sql] [bug] The engine URL embedded in the exception for "could not reflect"
inMetaData.reflect()
now conceals the password; also
the__repr__
forTLEngine
now acts like that of
Engine
, concealing the URL password. Pull request courtesy
Valery Yundin. -
[sql] [bug] Fixed issue in
Variant
where the "right hand coercion" logic,
inherited fromTypeDecorator
, would
coerce the right-hand side into theVariant
itself, rather than
what the default type for theVariant
would do. In the
case ofVariant
, we want the type to act mostly like the base
type so the default logic ofTypeDecorator
is now overridden
to fall back to the underlying wrapped type's logic. Is mostly relevant
for JSON at the moment.References: #3859
postgresql
-
[postgresql] [bug] Fixed bug in new "ON CONFLICT DO UPDATE" feature where the "set"
values for the UPDATE clause would not be subject to type-level
processing, as normally takes effect to handle both user-defined
type level conversions as well as dialect-required conversions, such
as those required for JSON datatypes. Additionally, clarified that
the keys in theset_
dictionary should match the "key" of the
column, if distinct from the column name. A warning is emitted
for remaining column names that don't match column keys; for
compatibility reasons, these are emitted as they were previously.References: #3888
-
[postgresql] [bug] The
postgresql.TIME
andpostgresql.TIMESTAMP
datatypes now support a setting of zero for "precision"; previously
a zero would be ignored. Pull request courtesy Ionuț Ciocîrlan.
mysql
-
[mysql] [feature] Added a new parameter
mysql_prefix
supported by theIndex
construct, allows specification of MySQL-specific prefixes such as
"FULLTEXT". Pull request courtesy Joseph Schorr. -
[mysql] [bug] The MySQL dialect now will not warn when a reflected column has a
"COMMENT" keyword on it, but note however the comment is not yet
reflected; this is on the roadmap for a future release. Pull request
courtesy Lele Long.References: #3867
mssql
-
[mssql] [bug] Fixed bug where SQL Server dialects would attempt to select the
last row identity for an INSERT from SELECT, failing in the case when
the SELECT has no rows. For such a statement,
the inline flag is set to True indicating no last primary key
should be fetched.References: #3876
oracle
-
[oracle] [bug] [postgresql] Fixed bug where an INSERT from SELECT where the source table contains
an autoincrementing Sequence would fail to compile correctly.References: #3877
-
[oracle] [bug] Fixed bug where the "COMPRESSION" keyword was used in the ALL_TABLES
query on Oracle 9.2; even though Oracle docs state table compression
was introduced in 9i, the actual column is not present until
10.1.References: #3875
firebird
-
[firebird] [bug] Ported the fix for Oracle quoted-lowercase names to Firebird, so that
a table name that is quoted as lower case can be reflected properly
including when the table name comes from the get_table_names()
inspection function.References: #3548
misc
-
[bug] [py3k] Fixed Python 3.6 DeprecationWarnings related to escaped strings without
the 'r' modifier, and added test coverage for Python 3.6.This change is also backported to: 1.0.17
References: #3886
-
[bug] [examples] Fixed two issues with the versioned_history example, one is that
the history table now gets autoincrement=False to avoid 1.1's new
errors regarding composite primary keys with autoincrement; the other
is that the sqlite_autoincrement flag is now used to ensure on SQLite,
unique identifiers are used for the lifespan of a table even if
some rows are deleted. Pull request courtesy Carlos García Montoro.References: #3872
v1.1.4
1.1.4
Released: November 15, 2016
orm
-
[orm] [bug] Fixed bug in
Session.bulk_update_mappings()
where an alternate-named
primary key attribute would not track properly into the UPDATE statement.This change is also backported to: 1.0.16
References: #3849
-
[orm] [bug] Fixed bug in
Session.bulk_save()
where an UPDATE would
not function correctly in conjunction with a mapping that
implements a version id counter.This change is also backported to: 1.0.16
References: #3781
-
[orm] [bug] Fixed bug where the
Mapper.attrs
,
Mapper.all_orm_descriptors
and other derived attributes would
fail to refresh when mapper properties or other ORM constructs were
added to the mapper/class after these accessors were first called.This change is also backported to: 1.0.16
References: #3778
-
[orm] [bug] Fixed regression in collections due to #3457 whereby
deserialize during pickle or deepcopy would fail to establish all
attributes of an ORM collection, causing further mutation operations to
fail.References: #3852
-
[orm] [bug] Fixed long-standing bug where the "noload" relationship loading
strategy would cause backrefs and/or back_populates options to be
ignored.References: #3845
engine
- [engine] [bug] Removed long-broken "default_schema_name()" method from
Connection
. This method was left over from a very old
version and was non-working (e.g. would raise). Pull request
courtesy Benjamin Dopplinger.
sql
-
[sql] [bug] Fixed bug where newly added warning for primary key on insert w/o
autoincrement setting (seechange_3216
) would fail to emit
correctly when invoked upon a lower-casetable()
construct.References: #3842
postgresql
-
[postgresql] [bug] Fixed regression caused by the fix in #3807 (version 1.1.0)
where we ensured that the tablename was qualified in the WHERE clause
of the DO UPDATE portion of PostgreSQL's ON CONFLICT, however you
cannot put the table name in the WHERE clause in the actual ON
CONFLICT itself. This was an incorrect assumption, so that portion
of the change in #3807 is rolled back.
mysql
-
[mysql] [feature] Added support for server side cursors to the mysqlclient and
pymysql dialects. This feature is available via the
Connection.execution_options.stream_results
flag as well
as theserver_side_cursors=True
dialect argument in the
same way that it has been for psycopg2 on PostgreSQL. Pull request
courtesy Roman Podoliaka. -
[mysql] [bug] MySQL's native ENUM type supports any non-valid value being sent, and
in response will return a blank string. A hardcoded rule to check for
"is returning the blank string" has been added to the MySQL
implementation for ENUM so that this blank string is returned to the
application rather than being rejected as a non-valid value. Note that
if your MySQL enum is linking values to objects, you still get the
blank string back.References: #3841
sqlite
-
[sqlite] [bug] Added quotes to the PRAGMA directives in the pysqlcipher dialect
to support additional cipher arguments appropriately. Pull request
courtesy Kevin Jurczyk. -
[sqlite] [bug] [py3k] Added an optional import for the pysqlcipher3 DBAPI when using the
pysqlcipher dialect. This package will attempt to be imported
if the Python-2 only pysqlcipher DBAPI is non-present.
Pull request courtesy Kevin Jurczyk.
mssql
-
[mssql] [bug] Fixed bug in pyodbc dialect (as well as in the mostly non-working
adodbapi dialect) whereby a semicolon present in the password
or username fields could be interpreted as a separator for another
token; the values are now quoted when semicolons are present.This change is also backported to: 1.0.16
References: #3762
v1.1.3
1.1.3
Released: October 27, 2016
orm
-
[orm] [bug] Fixed regression caused by #2677 whereby calling
Session.delete()
on an object that was already flushed as
deleted in that session would fail to set up the object in the
identity map (or reject the object), causing flush errors as the
object were in a state not accommodated by the unit of work.
The pre-1.1 behavior in this case has been restored, which is that
the object is put back into the identity map so that the DELETE
statement will be attempted again, which emits a warning that the number
of expected rows was not matched (unless the row were restored outside
of the session).References: #3839
-
[orm] [bug] Fixed regression where some
Query
methods like
Query.update()
and others would fail if theQuery
were against a series of mapped columns, rather than the mapped
entity as a whole.References: #3836
sql
-
[sql] [bug] Fixed bug involving new value translation and validation feature
inEnum
whereby using the enum object in a string
concatenation would maintain theEnum
type as the type
of the expression overall, producing missing lookups. A string
concatenation against anEnum
-typed column now uses
String
as the datatype of the expression itself.References: #3833
-
[sql] [bug] Fixed regression which occurred as a side effect of #2919,
which in the less typical case of a user-defined
TypeDecorator
that was also itself an instance of
SchemaType
(rather than the implementation being such)
would cause the column attachment events to be skipped for the
type itself.References: #3832
postgresql
-
[postgresql] [bug] PostgreSQL table reflection will ensure that the
Column.autoincrement
flag is set to False when reflecting
a primary key column that is not of anInteger
datatype,
even if the default is related to an integer-generating sequence.
This can happen if a column is created as SERIAL and the datatype
is changed. The autoincrement flag can only be True if the datatype
is of integer affinity in the 1.1 series.References: #3835