1.1 Changelog

1.1.19

no release date

1.1.18

Released: March 6, 2018

postgresql

  • [postgresql] [bug] [py3k]

Fixed bug in PostgreSQL COLLATE / ARRAY adjustment first introducedin #4006 where new behaviors in Python 3.7 regular expressionscaused the fix to fail.References: #4208

mysql

  • [mysql] [bug]

MySQL dialects now query the server version using SELECT @@versionexplicitly to the server to ensure we are getting the correct versioninformation back. Proxy servers like MaxScale interfere with the valuethat is passed to the DBAPI’s connection.server_version value so thisis no longer reliable.References: #4205

1.1.17

Released: February 22, 2018

  • [bug] [ext]

Repaired regression caused in 1.2.3 and 1.1.16 regarding association proxyobjects, revising the approach to #4185 when calculating the“owning class” of an association proxy to default to choosing the currentclass if the proxy object is not directly associated with a mapped class,such as a mixin.References: #4185

1.1.16

Released: February 16, 2018

orm

  • [orm] [bug]

Fixed issue in post_update feature where an UPDATE is emittedwhen the parent object has been deleted but the dependent objectis not. This issue has existed for a long time howeversince 1.2 now asserts rows matched for post_update, thiswas raising an error.References: #4187

  • [orm] [bug]

Fixed regression caused by fix for issue #4116 affecting versions1.2.2 as well as 1.1.15, which had the effect of mis-calculation of the“owning class” of an AssociationProxy as the NoneType classin some declarative mixin/inheritance situations as well as if theassociation proxy were accessed off of an un-mapped class. The “figure outthe owner” logic has been replaced by an in-depth routine that searchesthrough the complete mapper hierarchy assigned to the class or subclass todetermine the correct (we hope) match; will not assign the owner if nomatch is found. An exception is now raised if the proxy is usedagainst an un-mapped instance.References: #4185

  • [orm] [bug]

Fixed bug where an object that is expunged during a rollback ofa nested or subtransaction which also had its primary key mutatedwould not be correctly removed from the session, causing subsequentissues in using the session.References: #4151

sql

  • [sql] [bug]

Added nullsfirst() and nullslast() as top level importsin the sqlalchemy. and sqlalchemy.sql. namespace. Pull requestcourtesy Lele Gaifax.

  • [sql] [bug]

Fixed bug in Insert.values() where using the “multi-values”format in combination with Column objects as keys ratherthan strings would fail. Pull request courtesy Aubrey Stark-Toller.References: #4162

postgresql

  • [postgresql] [bug]

Added “SSL SYSCALL error: Operation timed out” to the listof messages that trigger a “disconnect” scenario for thepsycopg2 driver. Pull request courtesy André Cruz.

  • [postgresql] [bug]

Added “TRUNCATE” to the list of keywords accepted by thePostgreSQL dialect as an “autocommit”-triggering keyword.Pull request courtesy Jacob Hayes.

mysql

  • [mysql] [bug]

Fixed bug where the MySQL “concat” and “match” operators failed topropagate kwargs to the left and right expressions, causing compileroptions such as “literal_binds” to fail.References: #4136

misc

  • [bug] [pool]

Fixed a fairly serious connection pool bug where a connection that isacquired after being refreshed as a result of a user-definedDisconnectionError or due to the 1.2-released “pre_ping” featurewould not be correctly reset if the connection were returned to the pool byweakref cleanup (e.g. the front-facing object is garbage collected); theweakref would still refer to the previously invalidated DBAPI connectionwhich would have the reset operation erroneously called upon it instead.This would lead to stack traces in the logs and a connection being checkedinto the pool without being reset, which can cause locking issues.References: #4184

1.1.15

Released: November 3, 2017

orm

  • [orm] [bug] [ext]

Fixed bug where the association proxy would inadvertently link itselfto an AliasedClass object if it were called first withthe AliasedClass as a parent, causing errors upon subsequentusage.References: #4116

  • [orm] [bug]

Fixed bug where ORM relationship would warn against conflicting synctargets (e.g. two relationships would both write to the same column) forsibling classes in an inheritance hierarchy, where the two relationshipswould never actually conflict during writes.References: #4078

  • [orm] [bug]

Fixed bug where correlated select used against single-table inheritanceentity would fail to render correctly in the outer query, due to adjustmentfor single inheritance discriminator criteria inappropriately re-applyingthe criteria to the outer query.References: #4103

orm declarative

  • [bug] [declarative] [orm]

Fixed bug where a descriptor that is elsewhere a mapped columnor relationship within a hierarchy based on AbstractConcreteBasewould be referred towards during a refresh operation, causing an erroras the attribute is not mapped as a mapper property.A similar issue can arise for other attributes like the “type” columnadded by AbstractConcreteBase if the class fails to include“concrete=True” in its mapper, however the check here should alsoprevent that scenario from causing a problem.References: #4124

sql

  • [sql] [bug]

Fixed bug where repr of ColumnDefault would failif the argument were a tuple. Pull request courtesy Nicolas Caniart.References: #4126

  • [sql] [bug]

Fixed bug where the recently added ColumnOperators.any_()and ColumnOperators.all_() methods didn’t work when calledas methods, as opposed to using the standalone functionsany_() and all_(). Alsoadded documentation examples for these relatively unintuitiveSQL operators.References: #4093

postgresql

  • [postgresql] [bug]

Made further fixes to the ARRAY class in conjunction withCOLLATE, as the fix made in #4006 failed to accommodatefor a multidimensional array.References: #4006

  • [postgresql] [bug]

Fixed bug in array_agg function where passing an argumentthat is already of type ARRAY, such as a PostgreSQLpostgresql.array construct, would produce a ValueError, dueto the function attempting to nest the arrays.References: #4107

  • [postgresql] [bug]

Fixed bug in PostgreSQL postgresql.dml.Insert.on_conflict_do_update()which would prevent the insert statement from being used as a CTE,e.g. via Insert.cte(), within another statement.References: #4074

mysql

  • [mysql] [bug]

Warning emitted when MariaDB 10.2.8 or earlier in the 10.2series is detected as there are major issues with CHECKconstraints within these versions that were resolved as of10.2.9.

Note that this changelog message was NOT released withSQLAlchemy 1.2.0b3 and was added retroactively.References: #4097

  • [mysql] [bug]

MySQL 5.7.20 now warns for use of the @tx_isolation variable; a versioncheck is now performed and uses @transaction_isolation insteadto prevent this warning.References: #4120

mssql

  • [mssql] [bug]

Added a full range of “connection closed” exception codes to thePyODBC dialect for SQL Server, including ‘08S01’, ‘01002’, ‘08003’,‘08007’, ‘08S02’, ‘08001’, ‘HYT00’, ‘HY010’. Previously, only ‘08S01’was covered.References: #4095

1.1.14

Released: September 5, 2017

orm

  • [orm] [bug]

Fixed bug in Session.merge() following along similar lines as thatof #4030, where an internal check for a target object inthe identity map could lead to an error if it were to be garbage collectedimmediately before the merge routine actually retrieves the object.References: #4069

  • [orm] [bug]

Fixed bug where an undefer_group() option would not be recognizedif it extended from a relationship that was loading using joined eagerloading. Additionally, as the bug led to excess work being performed,Python function call counts are also improved by 20% within the initialcalculation of result set columns, complementing the joined eager loadimprovements of #3915.References: #4048

  • [orm] [bug]

Fixed race condition in ORM identity map which would cause objectsto be inappropriately removed during a load operation, causingduplicate object identities to occur, particularly under joined eagerloading which involves deduplication of objects. The issue is specificto garbage collection of weak references and is observed only under thePyPy interpreter.References: #4068

  • [orm] [bug]

Fixed bug in Session.merge() where objects in a collection that hadthe primary key attribute set to None for a key that is typicallyautoincrementing would be considered to be a database-persisted key forpart of the internal deduplication process, causing only one object toactually be inserted in the database.References: #4056

  • [orm] [bug]

An InvalidRequestError is raised when a synonym()is used against an attribute that is not against a MapperProperty,such as an association proxy. Previously, a recursion overflow wouldoccur trying to locate non-existent attributes.References: #4067

sql

  • [sql] [bug]

Altered the range specification for window functions to allowfor two of the same PRECEDING or FOLLOWING keywords in a rangeby allowing for the left side of the range to be positiveand for the right to be negative, e.g. (1, 3) is“1 FOLLOWING AND 3 FOLLOWING”.References: #4053

1.1.13

Released: August 3, 2017

oracle

  • [oracle] [bug] [performance] [py2k]

Fixed performance regression caused by the fix for #3937 wherecx_Oracle as of version 5.3 dropped the .UNICODE symbol from itsnamespace, which was interpreted as cx_Oracle’s “WITH_UNICODE” mode beingturned on unconditionally, which invokes functions on the SQLAlchemyside which convert all strings to unicode unconditionally and causinga performance impact. In fact, per cx_Oracle’s author the“WITH_UNICODE” mode has been removed entirely as of 5.1, so the expensive unicodeconversion functions are no longer necessary and are disabled ifcx_Oracle 5.1 or greater is detected under Python 2. The warning against“WITH_UNICODE” mode that was removed under #3937 is also restored.This change is also backported to: 1.0.19

