Skip to content

[Backend Dependencies Update] Update sqlalchemy to 1.3.6#689

Closed
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-sqlalchemy-1.3.3-to-1.3.6
Closed

[Backend Dependencies Update] Update sqlalchemy to 1.3.6#689
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-sqlalchemy-1.3.3-to-1.3.6

Conversation

@pyup-bot
Copy link
Copy Markdown
Collaborator

This PR updates SQLAlchemy from 1.3.3 to 1.3.6.

Changelog

1.3.6

:released: July 21, 2019

 .. change::
     :tags: bug, engine
     :tickets: 4754

     Fixed bug where using reflection function such as :meth:`.MetaData.reflect`
     with an :class:`.Engine` object that had execution options applied to it
     would fail, as the resulting :class:`.OptionEngine` proxy object failed to
     include a ``.engine`` attribute used within the reflection routines.

 .. change::
     :tags: bug, mysql
     :tickets: 4743

     Fixed bug where the special logic to render "NULL" for the
     :class:`.TIMESTAMP` datatype when ``nullable=True`` would not work if the
     column's datatype were a :class:`.TypeDecorator` or a :class:`.Variant`.
     The logic now ensures that it unwraps down to the original
     :class:`.TIMESTAMP` so that this special case NULL keyword is correctly
     rendered when requested.

 .. change::
     :tags: performance, orm
     :tickets: 4775

     The optimzation applied to selectin loading in :ticket:`4340` where a JOIN
     is not needed to eagerly load related items is now applied to many-to-one
     relationships as well, so that only the related table is queried for a
     simple join condition.   In this case, the related items are queried
     based on the value of a foreign key column on the parent; if these columns
     are deferred or otherwise not loaded on any of the parent objects in
     the collection, the loader falls back to the JOIN method.


 .. change::
     :tags: bug, orm
     :tickets: 4773

     Fixed regression caused by :ticket:`4365` where a join from an entity to
     itself without using aliases no longer raises an informative error message,
     instead failing on an assertion.  The informative error condition has been
     restored.


 .. change::
     :tags: orm, feature
     :tickets: 4736

     Added new loader option method :meth:`.Load.options` which allows loader
     options to be constructed hierarchically, so that many sub-options can be
     applied to a particular path without needing to call :func:`.defaultload`
     many times.  Thanks to Alessio Bogon for the idea.


 .. change::
     :tags: usecase, postgresql
     :tickets: 4771

     Added support for reflection of indexes on PostgreSQL partitioned tables,
     which was added to PostgreSQL as of version 11.

 .. change::
    :tags: bug, mysql
    :tickets: 4624

    Enhanced MySQL/MariaDB version string parsing to accommodate for exotic
    MariaDB version strings where the "MariaDB" word is embedded among other
    alphanumeric characters such as "MariaDBV1".   This detection is critical in
    order to correctly accommodate for API features that have split between MySQL
    and MariaDB such as the "transaction_isolation" system variable.


 .. change::
     :tags: bug, mssql
     :tickets: 4745

     Ensured that the queries used to reflect indexes and view definitions will
     explicitly CAST string parameters into NVARCHAR, as many SQL Server drivers
     frequently treat string values, particularly those with non-ascii
     characters or larger string values, as TEXT which often don't compare
     correctly against VARCHAR characters in SQL Server's information schema
     tables for some reason.    These CAST operations already take place for
     reflection queries against SQL Server ``information_schema.`` tables but
     were missing from three additional queries that are against ``sys.``
     tables.

 .. change::
     :tags: bug, orm
     :tickets: 4713

     Fixed an issue where the :meth:`.orm._ORMJoin.join` method, which is a
     not-internally-used ORM-level method that exposes what is normally an
     internal process of :meth:`.Query.join`, did not propagate the ``full`` and
     ``outerjoin`` keyword arguments correctly.  Pull request courtesy Denis
     Kataev.

 .. change::
     :tags: bug, sql
     :tickets: 4758

     Adjusted the initialization for :class:`.Enum` to minimize how often it
     invokes the ``.__members__`` attribute of a given PEP-435 enumeration
     object, to suit the case where this attribute is expensive to invoke, as is
     the case for some popular third party enumeration libraries.


 .. change::
     :tags: bug, orm
     :tickets: 4772

     Fixed bug where a many-to-one relationship that specified ``uselist=True``
     would fail to update correctly during a primary key change where a related
     column needs to change.


 .. change::
     :tags: bug, orm
     :tickets: 4772

     Fixed bug where the detection for many-to-one or one-to-one use with a
     "dynamic" relationship, which is an invalid configuration, would fail to
     raise if the relationship were configured with ``uselist=True``.  The
     current fix is that it warns, instead of raises, as this would otherwise be
     backwards incompatible, however in a future release it will be a raise.


 .. change::
     :tags: bug, orm
     :tickets: 4767

     Fixed bug where a synonym created against a mapped attribute that does not
     exist yet, as is the case when it refers to backref before mappers are
     configured, would raise recursion errors when trying to test for attributes
     on it which ultimately don't exist (as occurs when the classes are run
     through Sphinx autodoc), as the unconfigured state of the synonym would put
     it into an attribute not found loop.


 .. change::
     :tags: usecase, postgresql
     :tickets: 4756

     Added support for multidimensional Postgresql array literals via nesting
     the :class:`.postgresql.array` object within another one.  The
     multidimensional array type is detected automatically.

     .. seealso::

         :class:`.postgresql.array`

 .. change::
     :tags: bug, sql, postgresql
     :tickets: 4760

     Fixed issue where the :class:`.array_agg` construct in combination with
     :meth:`.FunctionElement.filter` would not produce the correct operator
     precedence in combination with the array index operator.


 .. change::
     :tags: bug, sql
     :tickets: 4747

     Fixed an unlikely issue where the "corresponding column" routine for unions
     and other :class:`.CompoundSelect` objects could return the wrong column in
     some overlapping column situtations, thus potentially impacting some ORM
     operations when set operations are in use, if the underlying
     :func:`.select` constructs were used previously in other similar kinds of
     routines, due to a cached value not being cleared.

 .. change::
     :tags: usecase, sqlite
     :tickets: 4766

     Added support for composite (tuple) IN operators with SQLite, by rendering
     the VALUES keyword for this backend.  As other backends such as DB2 are
     known to use the same syntax, the syntax is enabled in the base compiler
     using a dialect-level flag ``tuple_in_values``.   The change also includes
     support for "empty IN tuple" expressions for SQLite when using "in_()"
     between a tuple value and an empty set.


