github sqlalchemy/sqlalchemy rel_1_2_3
1.2.3

1.2.3

Released: February 16, 2018

  • [bug] [postgresql] Added "SSL SYSCALL error: Operation timed out" to the list
    of messages that trigger a "disconnect" scenario for the
    psycopg2 driver. Pull request courtesy André Cruz.

    This change is also backported to: 1.1.16

  • [bug] [orm] Fixed issue in post_update feature where an UPDATE is emitted
    when the parent object has been deleted but the dependent object
    is not. This issue has existed for a long time however
    since 1.2 now asserts rows matched for post_update, this
    was raising an error.

    This change is also backported to: 1.1.16

    References: #4187

  • [bug] [orm] Fixed regression caused by fix for issue #4116 affecting versions
    1.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 class
    in some declarative mixin/inheritance situations as well as if the
    association proxy were accessed off of an un-mapped class. The "figure out
    the owner" logic has been replaced by an in-depth routine that searches
    through the complete mapper hierarchy assigned to the class or subclass to
    determine the correct (we hope) match; will not assign the owner if no
    match is found. An exception is now raised if the proxy is used
    against an un-mapped instance.

    This change is also backported to: 1.1.16

    References: #4185

  • [bug] [postgresql] Added "TRUNCATE" to the list of keywords accepted by the
    PostgreSQL dialect as an "autocommit"-triggering keyword.
    Pull request courtesy Jacob Hayes.

    This change is also backported to: 1.1.16

  • [bug] [pool] Fixed a fairly serious connection pool bug where a connection that is
    acquired after being refreshed as a result of a user-defined
    DisconnectionError or due to the 1.2-released "pre_ping" feature
    would not be correctly reset if the connection were returned to the pool by
    weakref cleanup (e.g. the front-facing object is garbage collected); the
    weakref would still refer to the previously invalidated DBAPI connection
    which would have the reset operation erroneously called upon it instead.
    This would lead to stack traces in the logs and a connection being checked
    into the pool without being reset, which can cause locking issues.

    This change is also backported to: 1.1.16

    References: #4184

  • [bug] [oracle] Fixed bug in cx_Oracle disconnect detection, used by pre_ping and other
    features, where an error could be raised as DatabaseError which includes a
    numeric error code; previously we weren't checking in this case for a
    disconnect code.

    References: #4182

  • [bug] [sqlite] Fixed the import error raised when a platform
    has neither pysqlite2 nor sqlite3 installed, such
    that the sqlite3-related import error is raised,
    not the pysqlite2 one which is not the actual
    failure mode. Pull request courtesy Robin.

  • [bug] [orm] Fixed bug where the Bundle object did not
    correctly report upon the primary Mapper object
    represented by the bundle, if any. An immediate
    side effect of this issue was that the new selectinload
    loader strategy wouldn't work with the horizontal sharding
    extension.

    References: #4175

  • [bug] [sql] Fixed bug where the Enum type wouldn't handle
    enum "aliases" correctly, when more than one key refers to the
    same value. Pull request courtesy Daniel Knell.

    References: #4180

  • [bug] [engine] Fixed bug where events associated with an Engine
    at the class level would be doubled when the
    Engine.execution_options() method were used. To
    achieve this, the semi-private class OptionEngine
    no longer accepts events directly at the class level
    and will raise an error; the class only propagates class-level
    events from its parent Engine. Instance-level
    events continue to work as before.

    References: #4181

  • [bug] [tests] A test added in 1.2 thought to confirm a Python 2.7 behavior turns out to
    be confirming the behavior only as of Python 2.7.8. Python bug #8743 still
    impacts set comparison in Python 2.7.7 and earlier, so the test in question
    involving AssociationSet no longer runs for these older Python 2.7
    versions.

    References: #3265

  • [feature] [oracle] The ON DELETE options for foreign keys are now part of
    Oracle reflection. Oracle does not support ON UPDATE
    cascades. Pull request courtesy Miroslav Shubernetskiy.

  • [bug] [orm] Fixed bug in concrete inheritance mapping where user-defined
    attributes such as hybrid properties that mirror the names
    of mapped attributes from sibling classes would be overwritten by
    the mapper as non-accessible at the instance level. Additionally
    ensured that user-bound descriptors are not implicitly invoked at the class
    level during the mapper configuration stage.

    References: #4188

  • [bug] [orm] Fixed bug where the orm.reconstructor() event
    helper would not be recognized if it were applied to the
    __init__() method of the mapped class.

    References: #4178

  • [bug] [engine] The URL object now allows query keys to be specified multiple
    times where their values will be joined into a list. This is to support
    the plugins feature documented at CreateEnginePlugin which
    documents that "plugin" can be passed multiple times. Additionally, the
    plugin names can be passed to create_engine() outside of the URL
    using the new create_engine.plugins parameter.

    References: #4170

  • [feature] [sql] Added support for Enum to persist the values of the enumeration,
    rather than the keys, when using a Python pep-435 style enumerated object.
    The user supplies a callable function that will return the string values to
    be persisted. This allows enumerations against non-string values to be
    value-persistable as well. Pull request courtesy Jon Snyder.

    References: #3906

  • [feature] [orm] Added new argument attributes.set_attribute.inititator
    to the attributes.set_attribute() function, allowing an
    event token received from a listener function to be propagated
    to subsequent set events.

latest releases: rel_1_3_20, rel_1_3_19, rel_1_3_18...
14 months ago