References: #4035

1.1.12

Released: July 24, 2017

orm

  • [orm] [bug]

Fixed regression from 1.1.11 where adding additional non-entitycolumns to a query that includes an entity with subqueryloadrelationships would fail, due to an inspection added in 1.1.11 as aresult of #4011.References: #4033

  • [orm] [bug]

Fixed bug involving JSON NULL evaluation logic added in 1.1 as partof #3514 where the logic would not accommodate ORMmapped attributes named differently from the Columnthat was mapped.References: #4031

  • [orm] [bug]

Added KeyError checks to all methods withinWeakInstanceDict where a check for key in dict isfollowed by indexed access to that key, to guard against a race againstgarbage collection that under load can remove the key from the dictafter the code assumes its present, leading to very infrequentKeyError raises.References: #4030

oracle

  • [oracle] [feature] [postgresql]

Added new keywords Sequence.cache andSequence.order to Sequence, to allow renderingof the CACHE parameter understood by Oracle and PostgreSQL, and theORDER parameter understood by Oracle. Pull requestcourtesy David Moore.

misc

  • [bug] [py3k] [tests]

Fixed issue in testing fixtures which was incompatible with a changemade as of Python 3.6.2 involving context managers.This change is also backported to: 1.0.18

References: #4034

1.1.11

Released: Monday, June 19, 2017

orm

  • [orm] [bug]

Fixed issue with subquery eagerloading which continues on fromthe series of issues fixed in #2699, #3106,#3893 involving that the “subquery” contains the correctFROM clause when beginning from a joined inheritance subclassand then subquery eager loading onto a relationship fromthe base class, while the query also includes criteria againstthe subclass. The fix in the previous tickets did not accommodatefor additional subqueryload operations loading more deeply fromthe first level, so the fix has been further generalized.References: #4011

sql

  • [sql] [bug]

Fixed AttributeError which would occur in WithinGroupconstruct during an iteration of the structure.References: #4012

postgresql

  • [postgresql] [bug]

Continuing with the fix that correctly handles PostgreSQLversion string “10devel” released in 1.1.8, an additional regexpbump to handle version strings of the form “10beta1”. WhilePostgreSQL now offers better ways to get this information, weare sticking w/ the regexp at least through 1.1.x for the leastamount of risk to compatibility w/ older or alternate PostgreSQLdatabases.References: #4005

  • [postgresql] [bug]

Fixed bug where using ARRAY with a string type thatfeatures a collation would fail to produce the correct syntaxwithin 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 norow, in particular for the initial fetch of SQL_MODE, and willemit a warning that user permissions should be modified to allow therow to be present.References: #4007

mssql

  • [mssql] [bug]

Fixed bug where SQL Server transaction isolation must be fetchedfrom a different view when using Azure data warehouse, the queryis now attempted against both views and then a NotImplementedis raised unconditionally if failure continues to provide thebest resiliency against future arbitrary API changes in newSQL Server versions.References: #3994

  • [mssql] [bug]

Added a placeholder type mssql.XML to the SQL Serverdialect, so that a reflected table which includes this type canbe re-rendered as a CREATE TABLE. The type has no special round-tripbehavior nor does it currently support additional qualifyingarguments.References: #3973

oracle

  • [oracle] [bug]

Support for two-phase transactions has been removed entirely forcx_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 inany case, and cx_Oracle 6.x has removed the connection-level “twophase”flag upon which this feature relied.References: #3997

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 itselfis local to a subclass in an inheritance relationship, thus causingthe operation to not take place.References: #3986

schema

  • [schema] [bug]

An ArgumentError is now raised if aForeignKeyConstraint object is created with a mismatchednumber of “local” and “remote” columns, which otherwise causes theinternal state of the constraint to be incorrect. Note that thisalso impacts the condition where a dialect’s reflection processproduces a mismatched set of columns for a foreign key constraint.References: #3949

postgresql

  • [postgresql] [bug]

Added “autocommit” support for GRANT, REVOKE keywords. Pull requestcourtesy Jacob Hayes.

mysql

  • [mysql] [bug]

Removed an ancient and unnecessary intercept of the UTC_TIMESTAMPMySQL function, which was getting in the way of using it with aparameter.References: #3966

  • [mysql] [bug]

Fixed bug in MySQL dialect regarding rendering of table options inconjunction 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 wouldfail for cx_Oracle version 6.0b1 due to the “b” character. Versionstring 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 wheredeclarative classes are being garbage collected and newautomap prepare() operations are taking place concurrently, veryinfrequently hitting a weakref that has not been fully acted uponafter gc.References: #3980

1.1.9

Released: April 4, 2017

sql

  • [sql] [bug]

Fixed regression released in 1.1.5 due to #3859 whereadjustments to the “right-hand-side” evaluation of an expressionbased on Variant to honor the underlying type’s“right-hand-side” rules caused the Variant typeto be inappropriately lost, in those cases when we do want theleft-hand side type to be transferred directly to the right hand sideso that bind-level rules can be applied to the expression’s argument.References: #3952

  • [sql] [bug] [postgresql]

Changed the mechanics of ResultProxy to unconditionallydelay the “autoclose” step until the Connection is donewith the object; in the case where PostgreSQL ON CONFLICT withRETURNING returns no rows, autoclose was occurring in this previouslynon-existent use case, causing the usual autocommit behavior thatoccurs unconditionally upon INSERT/UPDATE/DELETE to fail.References: #3955

misc

  • [bug] [ext]

Fixed regression released in 1.1.8 due to #3950 where thedeeper search for information about column types in the case of a“schema type” or a TypeDecorator would produce an attributeerror if the mapping also contained a column_property.References: #3956

1.1.8

Released: March 31, 2017

postgresql

  • [postgresql] [bug]

Added support for parsing the PostgreSQL version string fora development version like “PostgreSQL 10devel”. Pull requestcourtesy Sean McCully.

misc

  • [bug] [ext]

Fixed bug in sqlalchemy.ext.mutable where theMutable.as_mutable() method would not track a type that hadbeen copied using TypeEngine.copy(). This became more ofa regression in 1.1 compared to 1.0 because the TypeDecoratorclass is now a subclass of SchemaEventTarget, which amongother things indicates to the parent Column that the typeshould be copied when the Column is. These copies arecommon when using declarative with mixins or abstract classes.References: #3950

  • [bug] [ext]

Added support for bound parameters, e.g. those normally set upvia Query.params(), to the baked.Result.count()method. Previously, support for parameters were omitted. Pull requestcourtesy Pat Deegan.

1.1.7

Released: March 27, 2017

orm

  • [orm] [feature]

An aliased() construct can now be passed to theQuery.select_entity_from() method. Entities will be pulledfrom the selectable represented by the aliased() construct.This allows special options for aliased() such asaliased.adapt_on_names to be used in conjunction withQuery.select_entity_from().References: #3933

  • [orm] [bug]

Fixed a race condition which could occur under threaded environmentsas a result of the caching added via #3915. An internalcollection of Column objects could be regenerated on an aliasobject inappropriately, confusing a joined eager loader when itattempts to render SQL and collect results and resulting in anattribute error. The collection is now generated up front beforethe alias object is cached and shared among threads.References: #3947

engine

  • [engine] [bug]

Added an exception handler that will warn for the “cause” exception onPy2K when the “autorollback” feature of Connection itselfraises an exception. In Py3K, the two exceptions are naturally reportedby the interpreter as one occurring during the handling of the other.This is continuing with the series of changes for rollback failurehandling that were last visited as part of #2696 in 1.0.12.References: #3946

sql

  • [sql] [bug] [postgresql]

Added support for the Variant and the SchemaTypeobjects to be compatible with each other. That is, a variantcan be created against a type like Enum, and the instructionsto create constraints and/or database-specific type objects willpropagate correctly as per the variant’s dialect mapping.References: #2892

  • [sql] [bug]

Fixed bug in compiler where the string identifier of a savepoint wouldbe cached in the identifier quoting dictionary; as these identifiersare arbitrary, a small memory leak could occur if a singleConnection had an unbounded number of savepoints used,as well as if the savepoint clause constructs were used directlywith an unbounded umber of savepoint names. The memory leak doesnot impact the vast majority of cases as normally theConnection, which renders savepoint names with a simplecounter starting at “1”, is used on a per-transaction orper-fixed-number-of-transactions basis before being discarded.References: #3931

  • [sql] [bug]

Fixed bug in new “schema translate” feature where the translated schemaname would be invoked in terms of an alias name when rendered alongwith a column expression; occurred only when the source translatename was “None”. The “schema translate” feature now only takeseffect for SchemaItem and SchemaType subclasses,that is, objects that correspond to a DDL-creatable structure ina database.References: #3924

oracle

  • [oracle] [bug]

A fix to cx_Oracle’s WITH_UNICODE mode which was uncovered by thefact that cx_Oracle 5.3 now seems to hardcode this flag on inthe build; an internal method that uses this mode wasn’t usingthe correct signature.This change is also backported to: 1.0.18

References: #3937

1.1.6

Released: February 28, 2017

orm

  • [orm] [bug]

