76 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
wiz
|
8a9cb53cf6 |
*: bump PKGREVISION for egg.mk users
They now have a tool dependency on py-setuptools instead of a DEPENDS |
||
nia
|
acde260c8b |
databases: Replace RMD160 checksums with BLAKE2s checksums
All checksums have been double-checked against existing RMD160 and SHA512 hashes The following distfiles could not be fetched (some may be only fetched conditionally): ./databases/cstore/distinfo D6.data.ros.gz ./databases/cstore/distinfo cstore0.2.tar.gz ./databases/cstore/distinfo data4.tar.gz |
||
nia
|
2946ea15ca | databases: Remove SHA1 distfile hashes | ||
adam
|
16806a9f49 |
py-sqlalchemy: updated to 1.3.22
1.3.22 oracle [oracle] [bug] Fixed regression which occured due to 5755 which implemented isolation level support for Oracle. It has been reported that many Oracle accounts don’t actually have permission to query the v$transaction view so this feature has been altered to gracefully fallback when it fails upon database connect, where the dialect will assume “READ COMMITTED” is the default isolation level as was the case prior to SQLAlchemy 1.3.21. However, explicit use of the Connection.get_isolation_level() method must now necessarily raise an exception, as Oracle databases with this restriction explicitly disallow the user from reading the current isolation level. |
||
adam
|
0ec72225b0 |
py-sqlalchemy: updated to 1.3.21
1.3.21 orm [orm] [bug] Added a comprehensive check and an informative error message for the case where a mapped class, or a string mapped class name, is passed to relationship.secondary. This is an extremely common error which warrants a clear message. Additionally, added a new rule to the class registry resolution such that with regards to the relationship.secondary parameter, if a mapped class and its table are of the identical string name, the Table will be favored when resolving this parameter. In all other cases, the class continues to be favored if a class and table share the identical name. [orm] [bug] Fixed bug in Query.update() where objects in the _ormsession.Session that were already expired would be unnecessarily SELECTed individually when they were refreshed by the “evaluate”synchronize strategy. [orm] [bug] Fixed bug involving the restore_load_context option of ORM events such as InstanceEvents.load() such that the flag would not be carried along to subclasses which were mapped after the event handler were first established. sql [sql] [bug] A warning is emmitted if a returning() method such as Insert.returning() is called multiple times, as this does not yet support additive operation. Version 1.4 will support additive operation for this. Additionally, any combination of the Insert.returning() and ValuesBase.return_defaults() methods now raises an error as these methods are mutually exclusive; previously the operation would fail silently. [sql] [bug] Fixed structural compiler issue where some constructs such as MySQL / PostgreSQL “on conflict / on duplicate key” would rely upon the state of the Compiler object being fixed against their statement as the top level statement, which would fail in cases where those statements are branched from a different context, such as a DDL construct linked to a SQL statement. postgresql [postgresql] [usecase] Added new parameter ExcludeConstraint.ops to the ExcludeConstraint object, to support operator class specification with this constraint. Pull request courtesy Alon Menczer. [postgresql] [bug] [mysql] Fixed regression introduced in 1.3.2 for the PostgreSQL dialect, also copied out to the MySQL dialect’s feature in 1.3.18, where usage of a non Table construct such as text() as the argument to Select.with_for_update.of would fail to be accommodated correctly within the PostgreSQL or MySQL compilers. mysql [mysql] [bug] [reflection] Fixed issue where reflecting a server default on MariaDB only that contained a decimal point in the value would fail to be reflected correctly, leading towards a reflected table that lacked any server default. [mysql] [sql] Added missing keywords to the RESERVED_WORDS list for the MySQL dialect: action, level, mode, status, text, time. Pull request courtesy Oscar Batori. sqlite [sqlite] [usecase] Added sqlite_with_rowid=False dialect keyword to enable creating tables as CREATE TABLE … WITHOUT ROWID. Patch courtesy Sean Anderson. mssql [mssql] [bug] Fixed bug where a CREATE INDEX statement was rendered incorrectly when both mssql-include and mssql_where were specified. Pull request courtesy @Adiorz. [mssql] [bug] Added SQL Server code “01000” to the list of disconnect codes. [mssql] [reflection] [sqlite] Fixed issue with composite primary key columns not being reported in the correct order. Patch courtesy @fulpm. oracle [oracle] [usecase] Implemented support for the SERIALIZABLE isolation level for Oracle databases, as well as a real implementation for Connection.get_isolation_level(). |
||
adam
|
7cec8b6deb |
py-sqlalchemy: updated to 1.3.20
1.3.20 Released: October 12, 2020 orm [orm] [bug] An ArgumentError with more detail is now raised if the target parameter for Query.join() is set to an unmapped object. Prior to this change a less detailed AttributeError was raised. Pull request courtesy Ramon Williams. [orm] [bug] Fixed issue where using a loader option against a string attribute name that is not actually a mapped attribute, such as a plain Python descriptor, would raise an uninformative AttributeError; a descriptive error is now raised. engine [engine] [bug] Fixed issue where a non-string object sent to SQLAlchemyError or a subclass, as occurs with some third party dialects, would fail to stringify correctly. Pull request courtesy Andrzej Bartosiński. [engine] [bug] Repaired a function-level import that was not using SQLAlchemy’s standard late-import system within the sqlalchemy.exc module. sql [sql] [bug] Fixed issue where the pickle.dumps() operation against Over construct would produce a recursion overflow. [sql] [bug] Fixed bug where an error was not raised in the case where a column() were added to more than one table() at a time. This raised correctly for the Column and Table objects. An ArgumentError is now raised when this occurs. postgresql [postgresql] [usecase] The psycopg2 dialect now support PostgreSQL multiple host connections, by passing host/port combinations to the query string. Pull request courtesy Ramon Williams. See also Specfiying multiple fallback hosts [postgresql] [bug] Adjusted the Comparator.any() and Comparator.all() methods to implement a straight “NOT” operation for negation, rather than negating the comparison operator. [postgresql] [bug] Fixed issue where the ENUM type would not consult the schema translate map when emitting a CREATE TYPE or DROP TYPE during the test to see if the type exists or not. Additionally, repaired an issue where if the same enum were encountered multiple times in a single DDL sequence, the “check” query would run repeatedly rather than relying upon a cached value. mysql [mysql] [usecase] Adjusted the MySQL dialect to correctly parenthesize functional index expressions as accepted by MySQL 8. Pull request courtesy Ramon Williams. [mysql] [bug] The “skip_locked” keyword used with with_for_update() will emit a warning when used on MariaDB backends, and will then be ignored. This is a deprecated behavior that will raise in SQLAlchemy 1.4, as an application that requests “skip locked” is looking for a non-blocking operation which is not available on those backends. [mysql] [bug] Fixed bug where an UPDATE statement against a JOIN using MySQL multi-table format would fail to include the table prefix for the target table if the statement had no WHERE clause, as only the WHERE clause were scanned to detect a “multi table update” at that particular point. The target is now also scanned if it’s a JOIN to get the leftmost table as the primary table and the additional entries as additional FROM entries. [mysql] [change] Add new MySQL reserved words: cube, lateral added in MySQL 8.0.1 and 8.0.14, respectively; this indicates that these terms will be quoted if used as table or column identifier names. mssql [mssql] [bug] Fixed issue where a SQLAlchemy connection URI for Azure DW with authentication=ActiveDirectoryIntegrated (and no username+password) was not constructing the ODBC connection string in a way that was acceptable to the Azure DW instance. misc [bug] [pool] Fixed issue where the following pool parameters were not being propagated to the new pool created when Engine.dispose() were called: pre_ping, use_lifo. Additionally the recycle and reset_on_return parameter is now propagated for the AssertionPool class. [bug] [associationproxy] [ext] An informative error is now raised when attempting to use an association proxy element as a plain column expression to be SELECTed from or used in a SQL function; this use case is not currently supported. [bug] [tests] Fixed incompatibilities in the test suite when running against Pytest 6.x. |
||
adam
|
a6441af080 |
py-sqlalchemy: updated to 1.3.19
1.3.19 orm [orm] [usecase] Adjusted the workings of the Mapper.all_orm_descriptors() accessor to represent the attributes in the order that they are located in a deterministic way, assuming the use of Python 3.6 or higher which maintains the sorting order of class attributes based on how they were declared. This sorting is not guaranteed to match the declared order of attributes in all cases however; see the method documentation for the exact scheme. orm declarative [usecase] [declarative] [orm] The name of the virtual column used when using the AbstractConcreteBase and ConcreteBase classes can now be customized, to allow for models that have a column that is actually named type. Pull request courtesy Jesse-Bakker. sql [sql] [bug] Repaired an issue where the “ORDER BY” clause rendering a label name rather than a complete expression, which is particularly important for SQL Server, would fail to occur if the expression were enclosed in a parenthesized grouping in some cases. This case has been added to test support. The change additionally adjusts the “automatically add ORDER BY columns when DISTINCT is present” behavior of ORM query, deprecated in 1.4, to more accurately detect column expressions that are already present. [sql] [bug] [datatypes] The LookupError message will now provide the user with up to four possible values that a column is constrained to via the Enum. Values longer than 11 characters will be truncated and replaced with ellipses. Pull request courtesy Ramon Williams. [sql] [bug] Fixed issue where the Connection.execution_options.schema_translate_map feature would not take effect when the Sequence.next_value() function function for a Sequence were used in the Column.server_default parameter and the create table DDL were emitted. postgresql [postgresql] [bug] Fixed issue where the return type for the various RANGE comparison operators would itself be the same RANGE type rather than BOOLEAN, which would cause an undesirable result in the case that a TypeDecorator that defined result-processing behavior were in use. Pull request courtesy Jim Bosch. mysql [mysql] [usecase] The MySQL dialect will render FROM DUAL for a SELECT statement that has no FROM clause but has a WHERE clause. This allows things like “SELECT 1 WHERE EXISTS (subquery)” kinds of queries to be used as well as other use cases. [mysql] [bug] Fixed an issue where CREATE TABLE statements were not specifying the COLLATE keyword correctly. [mysql] [bug] Added MariaDB code 1927 to the list of “disconnect” codes, as recent MariaDB versions apparently use this code when the database server was stopped. sqlite [sqlite] [bug] [mssql] [reflection] Applied a sweep through all included dialects to ensure names that contain single or double quotes are properly escaped when querying system tables, for all Inspector methods that accept object names as an argument (e.g. table names, view names, etc). SQLite and MSSQL contained two quoting issues that were repaired. mssql [mssql] [bug] [sql] Fixed bug where the mssql dialect incorrectly escaped object names that contained ‘]’ character(s). misc [usecase] [py3k] Added a **kw argument to the DeclarativeMeta.__init__() method. This allows a class to support the PEP 487 metaclass hook __init_subclass__. |
||
adam
|
bc12d4fd2c |
py-sqlalchemy: updated to 1.3.18
1.3.18 orm [orm] [usecase] Improve error message when using Query.filter_by() in a query where the first entity is not a mapped class. [orm] [usecase] Added a new parameter query_expression.default_expr to the query_expression() construct, which will be appled to queries automatically if the with_expression() option is not used. Pull request courtesy Haoyu Sun. engine [engine] [bug] Further refinements to the fixes to the “reset” agent fixed in 5326, which now emits a warning when it is not being correctly invoked and corrects for the behavior. Additional scenarios have been identified and fixed where this warning was being emitted. [engine] [bug] Fixed issue in URL object where stringifying the object would not URL encode special characters, preventing the URL from being re-consumable as a real URL. Pull request courtesy Miguel Grinberg. sql [sql] [usecase] Added a “.schema” parameter to the table() construct, allowing ad-hoc table expressions to also include a schema name. Pull request courtesy Dylan Modesitt. [sql] [bug] Correctly apply self_group in type_coerce element. The type coerce element did not correctly apply grouping rules when using in an expression [sql] [bug] Added Select.with_hint() output to the generic SQL string that is produced when calling str() on a statement. Previously, this clause would be omitted under the assumption that it was dialect specific. The hint text is presented within brackets to indicate the rendering of such hints varies among backends. [sql] [schema] Introduce IdentityOptions to store common parameters for sequences and identity columns. [sql] [change] [sybase] Added .offset support to sybase dialect. Pull request courtesy Alan D. Snow. schema [schema] [bug] Fixed issue where dialect_options were omitted when a database object (e.g., Table) was copied using tometadata(). mysql [mysql] [usecase] Implemented row-level locking support for mysql. Pull request courtesy Quentin Somerville. sqlite [sqlite] [usecase] SQLite 3.31 added support for computed column. This change enables their support in SQLAlchemy when targeting SQLite. [sqlite] [bug] Added “exists” to the list of reserved words for SQLite so that this word will be quoted when used as a label or column name. Pull request courtesy Thodoris Sotiropoulos. mssql [mssql] [bug] Refined the logic used by the SQL Server dialect to interpret multi-part schema names that contain many dots, to not actually lose any dots if the name does not have bracking or quoting used, and additionally to support a “dbname” token that has many parts including that it may have multiple, independently-bracketed sections. [mssql] [bug] [pyodbc] Fixed an issue in the pyodbc connector such that a warning about pyodbc “drivername” would be emitted when using a totally empty URL. Empty URLs are normal when producing a non-connected dialect object or when using the “creator” argument to create_engine(). The warning now only emits if the driver name is missing but other parameters are still present. [mssql] [bug] Fixed issue with assembling the ODBC connection string for the pyodbc DBAPI. Tokens containing semicolons and/or braces “{}” were not being correctly escaped, causing the ODBC driver to misinterpret the connection string attributes. [mssql] [bug] Fixed issue where datetime.time parameters were being converted to datetime.datetime, making them incompatible with comparisons like >= against an actual TIME column. [mssql] [bug] Fixed an issue where the is_disconnect function in the SQL Server pyodbc dialect was incorrectly reporting the disconnect state when the exception messsage had a substring that matched a SQL Server ODBC error code. [mssql] [change] Moved the supports_sane_rowcount_returning = False requirement from the PyODBCConnector level to the MSDialect_pyodbc since pyodbc does work properly in some circumstances. oracle [oracle] [bug] [reflection] Fixed bug in Oracle dialect where indexes that contain the full set of primary key columns would be mistaken as the primary key index itself, which is omitted, even if there were multiples. The check has been refined to compare the name of the primary key constraint against the index name itself, rather than trying to guess based on the columns present in the index. misc [change] [examples] Added new option --raw to the examples.performance suite which will dump the raw profile test for consumption by any number of profiling visualizer tools. Removed the “runsnake” option as runsnake is very hard to build at this point; |
||
adam
|
4e7c262d45 |
py-sqlalchemy: updated to 1.3.17
1.3.17 orm [orm] [usecase] Added an accessor Comparator.expressions which provides access to the group of columns mapped under a multi-column ColumnProperty attribute. [orm] [usecase] Introduce relationship.sync_backref flag in a relationship to control if the synchronization events that mutate the in-Python attributes are added. This supersedes the previous change 5149, which warned that viewonly=True relationship target of a back_populates or backref configuration would be disallowed. [orm] [bug] Fixed bug where using with_polymorphic() as the target of a join via RelationshipComparator.of_type() on a mapper that already has a subquery-based with_polymorphic setting that’s equivalent to the one requested would not correctly alias the ON clause in the join. [orm] [bug] Fixed issue in the area of where loader options such as selectinload() interact with the baked query system, such that the caching of a query is not supposed to occur if the loader options themselves have elements such as with_polymorphic() objects in them that currently are not cache-compatible. The baked loader could sometimes not fully invalidate itself in these some of these scenarios leading to missed eager loads. [orm] [bug] Modified the internal “identity set” implementation, which is a set that hashes objects on their id() rather than their hash values, to not actually call the __hash__() method of the objects, which are typically user-mapped objects. Some methods were calling this method as a side effect of the implementation. [orm] [bug] An informative error message is raised when an ORM many-to-one comparison is attempted against an object that is not an actual mapped instance. Comparisons such as those to scalar subqueries aren’t supported; generalized comparison with subqueries is better achieved using Comparator.has(). engine [engine] [bug] Fixed fairly critical issue where the DBAPI connection could be returned to the connection pool while still in an un-rolled-back state. The reset agent responsible for rolling back the connection could be corrupted in the case that the transaction was “closed” without being rolled back or committed, which can occur in some scenarios when using ORM sessions and emitting .close() in a certain pattern involving savepoints. The fix ensures that the reset agent is always active. schema [schema] [bug] Fixed issue where an Index that is deferred in being associated with a table, such as as when it contains a Column that is not associated with any Table yet, would fail to attach correctly if it also contained a non table-oriented expession. [schema] [bug] A warning is emitted when making use of the MetaData.sorted_tables attribute as well as the sort_tables() function, and the given tables cannot be correctly sorted due to a cyclic dependency between foreign key constraints. In this case, the functions will no longer sort the involved tables by foreign key, and a warning will be emitted. Other tables that are not part of the cycle will still be returned in dependency order. Previously, the sorted_table routines would return a collection that would unconditionally omit all foreign keys when a cycle was detected, and no warning was emitted. [schema] Add comment attribute to Column __repr__ method. postgresql [postgresql] [usecase] Added support for columns or type ARRAY of Enum, JSON or JSONB in PostgreSQL. Previously a workaround was required in these use cases. [postgresql] [usecase] Raise an explicit CompileError when adding a table with a column of type ARRAY of Enum configured with Enum.native_enum set to False when Enum.create_constraint is not set to False mssql [mssql] [bug] [reflection] Fix a regression introduced by the reflection of computed column in MSSQL when using the legacy TDS version 4.2. The dialect will try to detect the protocol version of first connect and run in compatibility mode if it cannot detect it. [mssql] [bug] [reflection] Fix a regression introduced by the reflection of computed column in MSSQL when using SQL server versions before 2012, which does not support the concat function. oracle [oracle] [bug] Some modifications to how the cx_oracle dialect sets up per-column outputtype handlers for LOB and numeric datatypes to adjust for potential changes coming in cx_Oracle 8. [oracle] [bug] [performance] Changed the implementation of fetching CLOB and BLOB objects to use cx_Oracle’s native implementation which fetches CLOB/BLOB objects inline with other result columns, rather than performing a separate fetch. As always, this can be disabled by setting auto_convert_lobs to False. As part of this change, the behavior of a CLOB that was given a blank string on INSERT now returns None on SELECT, which is now consistent with that of VARCHAR on Oracle. firebird [firebird] [change] Adjusted dialect loading for firebird:// URIs so the external sqlalchemy-firebird dialect will be used if it has been installed, otherwise fall back to the (now deprecated) internal Firebird dialect. |
||
adam
|
7370323c49 |
py-sqlalchemy: updated to 1.3.16
1.3.16 orm [orm] [bug] Fixed bug in orm.selectinload() loading option where two or more loaders that represent different relationships with the same string key name as referenced from a single orm.with_polymorphic() construct with multiple subclass mappers would fail to invoke each subqueryload separately, instead making use of a single string-based slot that would prevent the other loaders from being invoked. [orm] [bug] Fixed issue where a lazyload that uses session-local “get” against a target many-to-one relationship where an object with the correct primary key is present, however it’s an instance of a sibling class, does not correctly return None as is the case when the lazy loader actually emits a load for that row. [orm] [performance] Modified the queries used by subqueryload and selectinload to no longer ORDER BY the primary key of the parent entity; this ordering was there to allow the rows as they come in to be copied into lists directly with a minimal level of Python-side collation. However, these ORDER BY clauses can negatively impact the performance of the query as in many scenarios these columns are derived from a subquery or are otherwise not actual primary key columns such that SQL planners cannot make use of indexes. The Python-side collation uses the native itertools.group_by() to collate the incoming rows, and has been modified to allow multiple row-groups-per-parent to be assembled together using list.extend(), which should still allow for relatively fast Python-side performance. There will still be an ORDER BY present for a relationship that includes an explicit order_by parameter, however this is the only ORDER BY that will be added to the query for both kinds of loading. orm declarative [bug] [declarative] [orm] The string argument accepted as the first positional argument by the relationship() function when using the Declarative API is no longer interpreted using the Python eval() function; instead, the name is dot separated and the names are looked up directly in the name resolution dictionary without treating the value as a Python expression. However, passing a string argument to the other relationship() parameters that necessarily must accept Python expressions will still use eval(); the documentation has been clarified to ensure that there is no ambiguity that this is in use. See also Evaluation of relationship arguments - details on string evaluation sql [sql] [types] Add ability to literal compile a DateTime, Date or :class:”Time” when using the string dialect for debugging purposes. This change does not impact real dialect implementation that retain their current behavior. schema [schema] [reflection] Added support for reflection of “computed” columns, which are now returned as part of the structure returned by Inspector.get_columns(). When reflecting full Table objects, computed columns will be represented using the Computed construct. postgresql [postgresql] [bug] Fixed issue where a “covering” index, e.g. those which have an INCLUDE clause, would be reflected including all the columns in INCLUDE clause as regular columns. A warning is now emitted if these additional columns are detected indicating that they are currently ignored. Note that full support for “covering” indexes is part of 4458. Pull request courtesy Marat Sharafutdinov. mysql [mysql] [bug] Fixed issue in MySQL dialect when connecting to a psuedo-MySQL database such as that provided by ProxySQL, the up front check for isolation level when it returns no row will not prevent the dialect from continuing to connect. A warning is emitted that the isolation level could not be detected. sqlite [sqlite] [usecase] Implemented AUTOCOMMIT isolation level for SQLite when using pysqlite. mssql [mssql] [usecase] [mysql] [oracle] Added support for ColumnOperators.is_distinct_from() and ColumnOperators.isnot_distinct_from() to SQL Server, MySQL, and Oracle. oracle [oracle] [usecase] Implemented AUTOCOMMIT isolation level for Oracle when using cx_Oracle. Also added a fixed default isolation level of READ COMMITTED for Oracle. [oracle] [bug] [reflection] Fixed regression / incorrect fix caused by fix for 5146 where the Oracle dialect reads from the “all_tab_comments” view to get table comments but fails to accommodate for the current owner of the table being requested, causing it to read the wrong comment if multiple tables of the same name exist in multiple schemas. misc [bug] [tests] Fixed an issue that prevented the test suite from running with the recently released py.test 5.4.0. [enum] [types] The Enum type now supports the parameter Enum.length to specify the length of the VARCHAR column to create when using non native enums by setting Enum.native_enum to False [installer] Ensured that the “pyproject.toml” file is not included in builds, as the presence of this file indicates to pip that a pep-517 installation process should be used. As this mode of operation appears to be not well supported by current tools / distros, these problems are avoided within the scope of SQLAlchemy installation by omitting the file. 1.3.15 orm [orm] [bug] Adjusted the error message emitted by Query.join() when a left hand side can’t be located that the Query.select_from() method is the best way to resolve the issue. Also, within the 1.3 series, used a deterministic ordering when determining the FROM clause from a given column entity passed to Query so that the same expression is determined each time. [orm] [bug] Fixed regression in 1.3.14 due to 4849 where a sys.exc_info() call failed to be invoked correctly when a flush error would occur. Test coverage has been added for this exception case. 1.3.14 general [general] [bug] [py3k] Applied an explicit “cause” to most if not all internally raised exceptions that are raised from within an internal exception catch, to avoid misleading stacktraces that suggest an error within the handling of an exception. While it would be preferable to suppress the internally caught exception in the way that the __suppress_context__ attribute would, there does not as yet seem to be a way to do this without suppressing an enclosing user constructed context, so for now it exposes the internally caught exception as the cause so that full information about the context of the error is maintained. orm [orm] [usecase] Added a new flag InstanceEvents.restore_load_context and SessionEvents.restore_load_context which apply to the InstanceEvents.load(), InstanceEvents.refresh(), and SessionEvents.loaded_as_persistent() events, which when set will restore the “load context” of the object after the event hook has been called. This ensures that the object remains within the “loader context” of the load operation that is already ongoing, rather than the object being transferred to a new load context due to refresh operations which may have occurred in the event. A warning is now emitted when this condition occurs, which recommends use of the flag to resolve this case. The flag is “opt-in” so that there is no risk introduced to existing applications. The change additionally adds support for the raw=True flag to session lifecycle events. [orm] [bug] Fixed regression caused in 1.3.13 by 5056 where a refactor of the ORM path registry system made it such that a path could no longer be compared to an empty tuple, which can occur in a particular kind of joined eager loading path. The “empty tuple” use case has been resolved so that the path registry is compared to a path registry in all cases; the PathRegistry object itself now implements __eq__() and __ne__() methods which will take place for all equality comparisons and continue to succeed in the not anticipated case that a non- PathRegistry object is compared, while emitting a warning that this object should not be the subject of the comparison. [orm] [bug] Setting a relationship to viewonly=True which is also the target of a back_populates or backref configuration will now emit a warning and eventually be disallowed. back_populates refers specifically to mutation of an attribute or collection, which is disallowed when the attribute is subject to viewonly=True. The viewonly attribute is not subject to persistence behaviors which means it will not reflect correct results when it is locally mutated. [orm] [bug] Fixed an additional regression in the same area as that of 5080 introduced in 1.3.0b3 via 4468 where the ability to create a joined option across a with_polymorphic() into a relationship against the base class of that with_polymorphic, and then further into regular mapped relationships would fail as the base class component would not add itself to the load path in a way that could be located by the loader strategy. The changes applied in 5080 have been further refined to also accommodate this scenario. engine [engine] [bug] Expanded the scope of cursor/connection cleanup when a statement is executed to include when the result object fails to be constructed, or an after_cursor_execute() event raises an error, or autocommit / autoclose fails. This allows the DBAPI cursor to be cleaned up on failure and for connectionless execution allows the connection to be closed out and returned to the connection pool, where previously it waiting until garbage collection would trigger a pool return. sql [sql] [bug] [postgresql] Fixed bug where a CTE of an INSERT/UPDATE/DELETE that also uses RETURNING could then not be SELECTed from directly, as the internal state of the compiler would try to treat the outer SELECT as a DELETE statement itself and access nonexistent state. postgresql [postgresql] [bug] Fixed issue where the “schema_translate_map” feature would not work with a PostgreSQL native enumeration type (i.e. Enum, postgresql.ENUM) in that while the “CREATE TYPE” statement would be emitted with the correct schema, the schema would not be rendered in the CREATE TABLE statement at the point at which the enumeration was referenced. [postgresql] [bug] [reflection] Fixed bug where PostgreSQL reflection of CHECK constraints would fail to parse the constraint if the SQL text contained newline characters. The regular expression has been adjusted to accommodate for this case. Pull request courtesy Eric Borczuk. mysql [mysql] [bug] Fixed issue in MySQL mysql.Insert.on_duplicate_key_update() construct where using a SQL function or other composed expression for a column argument would not properly render the VALUES keyword surrounding the column itself. mssql [mssql] [bug] Fixed issue where the mssql.DATETIMEOFFSET type would not accommodate for the None value, introduced as part of the series of fixes for this type first introduced in 4983, 5045. Additionally, added support for passing a backend-specific date formatted string through this type, as is typically allowed for date/time types on most other DBAPIs. oracle [oracle] [bug] Fixed a reflection bug where table comments could only be retrieved for tables actually owned by the user but not for tables visible to the user but owned by someone else. Pull request courtesy Dave Hirschfeld. misc [usecase] [ext] Added keyword arguments to the MutableList.sort() function so that a key function as well as the “reverse” keyword argument can be provided. [bug] [performance] Revised an internal change to the test system added as a result of 5085 where a testing-related module per dialect would be loaded unconditionally upon making use of that dialect, pulling in SQLAlchemy’s testing framework as well as the ORM into the module import space. This would only impact initial startup time and memory to a modest extent, however it’s best that these additional modules aren’t reverse-dependent on straight Core usage. [bug] [installation] Vendored the inspect.formatannotation function inside of sqlalchemy.util.compat, which is needed for the vendored version of inspect.formatargspec. The function is not documented in cPython and is not guaranteed to be available in future Python versions. |
||
rillig
|
87f5de4f62 |
databases/py-sqlalchemy: remove nonexistent file
The test runner has apparently been replaced with a test suite. |
||
adam
|
7eee38a534 |
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. |
||
adam
|
0f6bed8422 |
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. |
||
adam
|
fe1ca0d3b0 |
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 currently 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. |
||
adam
|
39892a12e4 |
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. |
||
adam
|
89fee6d804 |
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. |
||
adam
|
f6acad44d8 |
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 modified, 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. |
||
adam
|
7c2753780f |
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. |
||
adam
|
18d3761b30 |
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. |
||
adam
|
b82f061c43 |
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 |
||
adam
|
aa6f780932 |
py-sqlalchemy: updated to 1.2.18
1.2.18: orm [orm] [bug] Fixed a regression in 1.2 where a wildcard/load_only loader option would not work correctly against a loader path where of_type() were used to limit to a particular subclass. The fix only works for of_type() of a simple subclass so far, not a with_polymorphic entity which will be addressed in a separate issue; it is unlikely this latter case was working previously. [orm] [bug] Fixed fairly simple but critical issue where the SessionEvents.pending_to_persistent() event would be invoked for objects not just when they move from pending to persistent, but when they were also already persistent and just being updated, thus causing the event to be invoked for all objects on every update. sql [sql] [bug] Fixed issue where the JSON type had a read-only JSON.should_evaluate_none attribute, which would cause failures when making use of the TypeEngine.evaluates_none() method in conjunction with this type. Pull request courtesy Sanjana S. mysql [mysql] [bug] Fixed a second regression caused by 4344 (the first was 4361), which works around MySQL issue 88718, where the lower casing function used was not correct for Python 2 with OSX/Windows casing conventions, which would then raise TypeError. Full coverage has been added to this logic so that every codepath is exercised in a mock style for all three casing conventions on all versions of Python. MySQL 8.0 has meanwhile fixed issue 88718 so the workaround is only applies to a particular span of MySQL 8.0 versions. sqlite [sqlite] [bug] Fixed bug in SQLite DDL where using an expression as a server side default required that it be contained within parenthesis to be accepted by the sqlite parser. Pull request courtesy Bartlomiej Biernacki. mssql [mssql] [bug] Fixed bug where the SQL Server “IDENTITY_INSERT” logic that allows an INSERT to proceed with an explicit value on an IDENTITY column was not detecting the case where Insert.values() were used with a dictionary that contained a Column as key and a SQL expression as a value |
||
adam
|
5e02ec8c7f |
py-sqlalchemy: updated to 1.2.17
1.2.17 [orm] [feature] Added new event hooks QueryEvents.before_compile_update() and QueryEvents.before_compile_delete() which complement QueryEvents.before_compile() in the case of the Query.update() and Query.delete() methods. [orm] [bug] Fixed issue where when using single-table inheritance in conjunction with a joined inheritance hierarchy that uses “with polymorphic” loading, the “single table criteria” for that single-table entity could get confused for that of other entities from the same hierarchy used in the same query.The adaption of the “single table criteria” is made more specific to the target entity to avoid it accidentally getting adapted to other tables in the query. [postgresql] [bug] Revised the query used when reflecting CHECK constraints to make use of the pg_get_constraintdef function, as the consrc column is being deprecated in PG 12. Thanks to John A Stevenson for the tip. [oracle] [bug] Fixed regression in integer precision logic due to the refactor of the cx_Oracle dialect in 1.2. We now no longer apply the cx_Oracle.NATIVE_INT type to result columns sending integer values (detected as positive precision with scale ==0) which encounters integer overflow issues with values that go beyond the 32 bit boundary. Instead, the output variable is left untyped so that cx_Oracle can choose the best option |
||
adam
|
2155d51f55 |
py-sqlalchemy: updated to 1.2.16
1.2.16: engine [engine] [bug] Fixed a regression introduced in version 1.2 where a refactor of the SQLAlchemyError base exception class introduced an inappropriate coercion of a plain string message into Unicode under python 2k, which is not handled by the Python interpreter for characters outside of the platform’s encoding (typically ascii). The SQLAlchemyError class now passes a bytestring through under Py2K for __str__() as is the behavior of exception objects in general under Py2K, does a safe coercion to unicode utf-8 with backslash fallback for __unicode__(). For Py3K the message is typically unicode already, but if not is again safe-coerced with utf-8 with backslash fallback for the __str__() method. sql [sql] [bug] [mysql] [oracle] Fixed issue where the DDL emitted for DropTableComment, which will be used by an upcoming version of Alembic, was incorrect for the MySQL and Oracle databases. postgresql [postgresql] [bug] Fixed issue where a postgresql.ENUM or a custom domain present in a remote schema would not be recognized within column reflection if the name of the enum/domain or the name of the schema required quoting. A new parsing scheme now fully parses out quoted or non-quoted tokens including support for SQL-escaped quotes. [postgresql] [bug] Fixed issue where multiple postgresql.ENUM objects referred to by the same MetaData object would fail to be created if multiple objects had the same name under different schema names. The internal memoization the PostgreSQL dialect uses to track if it has created a particular postgresql.ENUM in the database during a DDL creation sequence now takes schema name into account. sqlite [sqlite] [bug] Reflection of an index based on SQL expressions are now skipped with a warning, in the same way as that of the Postgresql dialect, where we currently do not support reflecting indexes that have SQL expressions within them. Previously, an index with columns of None were produced which would break tools like Alembic. misc Fixed issue in “expanding IN” feature where using the same bound parameter name more than once in a query would lead to a KeyError within the process of rewriting the parameters in the query |
||
adam
|
7a78d69c23 |
py-sqlalchemy: updated to 1.2.15
1.2.15 orm [orm] [bug] Fixed bug where the ORM annotations could be incorrect for the primaryjoin/secondaryjoin a relationship if one used the pattern ForeignKey(SomeClass.id) in the declarative mappings. This pattern would leak undesired annotations into the join conditions which can break aliasing operations done within Query that are not supposed to impact elements in that join condition. These annotations are now removed up front if present. [orm] [bug] In continuing with a similar theme as that of very recent 4349, repaired issue with RelationshipProperty.Comparator.any() and RelationshipProperty.Comparator.has() where the “secondary” selectable needs to be explicitly part of the FROM clause in the EXISTS subquery to suit the case where this “secondary” is a Join object. [orm] [bug] Fixed regression caused by 4349 where adding the “secondary” table to the FROM clause for a dynamic loader would affect the ability of the Query to make a subsequent join to another entity. The fix adds the primary entity as the first element of the FROM list since Query.join() wants to jump from that. Version 1.3 will have a more comprehensive solution to this problem as well. [orm] [bug] Fixed bug where chaining of mapper options using RelationshipProperty.of_type() in conjunction with a chained option that refers to an attribute name by string only would fail to locate the attribute. orm declarative [bug] [declarative] [orm] A warning is emitted in the case that a column() object is applied to a declarative class, as it seems likely this intended to be a Column object. misc Added support for the write_timeout flag accepted by mysqlclient and pymysql to be passed in the URL string. Fixed issue where reflection of a PostgreSQL domain that is expressed as an array would fail to be recognized. |
||
adam
|
d76c5772f3 |
py-sqlalchemy: updated to 1.2.14
1.2.14 orm * Fixed bug in Session.bulk_update_mappings() where alternate mapped attribute names would result in the primary key column of the UPDATE statement being included in the SET clause, as well as the WHERE clause; while usually harmless, for SQL Server this can raise an error due to the IDENTITY column. This is a continuation of the same bug that was fixed in 3849, where testing was insufficient to catch this additional flaw. * Fixed a minor performance issue which could in some cases add unnecessary overhead to result fetching, involving the use of ORM columns and entities that include those same columns at the same time within a query. The issue has to do with hash / eq overhead when referring to the column in different ways. mysql * Fixed regression caused by 4344 released in 1.2.13, where the fix for MySQL 8.0’s case sensitivity problem with referenced column names when reflecting foreign key referents is worked around using the information_schema.columns view. The workaround was failing on OSX / lower_case_table_names=2 which produces non-matching casing for the information_schema.columns vs. that of SHOW CREATE TABLE, so in case-insensitive SQL modes case-insensitive matching is now used. |
||
adam
|
2ce6cbd7e2 |
py-sqlalchemy: updated to 1.2.13
SQLAlchemy release 1.2.13: This release includes a variety of fixes within the ORM and Core components. |
||
adam
|
747baabb0a |
py-sqlalchemy: updated to 1.2.12
Release 1.2.12 includes a series of mostly minor bugfixes, as well as one critical issue allowing the recently released version 7.0 of the cx_Oracle DBAPI to work correctly. |
||
adam
|
0cf4ad9a44 |
py-sqlalchemy: updated to 1.2.11
SQLAlchemy release 1.2.11: This release includes a short list of minor bug fixes that have accumulated over the past month. |
||
adam
|
b4002c9fd4 |
py-sqlalchemy: updated to 1.2.10
1.2.10: [orm] [bug] Fixed bug in Bundle construct where placing two columns of the same name would be de-duplicated, when the Bundle were used as part of the rendered SQL, such as in the ORDER BY or GROUP BY of the statement. [orm] [bug] Fixed regression in 1.2.9 due to 4287 where using a Load option in conjunction with a string wildcard would result in a TypeError. [sql] [bug] Fixed bug where a Sequence would be dropped explicitly before any Table that refers to it, which breaks in the case when the sequence is also involved in a server-side default for that table, when using MetaData.drop_all(). The step which processes sequences to be dropped via non server-side column default functions is now invoked after the table itself is dropped. |
||
adam
|
dbbbbf1056 |
py-sqlalchemy: updated to 1.2.9
Version 1.2.9 Fixed issue where chaining multiple join elements inside of Query.join() might not correctly adapt to the previous left-hand side, when chaining joined inheritance classes that share the same base class. Fixed bug in cache key generation for baked queries which could cause a too-short cache key to be generated for the case of eager loads across subclasses. This could in turn cause the eagerload query to be cached in place of a non-eagerload query, or vice versa, for a polymorhic “selectin” load, or possibly for lazy loads or selectin loads as well. Fixed bug in new polymorphic selectin loading where the BakedQuery used internally would be mutated by the given loader options, which would both inappropriately mutate the subclass query as well as carry over the effect to subsequent queries. Fixed regression caused by 4256 (itself a regression fix for 4228) which breaks an undocumented behavior which converted for a non-sequence of entities passed directly to the Query constructor into a single-element sequence. While this behavior was never supported or documented, it’s already in use so has been added as a behavioral contract to Query. Fixed an issue that was both a performance regression in 1.2 as well as an incorrect result regarding the “baked” lazy loader, involving the generation of cache keys from the original Query object’s loader options. If the loader options were built up in a “branched” style using common base elements for multiple options, the same options would be rendered into the cache key repeatedly, causing both a performance issue as well as generating the wrong cache key. This is fixed, along with a performance improvement when such “branched” options are applied via Query.options() to prevent the same option objects from being applied repeatedly. |
||
adam
|
4fb0cce8ca |
py-sqlalchemy: updated to 1.2.8
Release 1.2.8 includes a fairly broad spectrum of fixes, including fixes for some memory/synchronization issues within the connection pool, automap and statement caching functionalities, as well as some issues that were introduced in the 1.2 series related to the horizontal sharding extension as well as the dogpile.caching example. Users of the dogpile.cache recipe should review the changes here when migrating to SQLAlchemy 1.2. |
||
adam
|
7fceb18a7c |
py-sqlalchemy: updated to 1.2.7
SQLAlchemy release 1.2.7: Release 1.2.7 includes some dialect-specific fixes as well as a small number of SQL and ORM related fixes. |
||
adam
|
db8d8970ea |
py-sqlalchemy: 1.2.6
Release 1.2.6 includes a variety of fixes including a connection-pool related issue which could cause a connection to be added to the pool without all of the "connect" event handlers being called. |
||
adam
|
72d10ef746 |
py-sqlalchemy: updated to 1.2.5
Release 1.2.5 includes a series of fixes across the Core and ORM components including CTE fixes, an adjustment for Python 3.7, as well as bugs involving new 1.2 features. |
||
adam
|
5f0f644e22 |
py-sqlalchemy: updated to 1.2.4
Release 1.2.4 includes a small series of fixes within the ORM and Core components, three of which are 1.2-specific regressions. |
||
adam
|
3e3515f9ec |
py-sqlalchemy: updated to 1.2.3
Release 1.2.3 includes fixes for a variety of ORM, Core, and dialect-specific issues. |
||
adam
|
e0832e1932 |
py-sqlalchemy: updated to 1.2.2
1.2.2: orm [orm] [bug] Fixed 1.2 regression regarding new bulk_replace event where a backref would fail to remove an object from the previous owner when a bulk-assignment assigned the object to a new owner. mysql [mysql] [bug] Added more MySQL 8.0 reserved words to the MySQL dialect for quoting purposes. Pull request courtesy Riccardo Magliocchetti. mssql [mssql] [bug] Added ODBC error code 10054 to the list of error codes that count as a disconnect for ODBC / MSSQL server. oracle [oracle] [bug] The cx_Oracle dialect now calls setinputsizes() with cx_Oracle.NCHAR unconditionally when the NVARCHAR2 datatype, in SQLAlchemy corresponding to sqltypes.Unicode(), is in use. Per cx_Oracle’s author this allows the correct conversions to occur within the Oracle client regardless of the setting for NLS_NCHAR_CHARACTERSET. |
||
adam
|
944997068b |
py-sqlalchemy: updated to 1.2.1
1.2.1: [orm] [bug] Fixed bug where an object that is expunged during a rollback of a nested or subtransaction which also had its primary key mutated would not be correctly removed from the session, causing subsequent issues in using the session. [orm] [bug] Fixed regression where pickle format of a Load / _UnboundLoad object (e.g. loader options) changed and __setstate__() was raising an UnboundLocalError for an object received from the legacy format, even though an attempt was made to do so. tests are now added to ensure this works. [orm] [bug] Fixed regression caused by new lazyload caching scheme in 3954 where a query that makes use of loader options with of_type would cause lazy loads of unrelated paths to fail with a TypeError. [orm] [bug] Fixed bug in new “selectin” relationship loader where the loader could try to load a non-existent relationship when loading a collection of polymorphic objects, where only some of the mappers include that relationship, typically when PropComparator.of_type() is being used. sql [sql] [bug] Fixed bug in Insert.values() where using the “multi-values” format in combination with Column objects as keys rather than strings would fail. Pull request courtesy Aubrey Stark-Toller. mssql [mssql] [bug] Fixed regression in 1.2 where newly repaired quoting of collation names in 3785 breaks SQL Server, which explicitly does not understand a quoted collation name. Whether or not mixed-case collation names are quoted or not is now deferred down to a dialect-level decision so that each dialect can prepare these identifiers directly. oracle [oracle] [bug] Fixed regression where the removal of most setinputsizes rules from cx_Oracle dialect impacted the TIMESTAMP datatype’s ability to retrieve fractional seconds. [oracle] [bug] Fixed regression in Oracle imports where a missing comma caused an undefined symbol to be present. Pull request courtesy Miroslav Shubernetskiy. misc [bug] [ext] Fixed regression in association proxy due to 3769 (allow for chained any() / has()) where contains() against an association proxy chained in the form (o2m relationship, associationproxy(m2o relationship, m2o relationship)) would raise an error regarding the re-application of contains() on the final link of the chain. [bug] [tests] Removed an oracle-specific requirements rule from the public test suite that was interfering with third party dialect suites. [bug] [tests] Added a new exclusion rule group_by_complex_expression which disables tests that use “GROUP BY <expr>”, which seems to be not viable for at least two third party dialects. |
||
minskim
|
42b08eb623 |
py-sqlalchemy: Update to 1.1.14
Bug fixes only. - Fixed bug in Session.merge() where an internal check for a target object in the identity map could lead to an error. - Fixed bug where an undefer_group() option would not be recognized. - Fixed race condition in ORM identity map. - Fixed bug in Session.merge() where objects in a collection that had the primary key attribute set to None for a key that is typically autoincrementing would be considered to be a database-persisted key for part of the internal deduplication process. - An InvalidRequestError is raised when a synonym() is used against an attribute that is not against a MapperProperty. - Altered the range specification for window functions to allow for two of the same PRECEDING or FOLLOWING keywords in a range by allowing for the left side of the range to be positive and for the right to be negative. |
||
adam
|
be5baf26c0 |
SQLAlchemy release 1.1.13:
This release modifies the just-released fix for Oracle "WITH_UNICODE" mode based on feedback from cx_Oracle developers, to resolve a performance regression caused by this change. |
||
adam
|
7adf64a92d |
SQLAlchemy release 1.1.12 is now available.
This release repairs an issue in the test suite that would prevent the suite from passing on Python version 3.6.2. The release is made at the same time as that of release 1.0.18 and 1.2.0b2. Also included are fixes related to ORM use of JSON NULL values, subquery eager loading, and a stability enhancement involving the identity map when used under high concurrency. |
||
adam
|
08bb16e234 |
1.1.11
orm [orm] [bug] Fixed issue with subquery eagerloading which continues on from the series of issues fixed in 2699, 3106, 3893 involving that the “subquery” contains the correct FROM clause when beginning from a joined inheritance subclass and then subquery eager loading onto a relationship from the base class, while the query also includes criteria against the subclass. The fix in the previous tickets did not accommodate for additional subqueryload operations loading more deeply from the first level, so the fix has been further generalized. sql [sql] [bug] Fixed AttributeError which would occur in WithinGroup construct during an iteration of the structure. postgresql [postgresql] [bug] Continuing with the fix that correctly handles Postgresql version string “10devel” released in 1.1.8, an additional regexp bump to handle version strings of the form “10beta1”. While Postgresql now offers better ways to get this information, we are sticking w/ the regexp at least through 1.1.x for the least amount of risk to compatibility w/ older or alternate Postgresql databases. [postgresql] [bug] Fixed bug where using ARRAY with a string type that features a collation would fail to produce the correct syntax within CREATE TABLE. mysql [mysql] [bug] MySQL 5.7 has introduced permission limiting for the “SHOW VARIABLES” command; the MySQL dialect will now handle when SHOW returns no row, in particular for the initial fetch of SQL_MODE, and will emit a warning that user permissions should be modified to allow the row to be present. mssql [mssql] [bug] Fixed bug where SQL Server transaction isolation must be fetched from a different view when using Azure data warehouse, the query is now attempted against both views and then a NotImplemented is raised unconditionally if failure continues to provide the best resiliency against future arbitrary API changes in new SQL Server versions. [mssql] [bug] Added a placeholder type mssql.XML to the SQL Server dialect, so that a reflected table which includes this type can be re-rendered as a CREATE TABLE. The type has no special round-trip behavior nor does it currently support additional qualifying arguments. oracle [oracle] [bug] Support for two-phase transactions has been removed entirely for cx_Oracle when version 6.0b1 or later of the DBAPI is in use. The two- phase feature historically has never been usable under cx_Oracle 5.x in any case, and cx_Oracle 6.x has removed the connection-level “twophase” flag upon which this feature relied. |
||
adam
|
e34f47794e | Release 1.1.10 contains a short series of fixes to specific behaviors, primarily in Core, as well as one issue with "delete orphan" cascade when using inheriting mappers. No regressions were encountered since 1.1.9. Release 1.1.10 is recommended for users who are impacted by the specific issues listed. | ||
jperkin
|
ac4dcc786d | Reset MAINTAINER after tonnerre resigned. | ||
adam
|
f631e801b0 |
Changes 1.1.9:
A continuing stream of small regressions is leading us to have to put out releases every few days at the moment. This release includes a fix to a regression that was caused by a fix to a regression :), specifically the sqlalchemy.ext.mutable fix put out in 1.1.8. It also fixes a different regression in the typing system introduced in 1.1.5, and also has a regular bug fix for another issue regarding "connectionless" execution. |
||
adam
|
3b34dba4c4 | Release 1.1.8 is only a few days past 1.1.7, however is being released early in order to deliver a few fixes requested by downstream projects. In particular, a regression from the 1.0.x series involving the sqlalchemy.ext.mutable extension is fixed. | ||
adam
|
0b93c1ad5e | Release 1.1.7 includes several bugfixes, one of which was introduced in 1.1.6 as a result of performance enhancements for joined eager loading which presents as a race condition under certain multithreaded scenarios. Fixes also include an important adjustment in the cx_Oracle dialect to adjust for changes in cx_Oracle release 5.3, resolution of an extremely small memory leak which could occur in the relatively unusual case that an arbitrarily high number of savepoints were established on a single Connection object, as well as an important fix in the "schema translate" feature. | ||
adam
|
abed96bee9 | Release 1.1.6 continues to provide bug fixes and some new features within the 1.1 series. As we begin to lead into the development phase for 1.2 and solidify the 1.1 series as "done", additional behavioral improvements will more likely to be targeted at 1.2 rather than 1.1. Nevertheless, 1.1.6 includes a few fairly major behavioral improvements in the area of performance; some significant performance issues within the "joined eager loading" functionality were identified and repaired, which should cut the Python-level latency for such a query roughly in half, as well as an unnecessary SELECT which could emit when using the "eager defaults" feature was repaired. | ||
adam
|
9561b197ca | Release 1.1.5 has many bug fixes across the ORM and Core components as well as within the Postgresql, Mysql, Oracle, and SQL Server dialects. There is also one new feature allowing MySQL index prefixes to be specified. | ||
adam
|
a3789364f8 | Release 1.0.15 features a small number of bug fixes that have been made over the past two months since the previous 1.0.x release. |