Next | Query returned 86 messages, browsing 21 to 30 | Previous

History of commit frequency

CVS Commit History:


   2020-03-22 23:45:24 by Roland Illig | Files touched by this commit (1)
Log message:
databases/py-sqlalchemy: remove nonexistent file

The test runner has apparently been replaced with a test suite.
   2020-02-04 17:57:21 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.13

1.3.13

[orm] [bug] [engine]
Added test support and repaired a wide variety of unnecessary reference cycles \ 
created for short-lived objects, mostly in the area of ORM queries. Thanks much \ 
to Carson Ip for the help on this.

[orm] [bug]
Fixed regression in loader options introduced in 1.3.0b3 via 4468 where the \ 
ability to create a loader option using PropComparator.of_type() targeting an \ 
aliased entity that is an inheriting subclass of the entity which the preceding \ 
relationship refers to would fail to produce a matching path. See also 5082 \ 
fixed in this same release which involves a similar kind of issue.

[orm] [bug]
Fixed regression in joined eager loading introduced in 1.3.0b3 via 4468 where \ 
the ability to create a joined option across a with_polymorphic() into a \ 
polymorphic subclass using RelationshipProperty.of_type() and then further along \ 
regular mapped relationships would fail as the polymorphic subclass would not \ 
add itself to the load path in a way that could be located by the loader \ 
strategy. A tweak has been made to resolve this scenario.

[orm] [bug]
Repaired a warning in the ORM flush process that was not covered by test \ 
coverage when deleting objects that use the “version_id” feature. This \ 
warning is generally unreachable unless using a dialect that sets the \ 
“supports_sane_rowcount” flag to False, which is not typically the case \ 
however is possible for some MySQL configurations as well as older Firebird \ 
drivers, and likely some third party dialects.

[orm] [bug]
Fixed bug where usage of joined eager loading would not properly wrap the query \ 
inside of a subquery when Query.group_by() were used against the query. When any \ 
kind of result-limiting approach is used, such as DISTINCT, LIMIT, OFFSET, \ 
joined eager loading embeds the row-limited query inside of a subquery so that \ 
the collection results are not impacted. For some reason, the presence of GROUP \ 
BY was never included in this criterion, even though it has a similar effect as \ 
using DISTINCT. Additionally, the bug would prevent using GROUP BY at all for a \ 
joined eager load query for most database platforms which forbid non-aggregated, \ 
non-grouped columns from being in the query, as the additional columns for the \ 
joined eager load would not be accepted by the database.

[orm] [performance]
Identified a performance issue in the system by which a join is constructed \ 
based on a mapped relationship. The clause adaption system would be used for the \ 
majority of join expressions including in the common case where no adaptation is \ 
needed. The conditions under which this adaptation occur have been refined so \ 
that average non-aliased joins along a simple relationship without a \ 
“secondary” table use about 70% less function calls.

[engine] [bug]
Fixed issue where the collection of value processors on a Compiled object would \ 
be mutated when “expanding IN” parameters were used with a datatype that has \ 
bind value processors; in particular, this would mean that when using statement \ 
caching and/or baked queries, the same compiled._bind_processors collection \ 
would be mutated concurrently. Since these processors are the same function for \ 
a given bind parameter namespace every time, there was no actual negative effect \ 
of this issue, however, the execution of a Compiled object should never be \ 
causing any changes in its state, especially given that they are intended to be \ 
thread-safe and reusable once fully constructed.

[sql] [usecase]
A function created using GenericFunction can now specify that the name of the \ 
function should be rendered with or without quotes by assigning the quoted_name \ 
construct to the .name element of the object. Prior to 1.3.4, quoting was never \ 
applied to function names, and some quoting was introduced in 4467 but no means \ 
to force quoting for a mixed case name was available. Additionally, the \ 
quoted_name construct when used as the name will properly register its lowercase \ 
name in the function registry so that the name continues to be available via the \ 
func. registry.

[postgresql] [usecase]
Added support for prefixes to the CTE construct, to allow support for Postgresql \ 
12 “MATERIALIZED” and “NOT MATERIALIZED” phrases. Pull request courtesy \ 
Marat Sharafutdinov.

[postgresql] [bug]
Fixed issue where the PostgreSQL dialect would fail to parse a reflected CHECK \ 
constraint that was a boolean-valued function (as opposed to a boolean-valued \ 
expression).