Addressed some long unattended performance concerns within the joinedeager loader query construction system that have accumulated sinceearlier versions as a result of increased abstraction. The use of ad-hoc AliasedClass objects per query, which produces lots ofcolumn lookup overhead each time, has been replaced with a cachedapproach that makes use of a small pool of AliasedClassobjects that are reused between invocations of joined eager loading.Some mechanics involving eager join path construction have also beenoptimized. Callcounts for an end-to-end query construction + singlerow fetch test with a worst-case joined loader scenario have beenreduced 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 wherebyan unnecessary SELECT would be emitted for column values where theORM had explicitly inserted NULL, corresponding to attributes thatwere unset on the object but did not have any server defaultspecified, as well as expired attributes on update that neverthelesshad no server onupdate set up. As these columns are not part of theRETURNING that eager_defaults tries to use, they should not bepost-SELECTed either.References: #3909

  • [orm] [bug]

Fixed two closely related bugs involving the mapper eager_defaultsflag in conjunction with single-table inheritance; one where theeager defaults logic would inadvertently try to access a columnthat’s part of the mapper’s “exclude_properties” list (used byDeclarative with single table inheritance) during the eager defaultsfetch, and the other where the full load of the row in order tofetch 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 #3106which would cause an incorrect query in some forms of multi-levelsubqueryload against aliased entities, with an unnecessary extraFROM entity in the innermost subquery.References: #3893

orm declarative

  • [bug] [declarative] [orm]

Fixed bug where the “automatic exclude” feature of declarative thatensures a column local to a single table inheritance subclass doesnot appear as an attribute on other derivations of the base wouldnot take effect for multiple levels of subclassing from the base.References: #3895

sql

  • [sql] [bug]

Fixed bug whereby the DDLEvents.column_reflect() event would notallow a non-textual expression to be passed as the value of the“default” for the new column, such as a FetchedValueobject to indicate a generic triggered default or asql.expression.text() construct. Clarified the documentationin this regard as well.References: #3905

postgresql

  • [postgresql] [bug]

Added regular expressions for the “IMPORT FOREIGN SCHEMA”,“REFRESH MATERIALIZED VIEW” PostgreSQL statements so that theyautocommit when invoked via a connection or engine withoutan explicit transaction. Pull requests courtesy Frazer McLeanand Paweł Stiasny.References: #3804

  • [postgresql] [bug]

Fixed bug in PostgreSQL ExcludeConstraint where the“whereclause” and “using” parameters would not be copied during anoperation like Table.tometadata().References: #3900

mysql

  • [mysql] [bug]

Added new MySQL 8.0 reserved words to the MySQL dialect for properquoting. Pull request courtesy Hanno Schlichting.

mssql

  • [mssql] [bug]

Added a version check to the “get_isolation_level” feature, which isinvoked upon first connect, so that it skips for SQL Server version2000, as the necessary system view is not available prior to SQL Server2005.References: #3898

misc

  • [feature] [ext]

Added baked.Result.scalar() and baked.Result.count()to the “baked” query system.References: #3896

  • [bug] [ext]

Fixed bug in new sqlalchemy.ext.indexable extensionwhere setting of a property that itself refers to another propertywould fail.References: #3901

1.1.5

Released: January 17, 2017

orm

  • [orm] [bug]

Fixed bug involving joined eager loading against multiple entitieswhen polymorphic inheritance is also in use which would throw“‘NoneType’ object has no attribute ‘isa’”. The issue was introducedby 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 thesame query, would not invoke subquery loaders for unloaded attributesthat specified this loading. This issue is in the same areaas that of #3431, #3811 which involvedsimilar issues with joined loading.References: #3854

  • [orm] [bug]

The Session.no_autoflush context manager now ensures thatthe autoflush flag is reset within a “finally” block, so that ifan exception is raised within the block, the state still resetsappropriately. Pull request courtesy Emin Arakelian.

  • [orm] [bug]

Fixed bug where the single-table inheritance query criteria would notbe inserted into the query in the case that the Bundleconstruct were used as the selection criteria.References: #3874

  • [orm] [bug]

Fixed bug related to #3177, where a UNION or other set operationemitted by a Query would apply “single-inheritance” criteriato the outside of the union (also referencing the wrong selectable),even though this criteria is now expected tobe already present on the inside subqueries. The single-inheritancecriteria is now omitted once union() or another set operation iscalled against Query in the same way as Query.from_self().References: #3856

engine

  • [engine] [bug]

The “extend_existing” option of Table reflection wouldcause indexes and constraints to be doubled up in the case that the parameterwere used with MetaData.reflect() (as the automap extension does)due to tables being reflected both within the foreign key path as wellas directly. A new de-duplicating set is passed through within theMetaData.reflect() sequence to prevent double reflection in thisway.References: #3861

sql

  • [sql] [bug]

Fixed bug originally introduced in 0.9 via #1068 whereorder_by() would order by the label name based on namealone, that is, even if the labeled expression were not at all the sameexpression otherwise present, implicitly or explicitly, in theselectable. The logic that orders by label now ensures that thelabeled expression is related to the one that resolves to that namebefore ordering by the label name; additionally, the name has toresolve to an actual label explicit in the expression elsewhere, notjust a column name. This logic is carefully kept separate from theorder by(textual name) feature that has a slightly different purpose.

  • [sql] [bug]

Fixed 1.1 regression where “import *” would not work forsqlalchemy.sql.expression, due to mis-spelled any and allfunctions.References: #3878

  • [sql] [bug]

The engine URL embedded in the exception for “could not reflect”in MetaData.reflect() now conceals the password; alsothe repr for TLEngine now acts like that ofEngine, concealing the URL password. Pull request courtesyValery Yundin.

  • [sql] [bug]

Fixed issue in Variant where the “right hand coercion” logic,inherited from TypeDecorator, wouldcoerce the right-hand side into the Variant itself, rather thanwhat the default type for the Variant would do. In thecase of Variant, we want the type to act mostly like the basetype so the default logic of TypeDecorator is now overriddento fall back to the underlying wrapped type’s logic. Is mostly relevantfor JSON at the moment.References: #3859

  • [sql] [bg]

Fixed bug where literal_binds compiler flag was not honored by theInsert construct for the “multiple values” feature; thesubsequent values are now rendered as literals.References: #3880

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-levelprocessing, as normally takes effect to handle both user-definedtype level conversions as well as dialect-required conversions, suchas those required for JSON datatypes. Additionally, clarified thatthe keys in the set_ dictionary should match the “key” of thecolumn, if distinct from the column name. A warning is emittedfor remaining column names that don’t match column keys; forcompatibility reasons, these are emitted as they were previously.References: #3888

  • [postgresql] [bug]

The postgresql.TIME and postgresql.TIMESTAMPdatatypes now support a setting of zero for “precision”; previouslya zero would be ignored. Pull request courtesy Ionuț Ciocîrlan.

mysql

  • [mysql] [feature]

Added a new parameter mysql_prefix supported by the Indexconstruct, 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 yetreflected; this is on the roadmap for a future release. Pull requestcourtesy Lele Long.References: #3867

mssql

  • [mssql] [bug]

Fixed bug where SQL Server dialects would attempt to select thelast row identity for an INSERT from SELECT, failing in the case whenthe SELECT has no rows. For such a statement,the inline flag is set to True indicating no last primary keyshould be fetched.References: #3876

oracle

  • [oracle] [bug] [postgresql]

Fixed bug where an INSERT from SELECT where the source table containsan autoincrementing Sequence would fail to compile correctly.References: #3877

  • [oracle] [bug]

Fixed bug where the “COMPRESSION” keyword was used in the ALL_TABLESquery on Oracle 9.2; even though Oracle docs state table compressionwas introduced in 9i, the actual column is not present until10.1.References: #3875

firebird

  • [firebird] [bug]

Ported the fix for Oracle quoted-lowercase names to Firebird, so thata table name that is quoted as lower case can be reflected properlyincluding 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 withoutthe ‘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 thatthe history table now gets autoincrement=False to avoid 1.1’s newerrors regarding composite primary keys with autoincrement; the otheris that the sqlite_autoincrement flag is now used to ensure on SQLite,unique identifiers are used for the lifespan of a table even ifsome rows are deleted. Pull request courtesy Carlos García Montoro.References: #3872

1.1.4

Released: November 15, 2016

orm

  • [orm] [bug]

Fixed bug in Session.bulk_update_mappings() where an alternate-namedprimary 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 wouldnot function correctly in conjunction with a mapping thatimplements 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 wouldfail to refresh when mapper properties or other ORM constructs wereadded 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 wherebydeserialize during pickle or deepcopy would fail to establish allattributes of an ORM collection, causing further mutation operations tofail.References: #3852

  • [orm] [bug]

Fixed long-standing bug where the “noload” relationship loadingstrategy would cause backrefs and/or back_populates options to beignored.References: #3845

engine

  • [engine] [bug]

Removed long-broken “default_schema_name()” method fromConnection. This method was left over from a very oldversion and was non-working (e.g. would raise). Pull requestcourtesy Benjamin Dopplinger.

sql

  • [sql] [bug]

Fixed bug where newly added warning for primary key on insert w/oautoincrement setting (see The .autoincrement directive is no longer implicitly enabled for a composite primary key column) would fail to emitcorrectly when invoked upon a lower-case table() 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 clauseof the DO UPDATE portion of PostgreSQL’s ON CONFLICT, however youcannot put the table name in the WHERE clause in the actual ONCONFLICT itself. This was an incorrect assumption, so that portionof the change in #3807 is rolled back.References: #3807, #3846

