Subject: CVS commit: pkgsrc/databases/py-sqlalchemy
From: Adam Ciarcinski
Date: 2019-04-29 12:26:27
Message id: 20190429102627.D9145FB16@cvs.NetBSD.org

Log Message:
py-sqlalchemy: updated to 1.3.3

1.3.3

orm

[orm] [bug]

Fixed 1.3 regression in new “ambiguous FROMs” query logic introduced in \ 
Query.join() handles ambiguity in deciding the “left” 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 \ 
“ambiguous FROM” error if that entity were used in additional joins, as the \ 
entity appears twice in the “from” list of the Query. The fix resolves this \ 
ambiguity by folding the standalone entity into the join that it’s 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()’s 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 “no 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’s exact requirements, which is that if there are any connection \ 
parameters whatsoever, the “dsn” 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 “use_threadlocal” \ 
flag for Pool, where the SingletonThreadPool no longer makes use of this option \ 
which causes the “rollback 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 “ambiguous” 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’s 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 “correlate except” list, \ 
in a similar manner as which occurs for selectables that show up in the \ 
“correlate” 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 “ArrayOfEnum” example datatype and direct \ 
support for the “subclass 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 “localhost” 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.

Files:
RevisionActionfile
1.52modifypkgsrc/databases/py-sqlalchemy/Makefile
1.47modifypkgsrc/databases/py-sqlalchemy/distinfo