[postgresql] [tests]
Improved detection of two phase transactions requirement for the PostgreSQL \ 
database by testing that max_prepared_transactions is set to a value greater \ 
than 0. Pull request courtesy Federico Caselli.

[mssql] [bug]
Fixed issue where a timezone-aware datetime value being converted to string for \ 
use as a parameter value of a mssql.DATETIMEOFFSET column was omitting the \ 
fractional seconds.

[bug] [ext]
Fixed bug in sqlalchemy.ext.serializer where a unique BindParameter object could \ 
conflict with itself if it were present in the mapping itself, as well as the \ 
filter condition of the query, as one side would be used against the \ 
non-deserialized version and the other side would use the deserialized version. \ 
Logic is added to BindParameter similar to its “clone” method which will \ 
uniquify the parameter name upon deserialize so that it doesn’t conflict with \ 
its original.

[bug] [tests]
Fixed a few test failures which would occur on Windows due to SQLite file \ 
locking issues, as well as some timing issues in connection pool related tests; \ 
pull request courtesy Federico Caselli.

1.3.12

[orm] [bug]
Fixed issue involving lazy="raise" strategy where an ORM delete of an \ 
object would raise for a simple “use-get” style many-to-one relationship \ 
that had lazy=”raise” configured. This is inconsistent vs. the change \ 
introduced in 1.3 as part of 4353, where it was established that a history \ 
operation that does not expect emit SQL should bypass the lazy="raise" \ 
check, and instead effectively treat it as lazy="raise_on_sql" for \ 
this case. The fix adjusts the lazy loader strategy to not raise for the case \ 
where the lazy load was instructed that it should not emit SQL if the object \ 
were not present.

[orm] [bug]
Fixed regression introduced in 1.3.0 related to the association proxy refactor \ 
in 4351 that prevented composite() attributes from working in terms of an \ 
association proxy that references them.

[orm] [bug]
Setting persistence-related flags on relationship() while also setting \ 
viewonly=True will now emit a regular warning, as these flags do not make sense \ 
for a viewonly=True relationship. In particular, the “cascade” settings have \ 
their own warning that is generated based on the individual values, such as \ 
“delete, delete-orphan”, that should not apply to a viewonly relationship. \ 
Note however that in the case of “cascade”, these settings are still \ 
erroneously taking effect even though the relationship is set up as \ 
“viewonly”. In 1.4, all persistence-related cascade settings will be \ 
disallowed on a viewonly=True relationship in order to resolve this issue.

[orm] [bug] [py3k]
Fixed issue where when assigning a collection to itself as a slice, the mutation \ 
operation would fail as it would first erase the assigned collection \ 
inadvertently. As an assignment that does not change the contents should not \ 
generate events, the operation is now a no-op. Note that the fix only applies to \ 
Python 3; in Python 2, the __setitem__ hook isn’t called in this case; \ 
__setslice__ is used instead which recreates the list item-by-item in all cases.

[orm] [bug]
Fixed issue where by if the “begin” of a transaction failed at the Core \ 
engine/connection level, such as due to network error or database is locked for \ 
some transactional recipes, within the context of the Session procuring that \ 
connection from the conneciton pool and then immediately returning it, the ORM \ 
Session would not close the connection despite this connection not being stored \ 
within the state of that Session. This would lead to the connection being \ 
cleaned out by the connection pool weakref handler within garbage collection \ 
which is an unpreferred codepath that in some special configurations can emit \ 
errors in standard error.

[sql] [bug]
Fixed bug where “distinct” keyword passed to select() would not treat a \ 
string value as a “label reference” in the same way that the \ 
select.distinct() does; it would instead raise unconditionally. This keyword \ 
argument and the others passed to select() will ultimately be deprecated for \ 
SQLAlchemy 2.0.

[sql] [bug]
Changed the text of the exception for “Can’t resolve label reference” to \ 
include other kinds of label coercions, namely that “DISTINCT” is also in \ 
this category under the PostgreSQL dialect.

[sqlite] [bug]
Fixed issue to workaround SQLite’s behavior of assigning “numeric” \ 
affinity to JSON datatypes, first described at Support for SQLite JSON Added, \ 
which returns scalar numeric JSON values as a number and not as a string that \ 
can be JSON deserialized. The SQLite-specific JSON deserializer now gracefully \ 
degrades for this case as an exception and bypasses deserialization for single \ 
numeric values, as from a JSON perspective they are already deserialized.