mysql

  • [mysql] [feature]

Added support for server side cursors to the mysqlclient andpymysql dialects. This feature is available via theConnection.execution_options.stream_results flag as wellas the server_side_cursors=True dialect argument in thesame way that it has been for psycopg2 on PostgreSQL. Pull requestcourtesy Roman Podoliaka.

  • [mysql] [bug]

MySQL’s native ENUM type supports any non-valid value being sent, andin response will return a blank string. A hardcoded rule to check for“is returning the blank string” has been added to the MySQLimplementation for ENUM so that this blank string is returned to theapplication rather than being rejected as a non-valid value. Note thatif your MySQL enum is linking values to objects, you still get theblank string back.References: #3841

sqlite

  • [sqlite] [bug]

Added quotes to the PRAGMA directives in the pysqlcipher dialectto support additional cipher arguments appropriately. Pull requestcourtesy Kevin Jurczyk.

  • [sqlite] [bug] [py3k]

Added an optional import for the pysqlcipher3 DBAPI when using thepysqlcipher dialect. This package will attempt to be importedif 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-workingadodbapi dialect) whereby a semicolon present in the passwordor username fields could be interpreted as a separator for anothertoken; the values are now quoted when semicolons are present.This change is also backported to: 1.0.16

References: #3762

1.1.3

Released: October 27, 2016

orm

  • [orm] [bug]

Fixed regression caused by #2677 whereby callingSession.delete() on an object that was already flushed asdeleted in that session would fail to set up the object in theidentity map (or reject the object), causing flush errors as theobject were in a state not accommodated by the unit of work.The pre-1.1 behavior in this case has been restored, which is thatthe object is put back into the identity map so that the DELETEstatement will be attempted again, which emits a warning that the numberof expected rows was not matched (unless the row were restored outsideof the session).References: #3839

  • [orm] [bug]

Fixed regression where some Query methods likeQuery.update() and others would fail if the Querywere against a series of mapped columns, rather than the mappedentity as a whole.References: #3836

sql

  • [sql] [bug]

Fixed bug involving new value translation and validation featurein Enum whereby using the enum object in a stringconcatenation would maintain the Enum type as the typeof the expression overall, producing missing lookups. A stringconcatenation against an Enum-typed column now usesString 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-definedTypeDecorator that was also itself an instance ofSchemaType (rather than the implementation being such)would cause the column attachment events to be skipped for thetype itself.References: #3832

postgresql

  • [postgresql] [bug]

PostgreSQL table reflection will ensure that theColumn.autoincrement flag is set to False when reflectinga primary key column that is not of an Integer datatype,even if the default is related to an integer-generating sequence.This can happen if a column is created as SERIAL and the datatypeis changed. The autoincrement flag can only be True if the datatypeis of integer affinity in the 1.1 series.References: #3835

1.1.2

Released: October 17, 2016

orm

  • [orm] [bug]

Fixed bug involving the rule to disable a joined collection eagerloader on the other side of a many-to-one lazy loader, first addedin #1495, where the rule would fail if the parent objecthad some other lazyloader-bound query options associated with it.References: #3824

  • [orm] [bug]

Fixed self-referential entity, deferred column loading issue in asimilar style as that of #3431, #3811 where an entityis present in multiple positions within the row due to self-referentialeager loading; when the deferred loader only applies to one of thepaths, the “present” column loader will now override the deferred non-load for that entity regardless of row ordering.References: #3822

sql

  • [sql] [bug]

Fixed a regression caused by a newly added function that performs the“wrap callable” function of sql DefaultGenerator objects,an attribute error raised for module when the default callablewas a functools.partial or other object that doesn’t have amodule attribute.References: #3823

  • [sql] [bug] [postgresql]

Fixed regression in Enum type where event handlers were nottransferred in the case of the type object being copied, due to aconflicting copy() method added as part of #3250. This copyoccurs normally in situations when the column is copied, such asin tometadata() or when using declarative mixins with columns. Theevent handler not being present would impact the constraint beingcreated for a non-native enumerated type, but more critically theENUM object on the PostgreSQL backend.References: #3827

postgresql

  • [postgresql] [bug] [sql]

Changed the naming convention used when generating bound parametersfor a multi-VALUES insert statement, so that the numbered parameternames don’t conflict with the anonymized parameters of a WHERE clause,as is now common in a PostgreSQL ON CONFLICT construct.References: #3828

1.1.1

Released: October 7, 2016

mssql

  • [mssql] [bug]

The “SELECT SERVERPROPERTY”query added in #3810 and #3814 is failing on unknowncombinations of Pyodbc and SQL Server. While failure of this functionwas anticipated, the exception catch was not broad enough so it nowcatches all forms of pyodbc.Error.References: #3820

misc

  • [bug] [core]

Changed the CompileError raised when various primary key missingsituations are detected to a warning. The statement is againpassed to the database where it will fail and the DBAPI error (usuallyIntegrityError) raises as usual.

See also

The .autoincrement directive is no longer implicitly enabled for a composite primary key column

References: #3216

1.1.0

Released: October 5, 2016

orm

  • [orm] [feature]

Enhanced the new “raise” lazy loader strategy to also include a“raise_on_sql” variant, available both via orm.relationship.lazyas well as orm.raiseload(). This variant only raises if thelazy load would actually emit SQL, vs. raising if the lazy loadermechanism is invoked at all.References: #3812

  • [orm] [feature]

The Query.group_by() method now resets the group by collectionif an argument of None is passed, in the same way thatQuery.order_by() has worked for a long time. Pull requestcourtesy Iuri Diniz.

  • [orm] [bug]

Fixed bug where joined eager loading would fail for a polymorphically-loaded mapper, where the polymorphic_on was set to an un-mappedexpression such as a CASE expression.This change is also backported to: 1.0.16

References: #3800

  • [orm] [bug]

Fixed bug where the ArgumentError raised for an invalid bindsent to a Session via Session.bind_mapper(),Session.bind_table(),or the constructor would fail to be correctly raised.This change is also backported to: 1.0.16

References: #3798

  • [orm] [bug]

Fixed bug in subquery eager loading where a subqueryloadof an “of_type()” object linked to a second subqueryload of a plainmapped class, or a longer chain of several “of_type()” attributes,would fail to link the joins correctly.This change is also backported to: 1.0.15

References: #3773, #3774

  • [orm] [bug]

ORM attributes can now be assigned any object that is has aclause_element() attribute, which will result in inlineSQL the way any ClauseElement class does. This covers othermapped attributes not otherwise transformed by further expressionconstructs.References: #3802

  • [orm] [bug]

Made an adjustment to the bug fix first introduced in [ticket:3431]that involves an object appearing in multiple contexts in a singleresult set, such that an eager loader that would set the relatedobject value to be None will still fire off, thus satisfying theload of that attribute. Previously, the adjustment only honoreda non-None value arriving for an eagerly loaded attribute in asecondary row.References: #3811

  • [orm] [bug]

Fixed bug in new SessionEvents.persistent_to_deleted() eventwhere the target object could be garbage collected before the eventis fired off.References: #3808

  • [orm] [bug]

The primaryjoin of a relationship() construct can now includea bindparam() object that includes a callable function togenerate values. Previously, the lazy loader strategy wouldbe incompatible with this use, and additionally would fail to correctlydetect if the “use_get” criteria should be used if the primary keywere involved with the bound parameter.References: #3767

  • [orm] [bug]

An UPDATE emitted from the ORM flush process can now accommodate aSQL expression element for a column within the primary key of anobject, if the target database supports RETURNING in order to providethe new value, or if the PK value is set “to itself” for the purposesof bumping some other trigger / onupdate on the column.References: #3801

  • [orm] [bug]

Fixed bug where the “simple many-to-one” condition that allows lazyloading to use get() from identity map would fail to be invoked if theprimaryjoin of the relationship had multiple clauses separated by ANDwhich were not in the same order as that of the primary key columnsbeing compared in each clause. This orderingdifference occurs for a composite foreign key where the table-boundcolumns on the referencing side were not in the same order in the .ccollection as the primary key columns on the referenced side….whichin turn occurs a lot if one is using declarative mixins and/ordeclared_attr to set up columns.References: #3788

  • [orm] [bug]

An exception is raised when two @validates decorators on a mappingmake use of the same name. Only one validator of a certain nameat a time is supported, there’s no mechanism to chain these together,as the order of the validators at the level of function decoratorcan’t be made deterministic.

See also

Same-named @validates decorators will now raise an exception

References: #3776

  • [orm] [bug]

Mapper errors raised during configure_mappers() now explicitlyinclude the name of the originating mapper in the exception messageto help in those situations where the wrapped exception does notitself include the source mapper. Pull request courtesyJohn Perkins.

  • [orm] [change]

Passing False to Query.order_by() in order to cancelall order by’s is deprecated; there is no longer any differencebetween calling this method with False or with None.

orm declarative

  • [change] [declarative] [orm]

Constructing a declarative base class that inherits from another classwill also inherit its docstring. This meansas_declarative() acts more like a normal classdecorator.

sql

  • [sql] [bug]

Fixed bug in Table where the internal method_reset_exported() would corrupt the state of the object. Thismethod is intended for selectable objects and is called by the ORMin some cases; an erroneous mapper configuration would could lead theORM to call this on a Table object.This change is also backported to: 1.0.15

References: #3755

  • [sql] [bug]

Execution options can now be propagated from within astatement at compile time to the outermost statement, so thatif an embedded element wants to set “autocommit” to be True for example,it can propagate this to the enclosing statement. Currently, thisfeature is enabled for a DML-oriented CTE embedded inside of a SELECTstatement, e.g. INSERT/UPDATE/DELETE inside of SELECT.References: #3805

  • [sql] [bug]

A string sent as a column default via theColumn.server_default parameter is now escaped for quotes.

See also

String server_default now literal quoted

References: #3809

  • [sql] [bug] [postgresql]

Added compiler-level flags used by PostgreSQL to place additionalparenthesis than would normally be generated by precedence rulesaround operations involving JSON, HSTORE indexing operators as well aswithin their operands since it has been observed that PostgreSQL’sprecedence rules for at least the HSTORE indexing operator is notconsistent between 9.4 and 9.5.References: #3806

  • [sql] [bug] [mysql]

The BaseException exception class is now intercepted by theexception-handling routines of Connection, and includeshandling by the handle_error()event. The Connection is now invalidated by default inthe case of a system level exception that is not a subclass ofException, including KeyboardInterrupt and the greenletGreenletExit class, to prevent further operations from occurringupon a database connection that is in an unknown and possiblycorrupted state. The MySQL drivers are most targeted by this changehowever the change is across all DBAPIs.

See also

Engines now invalidate connections, run error handlers for BaseException

References: #3803

  • [sql] [bug]

The “eq” and “ne” operators are no longer part of the list of“associative” operators, while they remain considered to be“commutative”. This allows an expression like (x == y) == zto be maintained at the SQL level with parenthesis. Pull requestcourtesy John Passaro.References: #3799

  • [sql] [bug]

Stringify of expression with unnamed Column objects, asoccurs in lots of situations including ORM error reporting,will now render the name in string context as “”rather than raising a compile error.References: #3789

  • [sql] [bug]

Raise a more descriptive exception / message when ClauseElementor non-SQLAlchemy objects that are not “executable” are erroneouslypassed to .execute(); a new exception ObjectNotExecutableErroris raised consistently in all cases.References: #3786

  • [sql] [bug] [mysql] [postgresql]

Fixed regression in JSON datatypes where the “literal processor” fora JSON index value would not be invoked. The native String and Integerdatatypes are now called upon from within the JSONIndexTypeand JSONPathType. This is applied to the generic, PostgreSQL, andMySQL JSON types and also has a dependency on #3766.References: #3765

  • [sql] [bug]

Fixed bug where Index would fail to extract columns fromcompound SQL expressions if those SQL expressions were wrapped insideof an ORM-style clause_element() construct. This bugexists in 1.0.x as well, however in 1.1 is more noticeable ashybrid_property @expression now returns a wrapped element.References: #3763

postgresql

  • [postgresql] [bug]

An adjustment to ON CONFLICT such that the “inserted_primary_key”logic is able to accommodate the case where there’s no INSERT orUPDATE and there’s no net change. The value comes out as Nonein this case, rather than failing on an exception.References: #3813

  • [postgresql] [bug]

Fixed issue in new PG “on conflict” construct where columns includingthose of the “excluded” namespace would not be table-qualifiedin the WHERE clauses in the statement.

References: #3807

mysql

  • [mysql] [bug]

Added support for parsing MySQL/Connector boolean and integerarguments within the URL query string: connection_timeout,connect_timeout, pool_size, get_warnings,raise_on_warnings, raw, consume_results, ssl_verify_cert, force_ipv6,pool_reset_session, compress, allow_local_infile, use_pure.This change is also backported to: 1.0.15

References: #3787

  • [mysql] [bug]

Fixed bug where the “literal_binds” flag would not be propagatedto a CAST expression under MySQL.References: #3766

mssql

  • [mssql] [bug]

Changed the query used to get “default schema name”, from one thatqueries the database principals table to using the“schema_name()” function, as issues have been reported that theformer system was unavailable on the Azure Data Warehouse edition.It is hoped that this will finally work across all SQL Serverversions and authentication styles.This change is also backported to: 1.0.16

References: #3810

  • [mssql] [bug]

Updated the server version info scheme for pyodbc to use SQL ServerSERVERPROPERTY(), rather than relying upon pyodbc.SQL_DBMS_VER, whichcontinues to be unreliable particularly with FreeTDS.This change is also backported to: 1.0.16

References: #3814

  • [mssql] [bug]

Added error code 20017 “unexpected EOF from the server” to the list ofdisconnect exceptions that result in a connection pool reset. Pullrequest courtesy Ken Robbins.This change is also backported to: 1.0.16

misc

  • [bug] [orm.declarative]

Fixed bug where setting up a single-table inh subclass of a joined-tablesubclass which included an extra column would corrupt the foreign keyscollection of the mapped table, thereby interfering with theinitialization of relationships.This change is also backported to: 1.0.16

References: #3797

1.1.0b3

Released: July 26, 2016

orm

  • [orm] [change]

Removed a warning that dates back to 0.4 which emits when a same-namedrelationship is placed on two mappers that inherits via joined orsingle table inheritance. The warning does not apply to thecurrent unit of work implementation.

See also

Same-named relationships on inheriting mappers no longer warn

References: #3749

sql

  • [sql] [bug]

Fixed bug in new CTE feature for update/insert/delete statedas a CTE inside of an enclosing statement (typically SELECT) wherebyoninsert and onupdate values weren’t called upon for the embeddedstatement.References: #3745

  • [sql] [bug]

Fixed bug in new CTE feature for update/insert/delete wherebyan anonymous (e.g. no name passed) CTE construct aroundthe statement would fail.References: #3744

postgresql

  • [postgresql] [bug]

Fixed bug whereby TypeDecorator and Varianttypes were not deeply inspected enough by the PostgreSQL dialectto determine if SMALLSERIAL or BIGSERIAL needed to be renderedrather than SERIAL.This change is also backported to: 1.0.14

References: #3739

oracle

  • [oracle] [bug]

Fixed bug in Select.with_for_update.of, where the Oracle“rownum” approach to LIMIT/OFFSET would fail to accommodate for theexpressions inside the “OF” clause, which must be stated at the topmostlevel referring to expression within the subquery. The expressions arenow added to the subquery if needed.This change is also backported to: 1.0.14

References: #3741

misc

  • [feature] [ext]

Added a “default” parameter to the new sqlalchemy.ext.indexableextension.

  • [bug] [ext]

Fixed bug in sqlalchemy.ext.baked where the unbaking of asubquery eager loader query would fail due to a variable scopingissue, when multiple subquery loaders were involved. Pull requestcourtesy Mark Hahnenberg.This change is also backported to: 1.0.15

References: #3743

  • [bug] [ext]

sqlalchemy.ext.indexable will intercept IndexError as wellas KeyError when raising as AttributeError.

1.1.0b2

Released: July 1, 2016

sql

  • [sql] [bug]

Fixed issue in SQL math negation operator where the type of theexpression would no longer be the numeric type of the original.This would cause issues where the type determined result setbehaviors.This change is also backported to: 1.0.14

References: #3735

  • [sql] [bug]

Fixed bug whereby the getstate / setstatemethods for sqlalchemy.util.Properties werenon-working due to the transition in the 1.0 series to slots.The issue potentially impacted some third-party applications.Pull request courtesy Pieter Mulder.This change is also backported to: 1.0.14

References: #3728

  • [sql] [bug]

The processing performed by the Boolean datatype for backendsthat only feature integer types has been made consistent between thepure Python and C-extension versions, in that the C-extension versionwill accept any integer value from the database as a boolean, not justzero and one; additionally, non-boolean integer values being sent tothe database are coerced to exactly zero or one, instead of beingpassed as the original integer value.

See also

Non-native boolean integer values coerced to zero/one/None in all cases

References: #3730

  • [sql] [bug]

Rolled back the validation rules a bit in Enum to allowunknown string values to pass through, unless the flagvalidate_string=True is passed to the Enum; any other kind of object isstill of course rejected. While the immediate useis to allow comparisons to enums with LIKE, the fact that thisuse exists indicates there may be more unknown-string-comparison usecases than we expected, which hints that perhaps there are someunknown string-INSERT cases too.References: #3725

postgresql

  • [postgresql] [bug] [ext]

Made a slight behavioral change in the sqlalchemy.ext.compilerextension, whereby the existing compilation schemes for an establishedconstruct would be removed if that construct itself didn’t alreadyhave its own dedicated visit_name. This was arare occurrence in 1.0, however in 1.1 postgresql.ARRAYsubclasses sqltypes.ARRAY and has this behavior.As a result, setting up a compilation handler for another dialectsuch as SQLite would render the main postgresql.ARRAYobject no longer compilable.References: #3732

mysql

  • [mysql] [bug]

Dialed back the “order the primary key columns per auto-increment”described in No more generation of an implicit KEY for composite primary key w/ AUTO_INCREMENT a bit, so that if thePrimaryKeyConstraint is explicitly defined, the orderof columns is maintained exactly, allowing control of this behaviorwhen necessary.References: #3726

1.1.0b1

Released: June 16, 2016

orm

  • [orm] [feature] [ext]

A new ORM extension Indexable is added, which allowsconstruction of Python attributes which refer to specific elementsof “indexed” structures such as arrays and JSON fields. Pull requestcourtesy Jeong YunWon.

See also

New Indexable ORM extension

  • [orm] [feature]

Added new flag Session.bulk_insert_mappings.render_nullswhich allows an ORM bulk INSERT to occur with NULL values rendered;this bypasses server side defaults, however allows all statementsto be formed with the same set of columns, allowing them to bebatched. Pull request courtesy Tobias Sauerwein.

  • [orm] [feature]

Added new event AttributeEvents.init_scalar(), as wellas a new example suite illustrating its use. This event can be usedto provide a Core-generated default value to a Python-side attributebefore the object is persisted.

See also

New init_scalar() event intercepts default values at ORM level

References: #1311

  • [orm] [feature]

Added AutomapBase.prepare.schema to theAutomapBase.prepare() method, to indicate which schematables should be reflected from if not the default schema.Pull request courtesy Josh Marlow.

  • [orm] [feature]

Added new parameter orm.mapper.passive_deletes toavailable mapper options. This allows a DELETE to proceedfor a joined-table inheritance mapping against the base table only,while allowing for ON DELETE CASCADE to handle deleting the rowfrom the subclass tables.

See also

passive_deletes feature for joined-inheritance mappings

References: #2349

  • [orm] [feature]

Calling str() on a core SQL construct has been made more “friendly”,when the construct contains non-standard SQL elements such asRETURNING, array index operations, or dialect-specific or customdatatypes. A string is now returned in these cases rendering anapproximation of the construct (typically the PostgreSQL-styleversion of it) rather than raising an error.

See also

“Friendly” stringification of Core SQL constructs without a dialect

References: #3631

  • [orm] [feature]

The str() call for Query will now take into accountthe Engine to which the Session is bound, whengenerating the string form of the SQL, so that the actual SQLthat would be emitted to the database is shown, if possible. Previously,only the engine associated with the MetaData to which themappings are associated would be used, if present. Ifno bind can be located either on the Session or onthe MetaData to which the mappings are associated, thenthe “default” dialect is used to render the SQL, as was the casepreviously.

See also

Stringify of Query will consult the Session for the correct dialect

References: #3081

  • [orm] [feature]

The SessionEvents suite now includes events to allowunambiguous tracking of all object lifecycle state transitionsin terms of the Session itself, e.g. pending,transient, persistent, detached. The state of the objectwithin each event is also defined.

See also

New Session lifecycle events

References: #2677

  • [orm] [feature]

Added a new session lifecycle state deleted. This new staterepresents an object that has been deleted from the persistentstate and will move to the detached state once the transactionis committed. This resolves the long-standing issue that objectswhich were deleted existed in a gray area between persistent anddetached. The InstanceState.persistent accessor willno longer report on a deleted object as persistent; theInstanceState.deleted accessor will instead be True forthese objects, until they become detached.

See also

New Session lifecycle events

References: #2677

  • [orm] [feature]

Added new checks for the common error case of passing mapped classesor mapped instances into contexts where they are interpreted asSQL bound parameters; a new exception is raised for this.

See also

Specific checks added for passing mapped classes, instances as SQL literals

References: #3321

  • [orm] [feature]

Added new relationship loading strategy orm.raiseload() (alsoaccessible via lazy='raise'). This strategy behaves almost likeorm.noload() but instead of returning None it raises anInvalidRequestError. Pull request courtesy Adrian Moennich.

See also

New “raise” / “raise_on_sql” loader strategies

References: #3512

  • [orm] [bug]

Fixed an issue where a many-to-one change of an object from oneparent to another could work inconsistently when combined withan un-flushed modification of the foreign key attribute. The attributemove now considers the database-committed value of the foreign keyin order to locate the “previous” parent of the object beingmoved. This allows events to fire off correctly includingbackref events. Previously, these events would not always fire.Applications which may have relied on the previously brokenbehavior may be affected.

See also

Fix involving many-to-one object moves with user-initiated foreign key manipulations

References: #3708

  • [orm] [bug]

Fixed bug where deferred columns would inadvertently be set upfor database load on the next object-wide unexpire, when the objectwere merged into the session with session.merge(obj, load=False).References: #3488

  • [orm] [bug] [mysql]

Further continuing on the common MySQL exception case ofa savepoint being cancelled first covered in #2696,the failure mode in which the Session is placed when aSAVEPOINT vanishes before rollback has been improved to allow theSession to still function outside of that savepoint.It is assumed that the savepoint operation failed and was cancelled.

See also

Improved Session state when a SAVEPOINT is cancelled by the database

References: #3680

  • [orm] [bug]

Fixed bug where a newly inserted instance that is rolled backwould still potentially cause persistence conflicts on the nexttransaction, because the instance would not be checked that itwas expired. This fix will resolve a large class of cases thaterroneously cause the “New instance with identity X conflicts withpersistent instance Y” error.

See also

Erroneous “new instance X conflicts with persistent instance Y” flush errors fixed

References: #3677

  • [orm] [bug]

An improvement to the workings of Query.correlate() suchthat when a “polymorphic” entity is used which represents a straightjoin of several tables, the statement will ensure that all thetables within the join are part of what’s correlating.

See also

Improvements to the Query.correlate method with polymorphic entities

References: #3662

  • [orm] [bug]

Fixed bug which would cause an eagerly loaded many-to-one attributeto not be loaded, if the joined eager load were from a row where thesame entity were present multiple times, some calling for the attributeto be eagerly loaded and others not. The logic here is revised totake in the attribute even though a different loader path hashandled the parent entity already.

See also

Joined eager loading where the same entity is present multiple times in one row

References: #3431

  • [orm] [bug]

A refinement to the logic which adds columns to the resulting SQL whenQuery.distinct() is combined with Query.order_by() suchthat columns which are already present will not be addeda second time, even if they are labeled with a different name.Regardless of this change, the extra columns added to the SQL havenever been returned in the final result, so this change only impactsthe string form of the statement as well as its behavior when used ina Core execution context. Additionally, columns are no longer addedwhen the DISTINCT ON format is used, provided the query is notwrapped inside a subquery due to joined eager loading.

See also

Columns no longer added redundantly with DISTINCT + ORDER BY

References: #3641

  • [orm] [bug]

Fixed issue where two same-named relationships that refer toa base class and a concrete-inherited subclass would raise an errorif those relationships were set up using “backref”, while setting up theidentical configuration using relationship() instead with the conflictingnames would succeed, as is allowed in the case of a concrete mapping.

See also

Same-named backrefs will not raise an error when applied to concrete inheritance subclasses

References: #3630

  • [orm] [bug]

The Session.merge() method now tracks pending objects byprimary key before emitting an INSERT, and merges distinct objects withduplicate primary keys together as they are encountered, which isessentially semi-deterministic at best. This behaviormatches what happens already with persistent objects.

See also

Session.merge resolves pending conflicts the same as persistent

References: #3601

  • [orm] [bug]

Fixed bug where the “single table inheritance” criteria would beadded onto the end of a query in some inappropriate situations, suchas when querying from an exists() of a single-inheritance subclass.

See also

Further Fixes to single-table inheritance querying

References: #3582

  • [orm] [bug]

Added a new type-level modifier TypeEngine.evaluates_none()which indicates to the ORM that a positive set of None should bepersisted as the value NULL, instead of omitting the column fromthe INSERT statement. This feature is used both as part of theimplementation for #3514 as well as a standalone featureavailable on any type.

See also

New options allowing explicit persistence of NULL over a default

References: #3250

  • [orm] [bug]

Internal calls to “bookkeeping” functions withinSession.bulk_save_objects() and related bulk methods havebeen scaled back to the extent that this functionality is notcurrently used, e.g. checks for column default values to befetched after an INSERT or UPDATE statement.References: #3526

  • [orm] [bug] [postgresql]

Additional fixes have been made regarding the value of Nonein conjunction with the PostgreSQL postgresql.JSON type. Whenthe JSON.none_as_null flag is left at its defaultvalue of False, the ORM will now correctly insert the JSON“‘null’” string into the column whenever the value on the ORMobject is set to the value None or when the value Noneis used with Session.bulk_insert_mappings(),including if the column has a default or server default on it.

See also

JSON “null” is inserted as expected with ORM operations, omitted when not present

New options allowing explicit persistence of NULL over a default

References: #3514

  • [orm] [change]

The Mapper.order_by parameter is deprecated.This is an old parameter no longer relevant to how SQLAlchemyworks, once the Query object was introduced. By deprecating itwe establish that we aren’t supporting non-working use casesand that we encourage applications to move off of the use of thisparameter.

See also

Mapper.order_by is deprecated

References: #3394

  • [orm] [change]

The Session.weak_identity_map parameter is deprecated.See the new recipe at Session Referencing Behavior foran event-based approach to maintaining strong identity map behavior.

See also

New Session lifecycle events

References: #2677

engine

  • [engine] [feature]

Added connection pool events ConnectionEvents.close(),ConnectionEvents.detach(),ConnectionEvents.close_detached().

  • [engine] [feature]