.. changelog::

1.3.5

:released: June 17, 2019

 .. change::
     :tags: bug, mysql
     :tickets: 4715

     Fixed bug where MySQL ON DUPLICATE KEY UPDATE would not accommodate setting
     a column to the value NULL.  Pull request courtesy Lukáš Banič.

 .. change::
     :tags: bug, orm
     :tickets: 4723

     Fixed a series of related bugs regarding joined table inheritance more than
     two levels deep, in conjunction with modification to primary key values,
     where those primary key columns are also linked together in a foreign key
     relationship as is typical for joined table inheritance.  The intermediary
     table in a  three-level inheritance hierarchy will now get its UPDATE if
     only the primary key value has changed and passive_updates=False (e.g.
     foreign key constraints not being enforced), whereas before it would be
     skipped; similarly, with passive_updates=True (e.g. ON UPDATE  CASCADE in
     effect), the third-level table will not receive an UPDATE statement as was
     the case earlier which would fail since CASCADE already modified it.   In a
     related issue, a relationship linked to a three-level inheritance hierarchy
     on the primary key of an intermediary table of a joined-inheritance
     hierarchy will also correctly have its foreign key column updated when the
     parent object's primary key is modified, even if that parent object is a
     subclass of the linked parent class, whereas before these classes would
     not be counted.

 .. change::
     :tags: bug, orm
     :tickets: 4729

     Fixed bug where the :attr:`.Mapper.all_orm_descriptors` accessor would
     return an entry for the :class:`.Mapper` itself under the declarative
     ``__mapper___`` key, when this is not a descriptor.  The ``.is_attribute``
     flag that's present on all :class:`.InspectionAttr` objects is now
     consulted, which has also been modified to be ``True`` for an association
     proxy, as it was erroneously set to False for this object.

 .. change::
     :tags: bug, orm
     :tickets: 4704

     Fixed regression in :meth:`.Query.join` where the ``aliased=True`` flag
     would not properly apply clause adaptation to filter criteria, if a
     previous join were made to the same entity.  This is because the adapters
     were placed in the wrong order.   The order has been reversed so that the
     adapter for the most recent ``aliased=True`` call takes precedence as was
     the case in 1.2 and earlier.  This broke the "elementtree" examples among
     other things.

 .. change::
     :tags: bug, orm, py3k
     :tickets: 4674

     Replaced the Python compatbility routines for ``getfullargspec()`` with a
     fully vendored version from Python 3.3.  Originally, Python was emitting
     deprecation warnings for this function in Python 3.8 alphas.  While this
     change was reverted, it was observed that Python 3 implementations for
     ``getfullargspec()`` are an order of magnitude slower as of the 3.4 series
     where it was rewritten against ``Signature``.  While Python plans to
     improve upon this situation, SQLAlchemy projects for now are using a simple
     replacement to avoid any future issues.

 .. change::
     :tags: bug, orm
     :tickets: 4694

     Reworked the attribute mechanics used by :class:`.AliasedClass` to no
     longer rely upon calling ``__getattribute__`` on the MRO of the wrapped
     class, and to instead resolve the attribute normally on the wrapped class
     using getattr(), and then unwrap/adapt that.  This allows a greater range
     of attribute styles on the mapped class including special ``__getattr__()``
     schemes; but it also makes the code simpler and more resilient in general.

 .. change::
     :tags: usecase, postgresql
     :tickets: 4717

     Added support for column sorting flags when reflecting indexes for
     PostgreSQL, including ASC, DESC, NULLSFIRST, NULLSLAST.  Also adds this
     facility to the reflection system in general which can be applied to other
     dialects in future releases.  Pull request courtesy Eli Collins.

 .. change::
     :tags: bug, postgresql
     :tickets: 4701

     Fixed bug where PostgreSQL dialect could not correctly reflect an ENUM
     datatype that has no members, returning a list with ``None`` for the
     ``get_enums()`` call and raising a TypeError when reflecting a column which
     has such a datatype.   The inspection now returns an empty list.

 .. change::
     :tags: bug, sql
     :tickets: 4730

     Fixed a series of quoting issues which all stemmed from the concept of the
     :func:`.literal_column` construct, which when being "proxied" through a
     subquery to be referred towards by a label that matches its text, the label
     would not have quoting rules applied to it, even if the string in the
     :class:`.Label` were set up as a :class:`.quoted_name` construct.  Not
     applying quoting to the text of the :class:`.Label` is a bug because this
     text is strictly a SQL identifier name and not a SQL expression, and the
     string should not have quotes embedded into it already unlike the
     :func:`.literal_column` which it may be applied towards.   The existing
     behavior of a non-labeled :func:`.literal_column` being propagated as is on
     the outside of a subquery is maintained in order to help with manual
     quoting schemes, although it's not clear if valid SQL can be generated for
     such a construct in any case.