[mssql] [bug]
Repaired support for the mssql.DATETIMEOFFSET datatype on PyODBC, by adding \ 
PyODBC-level result handlers as it does not include native support for this \ 
datatype. This includes usage of the Python 3 “timezone” tzinfo subclass in \ 
order to set up a timezone, which on Python 2 makes use of a minimal backport of \ 
“timezone” in sqlalchemy.util.
   2019-12-03 19:19:58 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.11

Release 1.3.11 has a significant number of bug fixes across all areas as well as \ 
new use case additions. While it is a "point release", it contains a \ 
few use case additions that amount to new features, as they are needed sooner \ 
than the 1.4 series will be ready. This includes new scalar accessors for JSON \ 
index expressions that work across all JSON-supporting backends as well as \ 
cross-dialect support for the "GENERATED ALWAYS AS" SQL construct, \ 
which allows for an automatically updated expression to be established within \ 
DDL in the database server.
   2019-10-10 20:22:49 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.10

1.3.10

mssql

[mssql] [bug]
Fixed bug in SQL Server dialect with new “max_identifier_length” feature \ 
where the mssql dialect already featured this flag, and the implementation did \ 
not accommodate for the new initialization hook correctly.

oracle

[oracle] [bug]
Fixed regression in Oracle dialect that was inadvertently using max identifier \ 
length of 128 characters on Oracle server 12.2 and greater even though the \ 
stated contract for the remainder of the 1.3 series is that this value stays at \ 
30 until version SQLAlchemy 1.4. Also repaired issues with the retrieval of the \ 
“compatibility” version, and removed the warning emitted when the \ 
“v$parameter” view was not accessible as this was causing user confusion.

1.3.9

orm

[orm] [bug]
Fixed regression in selectinload loader strategy caused by 4775 (released in \ 
version 1.3.6) where a many-to-one attribute of None would no longer be \ 
populated by the loader. While this was usually not noticeable due to the \ 
lazyloader populating None upon get, it would lead to a detached instance error \ 
if the object were detached.

[orm] [bug]
Passing a plain string expression to Session.query() is deprecated, as all \ 
string coercions were removed in 4481 and this one should have been included. \ 
The literal_column() function may be used to produce a textual column \ 
expression.

[orm] [bug]
A warning is emitted for a condition in which the Session may implicitly swap an \ 
object out of the identity map for another one with the same primary key, \ 
detaching the old one, which can be an observed result of load operations which \ 
occur within the SessionEvents.after_flush() hook. The warning is intended to \ 
notify the user that some special condition has caused this to happen and that \ 
the previous object may not be in the expected state.

engine

[engine] [usecase]
Added new create_engine() parameter create_engine.max_identifier_length. This \ 
overrides the dialect-coded “max identifier length” in order to accommodate \ 
for databases that have recently changed this length and the SQLAlchemy dialect \ 
has not yet been adjusted to detect for that version. This parameter interacts \ 
with the existing create_engine.label_length parameter in that it establishes \ 
the maximum (and default) value for anonymously generated labels. Additionally, \ 
post-connection detection of max identifier lengths has been added to the \ 
dialect system. This feature is first being used by the Oracle dialect.

sql

[sql] [bug]
Characters that interfere with “pyformat” or “named” formats in bound \ 
parameters, namely %, (, ) and the space character, as well as a few other \ 
typically undesirable characters, are stripped early for a bindparam() that is \ 
using an anonymized name, which is typically generated automatically from a \ 
named column which itself includes these characters in its name and does not use \ 
a .key, so that they do not interfere either with the SQLAlchemy compiler’s \ 
use of string formatting or with the driver-level parsing of the parameter, both \ 
of which could be demonstrated before the fix. The change only applies to \ 
anonymized parameter names that are generated and consumed internally, not \ 
end-user defined names, so the change should have no impact on any existing \ 
code. Applies in particular to the psycopg2 driver which does not otherwise \ 
quote special parameter names, but also strips leading underscores to suit \ 
Oracle (but not yet leading numbers, as some anon parameters are c
urrently entirely numeric/underscore based); Oracle in any case continues to \ 
quote parameter names that include special characters.

[sql] [usecase]
Added an explicit error message for the case when objects passed to Table are \ 
not SchemaItem objects, rather than resolving to an attribute error.

sqlite