All string formatting of bound parameter sets and result rows forlogging, exception, and repr() purposes now truncate very largescalar values within each collection, including an“N characters truncated”notation, similar to how the display for large multiple-parameter setsare themselves truncated.

See also

Large parameter and row values are now truncated in logging and exception displays

References: #2837

  • [engine] [feature]

Multi-tenancy schema translation for Table objects is added.This supports the use case of an application that uses the same set ofTable objects in many schemas, such as schema-per-user.A new execution optionConnection.execution_options.schema_translate_map isadded.

See also

Multi-Tenancy Schema Translation for Table objects

References: #2685

  • [engine] [feature]

Added a new entrypoint system to the engine to allow “plugins” tobe stated in the query string for a URL. Custom plugins canbe written which will be given the chance up front to alter and/orconsume the engine’s URL and keyword arguments, and then at enginecreate time will be given the engine itself to allow additionalmodifications or event registration. Plugins are written as asubclass of CreateEnginePlugin; see that class fordetails.References: #3536

sql

  • [sql] [feature]

Added TABLESAMPLE support via the new FromClause.tablesample()method and standalone function. Pull request courtesy Ilja Everilä.

See also

Support for TABLESAMPLE

References: #3718

  • [sql] [feature]

Added support for ranges in window functions, using theexpression.over.range_ andexpression.over.rows parameters.

See also

Support for RANGE and ROWS specification within window functions

References: #3049

  • [sql] [feature]

Implemented reflection of CHECK constraints for SQLite and PostgreSQL.This is available via the new inspector methodInspector.get_check_constraints() as well as when reflectingTable objects in the form of CheckConstraintobjects present in the constraints collection. Pull request courtesyAlex Grönholm.

  • [sql] [feature]

New ColumnOperators.is_distinct_from() andColumnOperators.isnot_distinct_from() operators; pull requestcourtesy Sebastian Bank.

See also

Support for IS DISTINCT FROM and IS NOT DISTINCT FROM

  • [sql] [feature]

Added a hook in DDLCompiler.visit_create_table() calledDDLCompiler.create_table_suffix(), allowing custom dialectsto add keywords after the “CREATE TABLE” clause. Pull requestcourtesy Mark Sandan.

  • [sql] [feature]

Negative integer indexes are now accommodated by rowsreturned from a ResultProxy. Pull request courtesyEmanuele Gaifas.

See also

Negative integer indexes accommodated by Core result rows

  • [sql] [feature]

Added Select.lateral() and related constructs to allowfor the SQL standard LATERAL keyword, currently only supportedby PostgreSQL.

See also

Support for the SQL LATERAL keyword

References: #2857

  • [sql] [feature]

Added support for rendering “FULL OUTER JOIN” to both Core and ORM.Pull request courtesy Stefan Urbanek.

See also

Core and ORM support for FULL OUTER JOIN

References: #1957

  • [sql] [feature]

CTE functionality has been expanded to support all DML, allowingINSERT, UPDATE, and DELETE statements to both specify their ownWITH clause, as well as for these statements themselves to beCTE expressions when they include a RETURNING clause.

See also

CTE Support for INSERT, UPDATE, DELETE

References: #2551

  • [sql] [feature]

Added support for PEP-435-style enumerated classes, namelyPython 3’s enum.Enum class but also including compatibleenumeration libraries, to the types.Enum datatype.The types.Enum datatype now also performs in-Python validationof incoming values, and adds an option to forego creating theCHECK constraint Enum.create_constraint.Pull request courtesy Alex Grönholm.

See also

Support for Python’s native enum type and compatible forms

The Enum type now does in-Python validation of values

References: #3095, #3292

  • [sql] [feature]

A deep improvement to the recently added TextClause.columns()method, and its interaction with result-row processing, now allowsthe columns passed to the method to be positionally matched with theresult columns in the statement, rather than matching on name alone.The advantage to this includes that when linking a textual SQL statementto an ORM or Core table model, no system of labeling or de-duping ofcommon column names needs to occur, which also means there’s no needto worry about how label names match to ORM columns and so-forth. Inaddition, the ResultProxy has been further enhanced tomap column and string keys to a row with greater precision in somecases.

See also

ResultSet column matching enhancements; positional column setup for textual SQL - feature overview

TextClause.columns() will match columns positionally, not by name, when passed positionally - backwards compatibility remarks

References: #3501

  • [sql] [feature]

Added a new type to core types.JSON. This is thebase of the PostgreSQL postgresql.JSON type as well as thatof the new mysql.JSON type, so that a PG/MySQL-agnosticJSON column may be used. The type features basic index and pathsearching support.

See also

JSON support added to Core

References: #3619

  • [sql] [feature]

Added support for “set-aggregate” functions of the form<function> WITHIN GROUP (ORDER BY <criteria>), using themethod FunctionElement.within_group(). A series of commonset-aggregate functions with return types derived from the set havebeen added. This includes functions like percentile_cont,dense_rank and others.

See also

New Function features, “WITHIN GROUP”, array_agg and set aggregate functions

References: #1370

  • [sql] [feature] [postgresql]

Added support for the SQL-standard function array_agg,which automatically returns an postgresql.ARRAY of the correct typeand supports index / slice operations, as well aspostgresql.array_agg(), which returns a postgresql.ARRAYwith additional comparison features. As arrays are onlysupported on PostgreSQL at the moment, only actually works onPostgreSQL. Also added a new constructpostgresql.aggregate_order_by in support of PG’s“ORDER BY” extension.

See also

New Function features, “WITHIN GROUP”, array_agg and set aggregate functions

References: #3132

  • [sql] [feature]

Added a new type to core types.ARRAY. This is thebase of the PostgreSQL postgresql.ARRAY type, and is now part of Coreto begin supporting various SQL-standard array-supporting featuresincluding some functions and eventual support for native arrayson other databases that have an “array” concept, such as DB2 or Oracle.Additionally, new operators expression.any_() andexpression.all_() have been added. These support not justarray constructs on PostgreSQL, but also subqueries that are usableon MySQL (but sadly not on PostgreSQL).

See also

Array support added to Core; new ANY and ALL operators

References: #3516

  • [sql] [bug]

FromClause.count() is deprecated. This function makes use ofan arbitrary column in the table and is not reliable; for Core use,func.count() should be preferred.References: #3724

  • [sql] [bug]

Fixed an assertion that would raise somewhat inappropriatelyif a Index were associated with a Column thatis associated with a lower-case-t TableClause; theassociation should be ignored for the purposes of associatingthe index with a Table.References: #3616

  • [sql] [bug]

The type_coerce() construct is now a fully fledged Coreexpression element which is late-evaluated at compile time. Previously,the function was only a conversion function which would handle differentexpression inputs by returning either a Label of a column-orientedexpression or a copy of a given BindParameter object,which in particular prevented the operation from being logicallymaintained when an ORM-level expression transformation would converta column to a bound parameter (e.g. for lazy loading).

See also

The type_coerce function is now a persistent SQL element

References: #3531

  • [sql] [bug]

The TypeDecorator type extender will now work in conjunctionwith a SchemaType implementation, typically Enumor Boolean with regards to ensuring that the per-tableevents are propagated from the implementation type to the outer type.These events are usedto ensure that the constraints or PostgreSQL types (e.g. ENUM)are correctly created (and possibly dropped) along with the parenttable.

See also

TypeDecorator now works with Enum, Boolean, “schema” types automatically

References: #2919

  • [sql] [bug]

The behavior of the union() construct and related constructssuch as Query.union() now handle the case where the embeddedSELECT statements need to be parenthesized due to the fact that theyinclude LIMIT, OFFSET and/or ORDER BY. These queries do not workon SQLite, and will fail on that backend as they did before, butshould now work on all other backends.

See also

A UNION or similar of SELECTs with LIMIT/OFFSET/ORDER BY now parenthesizes the embedded selects

References: #2528

  • [sql] [change] [mysql]

The system by which a Column considers itself to be an“auto increment” column has been changed, such that autoincrementis no longer implicitly enabled for a Table that has acomposite primary key. In order to accommodate being able to enableautoincrement for a composite PK member column while at the same timemaintaining SQLAlchemy’s long standing behavior of enablingimplicit autoincrement for a single integer primary key, a thirdstate has been added to the Column.autoincrement parameter"auto", which is now the default.

See also

The .autoincrement directive is no longer implicitly enabled for a composite primary key column

No more generation of an implicit KEY for composite primary key w/ AUTO_INCREMENT

References: #3216

schema

  • [schema] [enhancement]

The default generation functions passed to Column objectsare now run through “update_wrapper”, or an equivalent functionif a callable non-function is passed, so that introspection toolspreserve the name and docstring of the wrapped function. Pullrequest courtesy hsum.

postgresql

  • [postgresql] [feature]

Added support for PostgreSQL’s INSERT..ON CONFLICT using a newPostgreSQL-specific postgresql.dml.Insert object.Pull request and extensive efforts here by Robin Thomas.

See also

Support for INSERT..ON CONFLICT (DO UPDATE | DO NOTHING)

References: #3529

  • [postgresql] [feature]

The DDL for DROP INDEX will emit “CONCURRENTLY” if thepostgresql_concurrently flag is set upon theIndex and if the database in use is detected asPostgreSQL version 9.2 or greater. For CREATE INDEX, databaseversion detection is also added which will omit the clause ifPG version is less than 8.2. Pull request courtesy Iuri de Silvio.

  • [postgresql] [feature]

Added new parameter PGInspector.get_view_names.include,allowing specification for what kinds of views should be returned.Currently “plain” and “materialized” views are included. Pullrequest courtesy Sebastian Bank.References: #3588

  • [postgresql] [feature]

Added postgresql_tablespace as an argument to Indexto allow specification of TABLESPACE for an index in PostgreSQL.Complements the same-named parameter on Table. Pullrequest courtesy Benjamin Bertrand.References: #3720

  • [postgresql] [feature]

Added new parameterGenerativeSelect.with_for_update.key_share, whichwill render the FOR NO KEY UPDATE version of FOR UPDATEand FOR KEY SHARE instead of FOR SHAREon the PostgreSQL backend. Pull request courtesy Sergey Skopin.

  • [postgresql] [feature] [oracle]

Added new parameterGenerativeSelect.with_for_update.skip_locked, whichwill render the SKIP LOCKED phrase for a FOR UPDATE orFOR SHARE lock on the PostgreSQL and Oracle backends. Pullrequest courtesy Jack Zhou.

  • [postgresql] [feature]

Added a new dialect for the PyGreSQL PostgreSQL dialect. Thanksto Christoph Zwerschke and Kaolin Imago Fire for their efforts.

  • [postgresql] [feature]

Added a new constant postgresql.JSON.NULL, indicatingthat the JSON NULL value should be used for a valueregardless of other settings.

See also

New JSON.NULL Constant Added

References: #3514

  • [postgresql] [bug]

Added support for reflecting the source of materialized viewsto the PostgreSQL version of the Inspector.get_view_definition()method.References: #3587

  • [postgresql] [bug]

The use of a postgresql.ARRAY object that refersto a types.Enum or postgresql.ENUM subtypewill now emit the expected “CREATE TYPE” and “DROP TYPE” DDL whenthe type is used within a “CREATE TABLE” or “DROP TABLE”.

See also

ARRAY with ENUM will now emit CREATE TYPE for the ENUM

References: #2729

  • [postgresql] [bug]

The “hashable” flag on special datatypes such as postgresql.ARRAY,postgresql.JSON and postgresql.HSTORE is nowset to False, which allows these types to be fetchable in ORMqueries that include entities within the row.

See also

Changes regarding “unhashable” types, impacts deduping of ORM rows

ARRAY and JSON types now correctly specify “unhashable”

References: #3499

  • [postgresql] [bug]

The PostgreSQL postgresql.ARRAY type now supports multidimensionalindexed access, e.g. expressions such as somecol[5][6] withoutany need for explicit casts or type coercions, providedthat the postgresql.ARRAY.dimensions parameter is set to thedesired number of dimensions.

See also

Correct SQL Types are Established from Indexed Access of ARRAY, JSON, HSTORE

References: #3487

  • [postgresql] [bug]

The return type for the postgresql.JSON and postgresql.JSONBwhen using indexed access has been fixed to work like PostgreSQL itself,and returns an expression that itself is of type postgresql.JSONor postgresql.JSONB. Previously, the accessor would returnNullType which disallowed subsequent JSON-like operators to beused.

See also

Correct SQL Types are Established from Indexed Access of ARRAY, JSON, HSTORE

References: #3503

  • [postgresql] [bug]

The postgresql.JSON, postgresql.JSONB andpostgresql.HSTORE datatypes now allow full control over thereturn type from an indexed textual access operation, either column[someindex].astextfor a JSON type or column[someindex] for an HSTORE type,via the postgresql.JSON.astext_type andpostgresql.HSTORE.text_type parameters.

See also

Correct SQL Types are Established from Indexed Access of ARRAY, JSON, HSTORE

References: #3503

  • [postgresql] [bug]

The postgresql.JSON.Comparator.astext modifier no longercalls upon ColumnElement.cast() implicitly, as PG’s JSON/JSONBtypes allow cross-casting between each other as well. Code thatmakes use of ColumnElement.cast() on JSON indexed access,e.g. col[someindex].cast(Integer), will need to be changedto call postgresql.JSON.Comparator.astext explicitly.

See also

The JSON cast() operation now requires .astext is called explicitly

References: #3503

  • [postgresql] [change]

The sqlalchemy.dialects.postgres module, long deprecated, isremoved; this has emitted a warning for many years and projectsshould be calling upon sqlalchemy.dialects.postgresql.Engine URLs of the form postgres:// will still continue to function,however.

mysql

  • [mysql] [feature]

Added support for “autocommit” on MySQL drivers, via theAUTOCOMMIT isolation level setting. Pull request courtesyRoman Podoliaka.

See also

Added support for AUTOCOMMIT “isolation level”

References: #3332

  • [mysql] [feature]

Added mysql.JSON for MySQL 5.7. The JSON type providespersistence of JSON values in MySQL as well as basic operator supportof “getitem” and “getpath”, making use of the JSON_EXTRACTfunction in order to refer to individual paths in a JSON structure.

See also

MySQL JSON Support

References: #3547

  • [mysql] [change]

The MySQL dialect no longer generates an extra “KEY” directive whengenerating CREATE TABLE DDL for a table using InnoDB with acomposite primary key with AUTO_INCREMENT on a column that isn’t thefirst column; to overcome InnoDB’s limitation here, the PRIMARY KEYconstraint is now generated with the AUTO_INCREMENT column placedfirst in the list of columns.

See also

No more generation of an implicit KEY for composite primary key w/ AUTO_INCREMENT

The .autoincrement directive is no longer implicitly enabled for a composite primary key column

References: #3216

sqlite

  • [sqlite] [feature]

The SQLite dialect now reflects ON UPDATE and ON DELETE phraseswithin foreign key constraints. Pull request courtesyMichal Petrucha.

  • [sqlite] [feature]

The SQLite dialect now reflects the names of primary key constraints.Pull request courtesy Diana Clarke.

See also

Reflection of the name of PRIMARY KEY constraints

References: #3629

  • [sqlite] [bug]

The workaround for right-nested joins on SQLite, where they are rewrittenas subqueries in order to work around SQLite’s lack of support for thissyntax, is lifted when SQLite version 3.7.16 or greater is detected.

See also

Right-nested join workaround lifted for SQLite version 3.7.16

References: #3634

  • [sqlite] [bug]

The workaround for SQLite’s unexpected delivery of column names astablename.columnname for some kinds of queries is now disabledwhen SQLite version 3.10.0 or greater is detected.

See also

Dotted column names workaround lifted for SQLite version 3.10.0

References: #3633

  • [sqlite] [change]

Added support to the SQLite dialect for theInspector.get_schema_names() method to work with SQLite;pull request courtesy Brian Van Klaveren. Also repaired supportfor creation of indexes with schemas as well as reflection offoreign key constraints in schema-bound tables.

See also

Improved Support for Remote Schemas

mssql

  • [mssql] [feature]

The mssql_clustered flag available on UniqueConstraint,PrimaryKeyConstraint, Index now defaults toNone, and can be set to False which will render the NONCLUSTEREDkeyword in particular for a primary key, allowing a different index tobe used as “clustered”. Pull request courtesy Saulius Žemaitaitis.

  • [mssql] [feature]

Added basic isolation level support to the SQL Server dialectsvia create_engine.isolation_level andConnection.execution_options.isolation_levelparameters.

See also

Added transaction isolation level support for SQL Server

References: #3534

  • [mssql] [bug]

Adjustments to the mxODBC dialect to make use of the BinaryNullsymbol when appropriate in conjunction with the VARBINARYdata type. Pull request courtesy Sheila Allen.

  • [mssql] [bug]

Fixed issue where the SQL Server dialect would reflect a string-or other variable-length column type with unbounded lengthby assigning the token "max" to thelength attribute of the string. While using the "max" tokenexplicitly is supported by the SQL Server dialect, it isn’t partof the normal contract of the base string types, and instead thelength should just be left as None. The dialect now assigns thelength to None on reflection of the type so that the type behavesnormally in other contexts.

See also

String / varlength types no longer represent “max” explicitly on reflection

References: #3504

  • [mssql] [change]

The legacy_schema_aliasing flag, introduced in version 1.0.5as part of #3424 to allow disabling of the MSSQL dialect’sattempts to create aliases for schema-qualified tables, now defaultsto False; the old behavior is now disabled unless explicitly turned on.

See also

The legacy_schema_aliasing flag is now set to False

References: #3434

misc

  • [feature] [ext]

Added MutableSet and MutableList helper classesto the Mutation Tracking extension. Pull request courtesyJeong YunWon.References: #3297

  • [bug] [ext]

The docstring specified on a hybrid property or method is now honoredat the class level, allowing it to work with tools like Sphinxautodoc. The mechanics here necessarily involve some wrapping ofexpressions to occur for hybrid properties, which may cause themto appear differently using introspection.

See also

Hybrid properties and methods now propagate the docstring as well as .info

References: #3653

  • [bug] [sybase]

The unsupported Sybase dialect now raises NotImplementedErrorwhen attempting to compile a query that includes “offset”; Sybasehas no straightforward “offset” feature.References: #2278