1.3.3
Released: April 15, 2019
-
[bug] [postgresql] 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.References: #4601
-
[bug] [pool] Fixed behavioral regression as a result of deprecating the "use_threadlocal"
flag forPool
, where theSingletonThreadPool
no longer
makes use of this option which causes the "rollback on return" logic to take
place when the sameEngine
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
usingSingletonThreadPool
, the transaction should stay open
regardless of what else is done with the same engine in the same thread.
Theuse_threadlocal
flag remains deprecated however the
SingletonThreadPool
now implements its own version of the same
logic.References: #4585
-
[bug] [orm] Fixed 1.3 regression in new "ambiguous FROMs" query logic introduced in
change_4365
where aQuery
that explicitly places an entity
in the FROM clause withQuery.select_from()
and also joins to it
usingQuery.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 theQuery
. 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.References: #4584
-
[bug] [ext] Fixed bug where using
copy.copy()
orcopy.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.References: #4603
-
[bug] [orm] Adjusted the
Query.filter_by()
method to not calland()
internally against multiple criteria, instead passing it off to
Query.filter()
as a series of criteria, instead of a single criteria.
This allowsQuery.filter_by()
to defer toQuery.filter()
's
treatment of variable numbers of clauses, including the case where the list
is empty. In this case, theQuery
object will not have a
.whereclause
, which allows subsequent "no whereclause" methods like
Query.select_from()
to behave consistently.References: #4606
-
[bug] [mssql] 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.References: #4587