[sqlite] [usecase]
Added support for sqlite “URI” connections, which allow for sqlite-specific \ 
flags to be passed in the query string such as “read only” for Python \ 
sqlite3 drivers that support this.

mssql

[mssql] [bug]
Added identifier quoting to the schema name applied to the “use” statement \ 
which is invoked when a SQL Server multipart schema name is used within a Table \ 
that is being reflected, as well as for Inspector methods such as \ 
Inspector.get_table_names(); this accommodates for special characters or spaces \ 
in the database name. Additionally, the “use” statement is not emitted if \ 
the current database matches the target owner database name being passed.

oracle

[oracle] [bug]
Restored adding cx_Oracle.DATETIME to the setinputsizes() call when a SQLAlchemy \ 
Date, DateTime or Time datatype is used, as some complex queries require this to \ 
be present. This was removed in the 1.2 series for arbitrary reasons.

[oracle] [usecase]
The Oracle dialect now emits a warning if Oracle version 12.2 or greater is \ 
used, and the create_engine.max_identifier_length parameter is not set. The \ 
version in this specific case defaults to that of the “compatibility” \ 
version set in the Oracle server configuration, not the actual server version. \ 
In version 1.4, the default max_identifier_length for 12.2 or greater will move \ 
to 128 characters. In order to maintain forwards compatibility, applications \ 
should set create_engine.max_identifier_length to 30 in order to maintain the \ 
same length behavior, or to 128 in order to test the upcoming behavior. This \ 
length determines among other things how generated constraint names are \ 
truncated for statements like CREATE CONSTRAINT and DROP CONSTRAINT, which means \ 
a the new length may produce a name-mismatch against a name that was generated \ 
with the old length, impacting database migrations.

misc

[bug] [tests]
Fixed unit test regression released in 1.3.8 that would cause failure for \ 
Oracle, SQL Server and other non-native ENUM platforms due to new enumeration \ 
tests added as part of 4285 enum sortability in the unit of work; the \ 
enumerations created constraints that were duplicated on name.
   2019-08-28 08:32:52 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.8

1.3.8

orm

[orm] [bug]
Fixed bug where Load objects were not pickleable due to mapper/relationship \ 
state in the internal context dictionary. These objects are now converted to \ 
picklable using similar techniques as that of other elements within the loader \ 
option system that have long been serializable.

[orm] [usecase]
Added support for the use of an Enum datatype using Python pep-435 enumeration \ 
objects as values for use as a primary key column mapped by the ORM. As these \ 
values are not inherently sortable, as required by the ORM for primary keys, a \ 
new TypeEngine.sort_key_function attribute is added to the typing system which \ 
allows any SQL type to implement a sorting for Python objects of its type which \ 
is consulted by the unit of work. The Enum type then defines this using the \ 
database value of a given enumeration. The sorting scheme can be also be \ 
redefined by passing a callable to the Enum.sort_key_function parameter. Pull \ 
request courtesy Nicolas Caniart.

engine

[engine] [feature]
Added new parameter create_engine.hide_parameters which when set to True will \ 
cause SQL parameters to no longer be logged, nor rendered in the string \ 
representation of a StatementError object.

[engine] [bug]
Fixed an issue whereby if the dialect “initialize” process which occurs on \ 
first connect would encounter an unexpected exception, the initialize process \ 
would fail to complete and then no longer attempt on subsequent connection \ 
attempts, leaving the dialect in an un-initialized, or partially initialized \ 
state, within the scope of parameters that need to be established based on \ 
inspection of a live connection. The “invoke once” logic in the event system \ 
has been reworked to accommodate for this occurrence using new, private API \ 
features that establish an “exec once” hook that will continue to allow the \ 
initializer to fire off on subsequent connections, until it completes without \ 
raising an exception. This does not impact the behavior of the existing \ 
once=True flag within the event system.

postgresql

[postgresql] [bug]
Revised the approach for the just added support for the psycopg2 \ 
“execute_values()” feature added in 1.3.7. The approach relied upon a \ 
regular expression that would fail to match for a more complex INSERT statement \ 
such as one which had subqueries involved. The new approach matches exactly the \ 
string that was rendered as the VALUES clause.

[postgresql] [bug]
Fixed bug where Postgresql operators such as \ 
postgresql.ARRAY.Comparator.contains() and \ 
postgresql.ARRAY.Comparator.contained_by() would fail to function correctly for \ 
non-integer values when used against a postgresql.array object, due to an \ 
erroneous assert statement.

[postgresql] [usecase]
Added support for reflection of CHECK constraints that include the special \ 
PostgreSQL qualifier “NOT VALID”, which can be present for CHECK constraints \ 
that were added to an exsiting table with the directive that they not be applied \ 
to existing data in the table. The PostgreSQL dictionary for CHECK constraints \ 
as returned by Inspector.get_check_constraints() may include an additional entry \ 
dialect_options which within will contain an entry "not_valid": True \ 
if this symbol is detected. Pull request courtesy Bill Finn.

sqlite

[sqlite] [bug] [reflection]
Fixed bug where a FOREIGN KEY that was set up to refer to the parent table by \ 
table name only without the column names would not correctly be reflected as far \ 
as setting up the “referred columns”, since SQLite’s PRAGMA does not \ 
report on these columns if they weren’t given explicitly. For some reason this \ 
was harcoded to assume the name of the local column, which might work for some \ 
cases but is not correct. The new approach reflects the primary key of the \ 
referred table and uses the constraint columns list as the referred columns \ 
list, if the remote column(s) aren’t present in the reflected pragma directly.
   2019-08-26 12:26:49 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.7

1.3.7

Released: August 14, 2019
orm

[orm] [bug]
Fixed regression caused by new selectinload for many-to-one logic where a \ 
primaryjoin condition not based on real foreign keys would cause KeyError if a \ 
related object did not exist for a given key value on the parent object.

[orm] [bug]
Fixed bug where using Query.first() or a slice expression in conjunction with a \ 
query that has an expression based “offset” applied would raise TypeError, \ 
due to an “or” conditional against “offset” that did not expect it to be \ 
a SQL expression as opposed to an integer or None.

sql

[sql] [bug]
Fixed issue where Index object which contained a mixture of functional \ 
expressions which were not resolvable to a particular column, in combination \ 
with string-based column names, would fail to initialize its internal state \ 
correctly leading to failures during DDL compilation.

[sql] [bug]
Fixed bug where TypeEngine.column_expression() method would not be applied to \ 
subsequent SELECT statements inside of a UNION or other CompoundSelect, even \ 
though the SELECT statements are rendered at the topmost level of the statement. \ 
New logic now differentiates between rendering the column expression, which is \ 
needed for all SELECTs in the list, vs. gathering the returned data type for the \ 
result row, which is needed only for the first SELECT.

[sql] [bug]
Fixed issue where internal cloning of SELECT constructs could lead to a key \ 
error if the copy of the SELECT changed its state such that its list of columns \ 
changed. This was observed to be occurring in some ORM scenarios which may be \ 
unique to 1.3 and above, so is partially a regression fix.

postgresql

[postgresql] [usecase]
Added new dialect flag for the psycopg2 dialect, executemany_mode which \ 
supersedes the previous experimental use_batch_mode flag. executemany_mode \ 
supports both the “execute batch” and “execute values” functions \ 
provided by psycopg2, the latter which is used for compiled insert() constructs. \ 
Pull request courtesy Yuval Dinari.
See also
Psycopg2 Fast Execution Helpers

mysql

[mysql] [bug]
The MySQL dialects will emit “SET NAMES” at the start of a connection when \ 
charset is given to the MySQL driver, to appease an apparent behavior observed \ 
in MySQL 8.0 that raises a collation error when a UNION includes string columns \ 
unioned against columns of the form CAST(NULL AS CHAR(..)), which is what \ 
SQLAlchemy’s polymorphic_union function does. The issue seems to have affected \ 
PyMySQL for at least a year, however has recently appeared as of mysqlclient \ 
1.4.4 based on changes in how this DBAPI creates a connection. As the presence \ 
of this directive impacts three separate MySQL charset settings which each have \ 
intricate effects based on their presense, SQLAlchemy will now emit the \ 
directive on new connections to ensure correct behavior.

[mysql] [bug]
Added another fix for an upstream MySQL 8 issue where a case sensitive table \ 
name is reported incorrectly in foreign key constraint reflection, this is an \ 
extension of the fix first added for 4344 which affects a case sensitive column \ 
name. The new issue occurs through MySQL 8.0.17, so the general logic of the \ 
88718 fix remains in place.
See also
https://bugs.mysql.com/bug.php?id=96365 - upstream bug