.. changelog::

1.3.4

:released: May 27, 2019

 .. change::
     :tags: feature, mssql
     :tickets: 4657

     Added support for SQL Server filtered indexes, via the ``mssql_where``
     parameter which works similarly to that of the ``postgresql_where`` index
     function in the PostgreSQL dialect.

     .. seealso::

         :ref:`mssql_index_where`

 .. change::
    :tags: bug, misc
    :tickets: 4625

    Removed errant "sqla_nose.py" symbol from MANIFEST.in which created an
    undesirable warning message.

 .. change::
     :tags: bug, sql
     :tickets: 4653

     Fixed that the :class:`.GenericFunction` class was inadvertently
     registering itself as one of the named functions.  Pull request courtesy
     Adrien Berchet.

 .. change::
    :tags: bug, engine, postgresql
    :tickets: 4663

    Moved the "rollback" which occurs during dialect initialization so that it
    occurs after additional dialect-specific initialize steps, in particular
    those of the psycopg2 dialect which would inadvertently leave transactional
    state on the first new connection, which could interfere with some
    psycopg2-specific APIs which require that no transaction is started.  Pull
    request courtesy Matthew Wilkes.


 .. change::
     :tags: bug, orm
     :tickets: 4695

     Fixed issue where the :paramref:`.AttributeEvents.active_history` flag
     would not be set for an event listener that propgated to a subclass via the
     :paramref:`.AttributeEvents.propagate` flag.   This bug has been present
     for the full span of the :class:`.AttributeEvents` system.


 .. change::
     :tags: bug, orm
     :tickets: 4690

     Fixed regression where new association proxy system was still not proxying
     hybrid attributes when they made use of the ``hybrid_property.expression``
     decorator to return an alternate SQL expression, or when the hybrid
     returned an arbitrary :class:`.PropComparator`, at the expression level.
     This involved further generalization of the heuristics used to detect the
     type of object being proxied at the level of :class:`.QueryableAttribute`,
     to better detect if the descriptor ultimately serves mapped classes or
     column expressions.

 .. change::
     :tags: bug, orm
     :tickets: 4686

     Applied the mapper "configure mutex" against the declarative class mapping
     process, to guard against the race which can occur if mappers are used
     while dynamic module import schemes are still in the process of configuring
     mappers for related classes.  This does not guard against all possible race
     conditions, such as if the concurrent import has not yet encountered the
     dependent classes as of yet, however it guards against as much as possible
     within the SQLAlchemy declarative process.

 .. change::
     :tags: bug, mssql
     :tickets: 4680

     Added error code 20047 to "is_disconnect" for pymssql.  Pull request
     courtesy Jon Schuff.


 .. change::
    :tags: bug, postgresql, orm
    :tickets: 4661

    Fixed an issue where the "number of rows matched" warning would emit even if
    the dialect reported "supports_sane_multi_rowcount=False", as is the case
    for psycogp2 with ``use_batch_mode=True`` and others.


 .. change::
     :tags: bug, sql
     :tickets: 4618

     Fixed issue where double negation of a boolean column wouldn't reset
     the "NOT" operator.

 .. change::
     :tags: mysql, bug
     :tickets: 4650

     Added support for DROP CHECK constraint which is required by MySQL 8.0.16
     to drop a CHECK constraint; MariaDB supports plain DROP CONSTRAINT.  The
     logic distinguishes between the two syntaxes by checking the server version
     string for MariaDB presence.    Alembic migrations has already worked
     around this issue by implementing its own DROP for MySQL / MariaDB CHECK
     constraints, however this change implements it straight in Core so that its
     available for general use.   Pull request courtesy Hannes Hansen.

 .. change::
    :tags: bug, orm
    :tickets: 4647

    A warning is now emitted for the case where a transient object is being
    merged into the session with :meth:`.Session.merge` when that object is
    already transient in the :class:`.Session`.   This warns for the case where
    the object would normally be double-inserted.


 .. change::
     :tags: bug, orm
     :tickets: 4676

     Fixed regression in new relationship m2o comparison logic first introduced
     at :ref:`change_4359` when comparing to an attribute that is persisted as
     NULL and is in an un-fetched state in the mapped instance.  Since the
     attribute has no explicit default, it needs to default to NULL when
     accessed in a persistent setting.


 .. change::
     :tags: bug, sql
     :tickets: 4569

     The :class:`.GenericFunction` namespace is being migrated so that function
     names are looked up in a case-insensitive manner, as SQL  functions do not
     collide on case sensitive differences nor is this something which would
     occur with user-defined functions or stored procedures.   Lookups for
     functions declared with :class:`.GenericFunction` now use a case
     insensitive scheme,  however a deprecation case is supported which allows
     two or more :class:`.GenericFunction` objects with the same name of
     different cases to exist, which will cause case sensitive lookups to occur
     for that particular name, while emitting a warning at function registration
     time.  Thanks to Adrien Berchet for a lot of work on this complicated
     feature.


.. changelog::
Links

@pyup-bot
Copy link
Copy Markdown
Collaborator Author

Closing this in favor of #702

@pyup-bot pyup-bot closed this Aug 14, 2019
@jpowie01 jpowie01 deleted the pyup-update-sqlalchemy-1.3.3-to-1.3.6 branch August 14, 2019 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant