Mon Apr 29 10:26:27 2019 UTC ()
py-sqlalchemy: updated to 1.3.3

1.3.3

orm

[orm] [bug]

Fixed 1.3 regression in new 窶彗mbiguous FROMs窶� query logic introduced in Query.join() handles ambiguity in deciding the 窶徑eft窶� side more explicitly where a Query that explicitly places an entity in the FROM clause with Query.select_from() and also joins to it using Query.join() would later cause an 窶彗mbiguous FROM窶� error if that entity were used in additional joins, as the entity appears twice in the 窶彷rom窶� list of the Query. The fix resolves this ambiguity by folding the standalone entity into the join that it窶冱 already a part of in the same way that ultimately happens when the SELECT statement is rendered.

[orm] [bug]

Adjusted the Query.filter_by() method to not call and() internally against multiple criteria, instead passing it off to Query.filter() as a series of criteria, instead of a single criteria. This allows Query.filter_by() to defer to Query.filter()窶冱 treatment of variable numbers of clauses, including the case where the list is empty. In this case, the Query object will not have a .whereclause, which allows subsequent 窶從o whereclause窶� methods like Query.select_from() to behave consistently.

postgresql

[postgresql] [bug]

Fixed regression from release 1.3.2 caused by 4562 where a URL that contained only a query string and no hostname, such as for the purposes of specifying a service file with connection information, would no longer be propagated to psycopg2 properly. The change in 4562 has been adjusted to further suit psycopg2窶冱 exact requirements, which is that if there are any connection parameters whatsoever, the 窶彭sn窶� parameter is no longer required, so in this case the query string parameters are passed alone.

mssql

[mssql] [bug]

Fixed issue in SQL Server dialect where if a bound parameter were present in an ORDER BY expression that would ultimately not be rendered in the SQL Server version of the statement, the parameters would still be part of the execution parameters, leading to DBAPI-level errors. Pull request courtesy Matt Lewellyn.

misc

[bug] [pool]

Fixed behavioral regression as a result of deprecating the 窶忖se_threadlocal窶� flag for Pool, where the SingletonThreadPool no longer makes use of this option which causes the 窶徨ollback on return窶� logic to take place when the same Engine is used multiple times in the context of a transaction to connect or implicitly execute, thereby cancelling the transaction. While this is not the recommended way to work with engines and connections, it is nonetheless a confusing behavioral change as when using SingletonThreadPool, the transaction should stay open regardless of what else is done with the same engine in the same thread. The use_threadlocal flag remains deprecated however the SingletonThreadPool now implements its own version of the same logic.

[bug] [ext]

Fixed bug where using copy.copy() or copy.deepcopy() on MutableList would cause the items within the list to be duplicated, due to an inconsistency in how Python pickle and copy both make use of __getstate__() and __setstate__() regarding lists. In order to resolve, a __reduce_ex__ method had to be added to MutableList. In order to maintain backwards compatibility with existing pickles based on __getstate__(), the __setstate__() method remains as well; the test suite asserts that pickles made against the old version of the class can still be deserialized by the pickle module.

1.3.2

orm

[orm] [bug] [ext]

Restored instance-level support for plain Python descriptors, e.g. @property objects, in conjunction with association proxies, in that if the proxied object is not within ORM scope at all, it gets classified as 窶彗mbiguous窶� but is proxed directly. For class level access, a basic class level``__get__()`` now returns the AmbiguousAssociationProxyInstance directly, rather than raising its exception, which is the closest approximation to the previous behavior that returned the AssociationProxy itself that窶冱 possible. Also improved the stringification of these objects to be more descriptive of current state.

[orm] [bug]

Fixed bug where use of with_polymorphic() or other aliased construct would not properly adapt when the aliased target were used as the Select.correlate_except() target of a subquery used inside of a column_property(). This required a fix to the clause adaption mechanics to properly handle a selectable that shows up in the 窶彡orrelate except窶� list, in a similar manner as which occurs for selectables that show up in the 窶彡orrelate窶� list. This is ultimately a fairly fundamental bug that has lasted for a long time but it is hard to come across it.

[orm] [bug]

Fixed regression where a new error message that was supposed to raise when attempting to link a relationship option to an AliasedClass without using PropComparator.of_type() would instead raise an AttributeError. Note that in 1.3, it is no longer valid to create an option path from a plain mapper relationship to an AliasedClass without using PropComparator.of_type().

sql

[sql] [bug] [documentation]

Thanks to TypeEngine methods bind_expression, column_expression work with Variant, type-specific types, we no longer need to rely on recipes that subclass dialect-specific types directly, TypeDecorator can now handle all cases. Additionally, the above change made it slightly less likely that a direct subclass of a base SQLAlchemy type would work as expected, which could be misleading. Documentation has been updated to use TypeDecorator for these examples including the PostgreSQL 窶廣rrayOfEnum窶� example datatype and direct support for the 窶徭ubclass a type directly窶� has been removed.

postgresql

[postgresql] [feature]

Added support for parameter-less connection URLs for the psycopg2 dialect, meaning, the URL can be passed to create_engine() as "postgresql+psycopg2://" with no additional arguments to indicate an empty DSN passed to libpq, which indicates to connect to 窶徑ocalhost窶� with no username, password, or database given. Pull request courtesy Julian Mehnle.

[postgresql] [bug]

Modified the Select.with_for_update.of parameter so that if a join or other composed selectable is passed, the individual Table objects will be filtered from it, allowing one to pass a join() object to the parameter, as occurs normally when using joined table inheritance with the ORM.


(adam)
diff -r1.51 -r1.52 pkgsrc/databases/py-sqlalchemy/Makefile
diff -r1.46 -r1.47 pkgsrc/databases/py-sqlalchemy/distinfo

cvs diff -r1.51 -r1.52 pkgsrc/databases/py-sqlalchemy/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/py-sqlalchemy/Makefile 2019/04/02 08:59:13 1.51
+++ pkgsrc/databases/py-sqlalchemy/Makefile 2019/04/29 10:26:27 1.52
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.51 2019/04/02 08:59:13 adam Exp $ 1# $NetBSD: Makefile,v 1.52 2019/04/29 10:26:27 adam Exp $
2 2
3DISTNAME= SQLAlchemy-1.3.1 3DISTNAME= SQLAlchemy-1.3.3
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
5CATEGORIES= databases python 5CATEGORIES= databases python
6MASTER_SITES= ${MASTER_SITE_PYPI:=S/SQLAlchemy/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=S/SQLAlchemy/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.sqlalchemy.org/ 9HOMEPAGE= http://www.sqlalchemy.org/
10COMMENT= Python SQL toolkit and Object Relational Mapper 10COMMENT= Python SQL toolkit and Object Relational Mapper
11LICENSE= mit 11LICENSE= mit
12 12
13TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock 13TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
14TEST_DEPENDS+= ${PYPKGPREFIX}-test>=2.5.2:../../devel/py-test 14TEST_DEPENDS+= ${PYPKGPREFIX}-test>=2.5.2:../../devel/py-test
15TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist-[0-9]*:../../devel/py-test-xdist 15TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist-[0-9]*:../../devel/py-test-xdist
16 16

cvs diff -r1.46 -r1.47 pkgsrc/databases/py-sqlalchemy/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/py-sqlalchemy/distinfo 2019/04/02 08:59:13 1.46
+++ pkgsrc/databases/py-sqlalchemy/distinfo 2019/04/29 10:26:27 1.47
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.46 2019/04/02 08:59:13 adam Exp $ 1$NetBSD: distinfo,v 1.47 2019/04/29 10:26:27 adam Exp $
2 2
3SHA1 (SQLAlchemy-1.3.1.tar.gz) = b8475576917e12de1170305c6f9be9b6d3cafe4a 3SHA1 (SQLAlchemy-1.3.3.tar.gz) = a4526ae4d3a1c164a0739c329dc73905d439483e
4RMD160 (SQLAlchemy-1.3.1.tar.gz) = 315ee1709bf2215e9fbbccb0174309da07ad4594 4RMD160 (SQLAlchemy-1.3.3.tar.gz) = e7d86b681108e5ff7ab264bca7f4fb547dc28e77
5SHA512 (SQLAlchemy-1.3.1.tar.gz) = a5f9506060cce7c688be5d0b25c5a34a904a64e07447e11d9a2e546c1020849038f370f5808d817f192ec36d6df7443ad328145be1af2baaad3913dab6b4cb8d 5SHA512 (SQLAlchemy-1.3.3.tar.gz) = f8e0f580ba5cc7eaed985e5a3af8cdcc2dddddcd64bdf02b247242eeab542b5666a93d46166b5edb4b28af3b89df44bccfa92d5bf94cc0e173dbcd369ae6487c
6Size (SQLAlchemy-1.3.1.tar.gz) = 5864223 bytes 6Size (SQLAlchemy-1.3.3.tar.gz) = 5864870 bytes