[mysql] [usecase]
Added reserved words ARRAY and MEMBER to the MySQL reserved words list, as MySQL \ 
8.0 has now made these reserved.

sqlite

[sqlite] [bug]
The dialects that support json are supposed to take arguments json_serializer \ 
and json_deserializer at the create_engine() level, however the SQLite dialect \ 
calls them _json_serilizer and _json_deserilalizer. The names have been \ 
corrected, the old names are accepted with a change warning, and these \ 
parameters are now documented as create_engine.json_serializer and \ 
create_engine.json_deserializer.

[sqlite] [bug]
Fixed bug where usage of “PRAGMA table_info” in SQLite dialect meant that \ 
reflection features to detect for table existence, list of table columns, and \ 
list of foreign keys, would default to any table in any attached database, when \ 
no schema name was given and the table did not exist in the base schema. The fix \ 
explicitly runs PRAGMA for the ‘main’ schema and then the ‘temp’ schema \ 
if the ‘main’ returned no rows, to maintain the behavior of tables + temp \ 
tables in the “no schema” namespace, attached tables only in the \ 
“schema” namespace.

mssql

[mssql] [usecase]
Added new mssql.try_cast() construct for SQL Server which emits “TRY_CAST” \ 
syntax. Pull request courtesy Leonel Atencio.

misc

[bug] [events]
Fixed issue in event system where using the once=True flag with dynamically \ 
generated listener functions would cause event registration of future events to \ 
fail if those listener functions were garbage collected after they were used, \ 
due to an assumption that a listened function is strongly referenced. The \ 
“once” wrapped is now modified to strongly reference the inner function \ 
persistently, and documentation is updated that using “once” does not imply \ 
automatic de-registration of listener functions.

1.3.6

orm

[orm] [feature]
Added new loader option method 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 defaultload() many times. Thanks to \ 
Alessio Bogon for the idea.

[orm] [bug]
Fixed regression caused by 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.

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

[orm] [bug]
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.

[orm] [bug]
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.

[orm] [bug]
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.

[orm] [performance]
The optimization applied to selectin loading in 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.

engine

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

sql

[sql] [bug]
Adjusted the initialization for 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.

[sql] [bug] [postgresql]
oduce the correct operator precedence in combination with the array index operator.

[sql] [bug]
Fixed an unlikely issue where the “corresponding column” routine for unions \ 
and other 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 select() constructs were used \ 
previously in other similar kinds of routines, due to a cached value not being \ 
cleared.

postgresql

[postgresql] [usecase]
Added support for reflection of indexes on PostgreSQL partitioned tables, which \ 
was added to PostgreSQL as of version 11.

[postgresql] [usecase]
Added support for multidimensional Postgresql array literals via nesting the \ 
postgresql.array object within another one. The multidimensional array type is \ 
detected automatically.
See also
postgresql.array

mysql

[mysql] [bug]
Fixed bug where the special logic to render “NULL” for the TIMESTAMP \ 
datatype when nullable=True would not work if the column’s datatype were a \ 
TypeDecorator or a Variant. The logic now ensures that it unwraps down to the \ 
original TIMESTAMP so that this special case NULL keyword is correctly rendered \ 
when requested.

[mysql] [bug]
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.

sqlite

[sqlite] [usecase]
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.

mssql

[mssql] [bug]
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.
   2019-07-03 22:19:11 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.5

1.3.5

orm

[orm] [bug]
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 hierachy 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 modif
ied, even if that parent object is a subclass of the linked parent class, \ 
whereas before these classes would not be counted.

[orm] [bug]
Fixed bug where the Mapper.all_orm_descriptors accessor would return an entry \ 
for the Mapper itself under the declarative __mapper___ key, when this is not a \ 
descriptor. The .is_attribute flag that’s present on all 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.

[orm] [bug]
Fixed regression in 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.

[orm] [bug] [py3k]
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.

[orm] [bug]
Reworked the attribute mechanics used by 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.

sql

[sql] [bug]
Fixed a series of quoting issues which all stemmed from the concept of the \ 
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 Label were set up as a \ 
quoted_name construct. Not applying quoting to the text of the 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 \ 
literal_column() which it may be applied towards. The existing behavior of a \ 
non-labeled 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.

postgresql

[postgresql] [bug]
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.

[postgresql] [usecase]
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.

mysql

[mysql] [bug]
Fixed bug where MySQL ON DUPLICATE KEY UPDATE would not accommodate setting a \ 
column to the value NULL.
   2019-05-29 23:11:51 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.4

1.3.4

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

[orm] [bug]
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 PropComparator, at the expression level. This involved futher \ 
generalization of the heuristics used to detect the type of object being proxied \ 
at the level of QueryableAttribute, to better detect if the descriptor \ 
ultimately serves mapped classes or column expressions.

[orm] [bug]
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.

[orm] [bug]
A warning is now emitted for the case where a transient object is being merged \ 
into the session with Session.merge() when that object is already transient in \ 
the Session. This warns for the case where the object would normally be \ 
double-inserted.

[orm] [bug]
Fixed regression in new relationship m2o comparison logic first introduced at \ 
Improvement to the behavior of many-to-one query expressions 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.

engine
[engine] [bug] [postgresql]
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.

sql
[sql] [bug]
Fixed that the GenericFunction class was inadvertently registering itself as one \ 
of the named functions. Pull request courtesy Adrien Berchet.

[sql] [bug]
Fixed issue where double negation of a boolean column wouldn’t reset the \ 
“NOT” operator.

[sql] [bug]
The 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 \ 
GenericFunction now use a case insensitive scheme, however a deprecation case is \ 
supported which allows two or more 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.

postgresql
[postgresql] [bug] [orm]
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.

mysql
[mysql] [bug]
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.

mssql
[mssql] [feature]
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.

[mssql] [bug]
Added error code 20047 to “is_disconnect” for pymssql. Pull request courtesy \ 
Jon Schuff.

misc
[misc] [bug]
Removed errant “sqla_nose.py” symbol from MANIFEST.in which created an \ 
undesirable warning message.
   2019-04-29 12:26:27 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
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.
   2019-04-02 10:59:13 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-sqlalchemy: updated to 1.3.1

1.3.1
orm
[orm] [bug] [ext] Fixed regression where an association proxy linked to a \ 
synonym would no longer work, both at instance level and at class level.

mssql

[mssql] [bug] A commit() is emitted after an isolation level change to SNAPSHOT, \ 
as both pyodbc and pymssql open an implicit transaction which blocks subsequent \ 
SQL from being emitted in the current transaction.

This change is also backported to: 1.2.19

[mssql] [bug] Fixed regression in SQL Server reflection due to 4393 where the \ 
removal of open-ended **kw from the Float datatype caused reflection of this \ 
type to fail due to a “scale” argument being passed.

1.3.0
orm

[orm] [feature] The Query.get() method can now accept a dictionary of attribute \ 
keys and values as a means of indicating the primary key value to load; is \ 
particularly useful for composite primary keys. Pull request courtesy Sanjana S.

[orm] [feature] A SQL expression can now be assigned to a primary key attribute \ 
for an ORM flush in the same manner as ordinary attributes as described in \ 
Embedding SQL Insert/Update Expressions into a Flush where the expression will \ 
be evaulated and then returned to the ORM using RETURNING, or in the case of \ 
pysqlite, works using the cursor.lastrowid attribute.Requires either a database \ 
that supports RETURNING (e.g. Postgresql, Oracle, SQL Server) or pysqlite.

engine

[engine] [feature] Revised the formatting for StatementError when stringified. \ 
Each error detail is broken up over multiple newlines instead of spaced out on a \ 
single line. Additionally, the SQL representation now stringifies the SQL \ 
statement rather than using repr(), so that newlines are rendered as is. Pull \ 
request courtesy Nate Clark.

See also
Changed StatementError formatting (newlines and %s)

sql
[sql] [bug] The Alias class and related subclasses CTE, Lateral and TableSample \ 
have been reworked so that it is not possible for a user to construct the \ 
objects directly. These constructs require that the standalone construction \ 
function or selectable-bound method be used to instantiate new objects.

schema
[schema] [feature] Added new parameters Table.resolve_fks and \ 
MetaData.reflect.resolve_fks which when set to False will disable the automatic \ 
reflection of related tables encountered in ForeignKey objects, which can both \ 
reduce SQL overhead for omitted tables as well as avoid tables that can’t be \ 
reflected for database-specific reasons. Two Table objects present in the same \ 
MetaData collection can still refer to each other even if the reflection of the \ 
two tables occurred separately

Next | Query returned 86 messages, browsing 21 to 30 | Previous