The NetBSD Project

CVS log for pkgsrc/databases/py-sqlalchemy/Makefile

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / databases / py-sqlalchemy

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.82: download - view: text, markup, annotated - select for diffs
Mon Nov 11 07:27:58 2024 UTC (4 weeks ago) by wiz
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +1 -2 lines
py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sat Oct 19 16:14:34 2024 UTC (7 weeks, 2 days ago) by adam
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -2 lines
py-sqlalchemy: updated to 2.0.36

2.0.36

orm

[orm] [usecase]

Added new parameter mapped_column.hash to ORM constructs such as sqlalchemy.orm.mapped_column(), sqlalchemy.orm.relationship(), etc., which is interpreted for ORM Native Dataclasses in the same way as other dataclass-specific field parameters.

[orm] [bug]

Fixed bug in ORM bulk update/delete where using RETURNING with bulk update/delete in combination with populate_existing would fail to accommodate the populate_existing option.

[orm] [bug]

Continuing from 11912, columns marked with mapped_column.onupdate, mapped_column.server_onupdate, or Computed are now refreshed in ORM instances when running an ORM enabled UPDATE with WHERE criteria, even if the statement does not use RETURNING or populate_existing.

[orm] [bug]

Fixed regression caused by fixes to joined eager loading in 11449 released in 2.0.31, where a particular joinedload case could not be asserted correctly. We now have an example of that case so the assertion has been repaired to allow for it.

[orm] [bug]

Improved the error message emitted when trying to map as dataclass a class while also manually providing the __table__ attribute. This usage is currently not supported.

[orm] [bug]

Refined the check which the ORM lazy loader uses to detect “this would be loading by primary key and the primary key is NULL, skip loading” to take into account the current setting for the Mapper.allow_partial_pks parameter. If this parameter is False, then a composite PK value that has partial NULL elements should also be skipped. This can apply to some composite overlapping foreign key configurations.

[orm] [bug]

Fixed bug in ORM “update with WHERE clause” feature where an explicit .returning() would interfere with the “fetch” synchronize strategy due to an assumption that the ORM mapped class featured the primary key columns in a specific position within the RETURNING. This has been fixed to use appropriate ORM column targeting.

sql

[sql] [usecase]

Datatypes that are binary based such as VARBINARY will resolve to LargeBinary when the TypeEngine.as_generic() method is called.

[sql] [bug] [regression]

Fixed regression from 1.4 where some datatypes such as those derived from TypeDecorator could not be pickled when they were part of a larger SQL expression composition due to internal supporting structures themselves not being pickleable.

schema

[schema] [bug]

Fixed bug where SQL functions passed to Column.server_default would not be rendered with the particular form of parenthesization now required by newer versions of MySQL and MariaDB. Pull request courtesy of huuya.

postgresql

[postgresql] [bug] [reflection]

Fixed bug in reflection of table comments where unrelated text would be returned if an entry in the pg_description table happened to share the same oid (objoid) as the table being reflected.

[postgresql] [bug]

The JSON and JSONB datatypes will now render a “bind cast” in all cases for all PostgreSQL backends, including psycopg2, whereas previously it was only enabled for some backends. This allows greater accuracy in allowing the database server to recognize when a string value is to be interpreted as JSON.

mysql

[mysql] [performance]

Improved a query used for the MySQL 8 backend when reflecting foreign keys to be better optimized. Previously, for a database that had millions of columns across all tables, the query could be prohibitively slow; the query has been reworked to take better advantage of existing indexes.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Sep 17 07:22:30 2024 UTC (2 months, 3 weeks ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -2 lines
py-sqlalchemy: updated to 2.0.35

2.0.35

orm

[orm] [bug] [typing]

Fixed issue where it was not possible to use typing.Literal with Mapped[] on Python 3.8 and 3.9. Pull request courtesy Frazer McLean.

[orm] [bug]

Fixed issue in ORM evaluator where two datatypes being evaluated with the SQL concatenator operator would not be checked for UnevaluatableError based on their datatype; this missed the case of JSONB values being used in a concatenate operation which is supported by PostgreSQL as well as how SQLAlchemy renders the SQL for this operation, but does not work at the Python level. By implementing UnevaluatableError for this combination, ORM update statements will now fall back to “expire” when a concatenated JSON value used in a SET clause is to be synchronized to a Python object.

[orm] [bug]

An warning is emitted if joinedload() or subqueryload() are used as a top level option against a statement that is not a SELECT statement, such as with an insert().returning(). There are no JOINs in INSERT statements nor is there a “subquery” that can be repurposed for subquery eager loading, and for UPDATE/DELETE joinedload does not support these either, so it is never appropriate for this use to pass silently.

[orm] [bug]

Fixed issue where using loader options such as selectinload() with additional criteria in combination with ORM DML such as insert() with RETURNING would not correctly set up internal contexts required for caching to work correctly, leading to incorrect results.

mysql

[mysql] [bug]

Fixed issue in mariadbconnector dialect where query string arguments that weren’t checked integer or boolean arguments would be ignored, such as string arguments like unix_socket, etc. As part of this change, the argument parsing for particular elements such as client_flags, compress, local_infile has been made more consistent across all MySQL / MariaDB dialect which accept each argument. Pull request courtesy Tobias Alex-Petersen.

sqlite

[sqlite] [bug] [regression]

The changes made for SQLite CHECK constraint reflection in versions 2.0.33 and 2.0.34, 11832 and 11677, have now been fully reverted, as users continued to identify existing use cases that stopped working after this change. For the moment, because SQLite does not provide any consistent way of delivering information about CHECK constraints, SQLAlchemy is limited in what CHECK constraint syntaxes can be reflected, including that a CHECK constraint must be stated all on a single, independent line (or inline on a column definition) without newlines, tabs in the constraint definition or unusual characters in the constraint name. Overall, reflection for SQLite is tailored towards being able to reflect CREATE TABLE statements that were originally created by SQLAlchemy DDL constructs. Long term work on a DDL parser that does not rely upon regular expressions may eventually improve upon this situation. A wide range of additional cross-dialect CHECK constraint reflection tests have been added as it was also a bug that these changes did not trip any existing tests.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sat Sep 7 05:22:04 2024 UTC (3 months ago) by adam
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -5 lines
py-sqlalchemy: updated to 2.0.34

2.0.34

orm

[orm] [bug]

Fixed regression caused by issue 11814 which broke support for certain flavors of PEP 593 Annotated in the type_annotation_map when builtin types such as list, dict were used without an element type. While this is an incomplete style of typing, these types nonetheless previously would be located in the type_annotation_map correctly.


sqlite

[sqlite] [bug]

Fixed regression in SQLite reflection caused by 11677 which interfered with reflection for CHECK constraints that were followed by other kinds of constraints within the same table definition. Pull request courtesy Harutaka Kawamura.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Aug 8 05:52:07 2024 UTC (4 months ago) by adam
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -3 lines
py-sqlalchemy: updated to 2.0.32

2.0.32

general

[general] [bug] [regression]

Restored legacy class names removed from sqlalalchemy.orm.collections.*, including MappedCollection, mapped_collection(), column_mapped_collection(), attribute_mapped_collection(). Pull request courtesy Takashi Kajinami.

orm

[orm] [usecase]

The aliased.name parameter to aliased() may now be combined with the aliased.flat parameter, producing per-table names based on a name-prefixed naming convention. Pull request courtesy Eric Atkin.

[orm] [bug] [regression]

Fixed regression going back to 1.4 where accessing a collection using the “dynamic” strategy on a transient object and attempting to query would raise an internal error rather than the expected NoResultFound that occurred in 1.3.

This change is also backported to: 1.4.53

[orm] [bug]

Fixed issue where using the Query.enable_eagerloads() and Query.yield_per() methods at the same time, in order to disable eager loading that’s configured on the mapper directly, would be silently ignored, leading to errors or unexpected eager population of attributes.

[orm] [bug] [regression]

Fixed regression appearing in 2.0.21 caused by 10279 where using a delete() or update() against an ORM class that is the base of an inheritance hierarchy, while also specifying that subclasses should be loaded polymorphically, would leak the polymorphic joins into the UPDATE or DELETE statement as well creating incorrect SQL.

[orm] [bug] [regression]

Fixed regression from version 1.4 in Session.bulk_insert_mappings() where using the Session.bulk_insert_mappings.return_defaults parameter would not populate the passed in dictionaries with newly generated primary key values.

[orm]

Added a warning noting when an ConnectionEvents.engine_connect() event may be leaving a transaction open, which can alter the behavior of a Session using such an engine as bind. On SQLAlchemy 2.1 Session.join_transaction_mode will instead be ignored in all cases when the session bind is an Engine.

examples

[examples] [bug]

Fixed issue in history_meta example where the “version” column in the versioned table needs to default to the most recent version number in the history table on INSERT, to suit the use case of a table where rows are deleted, and can then be replaced by new rows that re-use the same primary key identity. This fix adds an additonal SELECT query per INSERT in the main table, which may be inefficient; for cases where primary keys are not re-used, the default function may be omitted. Patch courtesy Philipp H. v. Loewenfeld.

engine

[engine] [bug]

Fixed issue in “insertmanyvalues” feature where a particular call to cursor.fetchall() were not wrapped in SQLAlchemy’s exception wrapper, which apparently can raise a database exception during fetch when using pyodbc.

sql

[sql] [bug]

Follow up of 11471 to fix caching issue where using the CompoundSelectState.add_cte() method of the CompoundSelectState construct would not set a correct cache key which distinguished between different CTE expressions. Also added tests that would detect issues similar to the one fixed in 11544.

[sql] [bug]

Fixed bug where the Operators.nulls_first() and Operators.nulls_last() modifiers would not be treated the same way as Operators.desc() and Operators.asc() when determining if an ORDER BY should be against a label name already in the statement. All four modifiers are now treated the same within ORDER BY.

schema

[schema] [bug]

Fixed additional issues in the event system triggered by unpickling of a Enum datatype, continuing from 11365 and 11360, where dynamically generated elements of the event structure would not be present when unpickling in a new process.

typing

[typing] [bug]

Fixed internal typing issues to establish compatibility with mypy 1.11.0. Note that this does not include issues which have arisen with the deprecated mypy plugin used by SQLAlchemy 1.4-style code; see the addiional change note for this plugin indicating revised compatibility.

mypy

[mypy] [bug]

The deprecated mypy plugin is no longer fully functional with the latest series of mypy 1.11.0, as changes in the mypy interpreter are no longer compatible with the approach used by the plugin. If code is dependent on the mypy plugin with sqlalchemy2-stubs, it’s recommended to pin mypy to be below the 1.11.0 series. Seek upgrading to the 2.0 series of SQLAlchemy and migrating to the modern type annotations.

See also

Mypy / Pep-484 Support for ORM Mappings

This change is also backported to: 1.4.53

postgresql

[postgresql] [bug]

It is now considered a pool-invalidating disconnect event when psycopg2 throws an “SSL SYSCALL error: Success” error message, which can occur when the SSL connection to Postgres is terminated abnormally.

[postgresql] [bug]

Fixed issue where the collate() construct, which explicitly sets a collation for a given expression, would maintain collation settings for the underlying type object from the expression, causing SQL expressions to have both collations stated at once when used in further expressions for specific dialects that render explicit type casts, such as that of asyncpg. The collate() construct now assigns its own type to explicitly include the new collation, assuming it’s a string type.

mysql

[mysql] [bug]

Fixed issue in MySQL dialect where ENUM values that contained percent signs were not properly escaped for the driver.

sqlite

[sqlite] [bug] [reflection]

Fixed reflection of computed column in SQLite to properly account for complex expressions.

This change is also backported to: 1.4.53

mssql

[mssql] [bug]

Fixed issue where SQL Server drivers don’t support bound parameters when rendering the “frame specification” for a window function, e.g. “ROWS BETWEEN”, etc.

This change is also backported to: 1.4.53

oracle

[oracle] [usecase]

Added API support for server-side cursors for the oracledb async dialect, allowing use of the AsyncConnection.stream() and similar stream methods.

[oracle] [usecase]

Implemented two-phase transactions for the oracledb dialect. Historically, this feature never worked with the cx_Oracle dialect, however recent improvements to the oracledb successor now allow this to be possible. The two phase transaction API is available at the Core level via the Connection.begin_twophase() method.

[oracle] [bug] [sqlite]

Implemented bitwise operators for Oracle which was previously non-functional due to a non-standard syntax used by this database. Oracle’s support for bitwise “or” and “xor” starts with server version 21. Additionally repaired the implementation of “xor” for SQLite.

As part of this change, the dialect compliance test suite has been enhanced to include support for server-side bitwise tests; third party dialect authors should refer to new “supports_bitwise” methods in the requirements.py file to enable these tests.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Jun 19 09:49:58 2024 UTC (5 months, 3 weeks ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q2-base, pkgsrc-2024Q2
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -5 lines
py-sqlalchemy: updated to 2.0.31

2.0.31

Released: June 18, 2024
general

[general] [bug]

Set up full Python 3.13 support to the extent currently possible, repairing issues within internal language helpers as well as the serializer extension module.

orm

[orm] [usecase]

Added missing parameter with_polymorphic.name that allows specifying the name of returned AliasedClass.

[orm] [bug]

Fixed issue where a MetaData collection would not be serializable, if an Enum or Boolean datatype were present which had been adapted. This specific scenario in turn could occur when using the Enum or Boolean within ORM Annotated Declarative form where type objects frequently get copied.

[orm] [bug]

Fixed issue where the selectinload() and subqueryload() loader options would fail to take effect when made against an inherited subclass that itself included a subclass-specific Mapper.with_polymorphic setting.

[orm] [bug]

Fixed very old issue involving the joinedload.innerjoin parameter where making use of this parameter mixed into a query that also included joined eager loads along a self-referential or other cyclical relationship, along with complicating factors like inner joins added for secondary tables and such, would have the chance of splicing a particular inner join to the wrong part of the query. Additional state has been added to the internal method that does this splice to make a better decision as to where splicing should proceed.

[orm] [bug] [regression]

Fixed bug in ORM Declarative where the __table__ directive could not be declared as a class function with declared_attr() on a superclass, including an __abstract__ class as well as coming from the declarative base itself. This was a regression since 1.4 where this was working, and there were apparently no tests for this particular use case.

sql

[sql] [bug]

Fixed issue when serializing an over() clause with unbounded range or rows.

[sql] [bug]

Added missing methods FunctionFilter.within_group() and WithinGroup.filter()

[sql] [bug]

Fixed bug in FunctionFilter.filter() that would mutate the existing function in-place. It now behaves like the rest of the SQLAlchemy API, returning a new instance instead of mutating the original one.

schema

[schema] [usecase]

Added Column.insert_default as an alias of Column.default for compatibility with mapped_column().

mysql

[mysql] [usecase] [reflection]

Added missing foreign key reflection option SET DEFAULT in the MySQL and MariaDB dialects. Pull request courtesy of Quentin Roche.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Wed May 8 15:15:47 2024 UTC (7 months ago) by adam
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +2 -2 lines
py-sqlalchemy: updated to 2.0.30

2.0.30

orm

[orm] [bug]

Added new attribute ORMExecuteState.is_from_statement to detect statements created using Select.from_statement(), and enhanced FromStatement to set ORMExecuteState.is_select, ORMExecuteState.is_insert, ORMExecuteState.is_update, and ORMExecuteState.is_delete according to the element that is sent to the Select.from_statement() method itself.

[orm] [bug]

Fixed issue in selectin_polymorphic() loader option where attributes defined with composite() on a superclass would cause an internal exception on load.

[orm] [bug] [regression]

Fixed regression from 1.4 where using defaultload() in conjunction with a non-propagating loader like contains_eager() would nonetheless propagate the contains_eager() to a lazy load operation, causing incorrect queries as this option is only intended to come from an original load.

[orm] [bug]

Fixed issue in ORM Annotated Declarative where typing issue where literals defined using PEP 695 type aliases would not work with inference of Enum datatypes. Pull request courtesy of Alc-Alc.

[orm] [bug]

Fixed issue in selectin_polymorphic() loader option where the SELECT emitted would only accommodate for the child-most class among the result rows that were returned, leading intermediary-class attributes to be unloaded if there were no concrete instances of that intermediary-class present in the result. This issue only presented itself for multi-level inheritance hierarchies.

[orm] [bug]

Fixed issue in Session.bulk_save_objects() where the form of the identity key produced when using return_defaults=True would be incorrect. This could lead to an errors during pickling as well as identity map mismatches.

[orm] [bug]

Fixed issue where attribute key names in Bundle would not be correct when using ORM enabled select vs. Query, when the statement contained duplicate column names.

engine

[engine] [bug]

Fixed issue in the Connection.execution_options.logging_token option, where changing the value of logging_token on a connection that has already logged messages would not be updated to reflect the new logging token. This in particular prevented the use of Session.connection() to change the option on the connection, since the BEGIN logging message would already have been emitted.

[engine] [bug]

Fixed issue in cursor handling which affected handling of duplicate Column or similar objcts in the columns clause of select(), both in combination with arbitary text() clauses in the SELECT list, as well as when attempting to retrieve Result.mappings() for the object, which would lead to an internal error.

typing

[typing] [bug] [regression]

Fixed typing regression caused by 11055 in version 2.0.29 that added ParamSpec to the asyncio run_sync() methods, where using AsyncConnection.run_sync() with MetaData.reflect() would fail on mypy due to a mypy issue. Pull request courtesy of Francisco R. Del Roio.

[typing] [bug]

Fixed issue in typing for Bundle where creating a nested Bundle structure were not allowed.

misc

[bug] [test]

Ensure the PYTHONPATH variable is properly initialized when using subprocess.run in the tests.

[bug] [installation]

Fixed an internal class that was testing for unexpected attributes to work correctly under upcoming Python 3.13. Pull request courtesy Edgar Ramírez-Mondragón.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Apr 2 18:11:22 2024 UTC (8 months, 1 week ago) by adam
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
py-sqlalchemy: updated to 2.0.29

2.0.29

Released: March 23, 2024
orm

[orm] [usecase]

Added support for the PEP 695 TypeAliasType construct as well as the python 3.12 native type keyword to work with ORM Annotated Declarative form when using these constructs to link to a PEP 593 Annotated container, allowing the resolution of the Annotated to proceed when these constructs are used in a Mapped typing container.


[orm] [bug]

Fixed Declarative issue where typing a relationship using Relationship rather than Mapped would inadvertently pull in the “dynamic” relationship loader strategy for that attribute.


[orm] [bug]

Fixed issue in ORM annotated declarative where using mapped_column() with an mapped_column.index or mapped_column.unique setting of False would be overridden by an incoming Annotated element that featured that parameter set to True, even though the immediate mapped_column() element is more specific and should take precedence. The logic to reconcile the booleans has been enhanced to accommodate a local value of False as still taking precedence over an incoming True value from the annotated element.


[orm] [bug] [regression]

Fixed regression from version 2.0.28 caused by the fix for 11085 where the newer method of adjusting post-cache bound parameter values would interefere with the implementation for the subqueryload() loader option, which has some more legacy patterns in use internally, when the additional loader criteria feature were used with this loader option.


engine

[engine] [bug]

Fixed issue in “Insert Many Values” Behavior for INSERT statements feature where using a primary key column with an “inline execute” default generator such as an explicit Sequence with an explcit schema name, while at the same time using the Connection.execution_options.schema_translate_map feature would fail to render the sequence or the parameters properly, leading to errors.


[engine] [bug]

Made a change to the adjustment made in version 2.0.10 for 9618, which added the behavior of reconciling RETURNING rows from a bulk INSERT to the parameters that were passed to it. This behavior included a comparison of already-DB-converted bound parameter values against returned row values that was not always “symmetrical” for SQL column types such as UUIDs, depending on specifics of how different DBAPIs receive such values versus how they return them, necessitating the need for additional “sentinel value resolver” methods on these column types. Unfortunately this broke third party column types such as UUID/GUID types in libraries like SQLModel which did not implement this special method, raising an error “Can’t match sentinel values in result set to parameter sets”. Rather than attempt to further explain and document this implementation detail of the “insertmanyvalues” feature including a public version of the new method, the approach is intead revised to no longer need this extra conversion step, and the logic that does the comparison now works on the pre-converted bound parameter value compared to the post-result-processed value, which should always be of a matching datatype. In the unusual case that a custom SQL column type that also happens to be used in a “sentinel” column for bulk INSERT is not receiving and returning the same value type, the “Can’t match” error will be raised, however the mitigation is straightforward in that the same Python datatype should be passed as that returned.


sql

[sql] [bug] [regression]

Fixed regression from the 1.4 series where the refactor of the TypeEngine.with_variant() method introduced at “with_variant()” clones the original TypeEngine rather than changing the type failed to accommodate for the .copy() method, which will lose the variant mappings that are set up. This becomes an issue for the very specific case of a “schema” type, which includes types such as Enum and ARRAY, when they are then used in the context of an ORM Declarative mapping with mixins where copying of types comes into play. The variant mapping is now copied as well.


typing

[typing] [bug]

Fixed typing issue allowing asyncio run_sync() methods to correctly type the parameters according to the callable that was passed, making use of PEP 612 ParamSpec variables. Pull request courtesy Francisco R. Del Roio.


postgresql

[postgresql] [usecase]

The PostgreSQL dialect now returns DOMAIN instances when reflecting a column that has a domain as type. Previously, the domain data type was returned instead. As part of this change, the domain reflection was improved to also return the collation of the text types. Pull request courtesy of Thomas Stephenson.


tests

[tests] [bug]

Backported to SQLAlchemy 2.0 an improvement to the test suite with regards to how asyncio related tests are run, now using the newer Python 3.11 asyncio.Runner or a backported equivalent, rather than relying on the previous implementation based on asyncio.get_running_loop(). This should hopefully prevent issues with large suite runs on CPU loaded hardware where the event loop seems to become corrupted, leading to cascading failures.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sun Mar 31 19:19:12 2024 UTC (8 months, 1 week ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +4 -2 lines
py-sqlalchemy: requires py-cython; fix PLIST; bump revision

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Mar 6 21:40:57 2024 UTC (9 months ago) by wiz
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +9 -7 lines
py-sqlalchemy: update to 2.0.28.

This is a major new version, lots of code cleanups and
adaptations to work better with Python 3.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sun Jul 30 15:32:48 2023 UTC (16 months, 1 week ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +1 -7 lines
Remove dependencies for Python 3.7

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri May 12 14:03:10 2023 UTC (18 months, 4 weeks ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q2-base, pkgsrc-2023Q2
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +9 -1 lines
py-sqlalchemy: add missing dependency

Bump PKGREVISION.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon May 8 21:02:24 2023 UTC (19 months ago) by markd
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +2 -3 lines
py-sqlalchemy: update to 1.4.48

Version 1.4 is taking on a different focus than other SQLAlchemy releases
in that it is in many ways attempting to serve as a potential migration
point for a more dramatic series of API changes currently planned for release
2.0 of SQLAlchemy. The focus of SQLAlchemy 2.0 is a modernized and slimmed
down API that removes lots of usage patterns that have long been discouraged,
as well as mainstreams the best ideas in SQLAlchemy as first class API features,
with the goal being that there is much less ambiguity in how the API is to be
used, as well as that a series of implicit behaviors and rarely-used API flags
that complicate the internals and hinder performance will be removed.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Aug 24 09:50:40 2022 UTC (2 years, 3 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3 lines
py-sqlalchemy*: restrict to python 3.x

Revision 1.68: download - view: text, markup, annotated - select for diffs
Tue Jan 4 20:52:44 2022 UTC (2 years, 11 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +2 -1 lines
*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS

Revision 1.67: download - view: text, markup, annotated - select for diffs
Mon Jan 18 09:50:36 2021 UTC (3 years, 10 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -2 lines
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.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Dec 18 08:19:28 2020 UTC (3 years, 11 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -2 lines
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().

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Oct 21 08:58:38 2020 UTC (4 years, 1 month ago) by adam
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +2 -2 lines
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.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Sep 10 09:19:16 2020 UTC (4 years, 3 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +2 -2 lines
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__.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Wed Jul 8 14:40:26 2020 UTC (4 years, 5 months ago) by adam
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +2 -2 lines
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;

Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon May 18 10:43:21 2020 UTC (4 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +5 -4 lines
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.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Apr 10 07:58:16 2020 UTC (4 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -2 lines
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.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Mar 22 22:45:24 2020 UTC (4 years, 8 months ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +1 -3 lines
databases/py-sqlalchemy: remove nonexistent file

The test runner has apparently been replaced with a test suite.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Feb 4 16:57:20 2020 UTC (4 years, 10 months ago) by adam
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -2 lines
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.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Dec 3 18:19:58 2019 UTC (5 years ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -2 lines
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.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:22:49 2019 UTC (5 years, 2 months ago) by adam
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -2 lines
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.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Aug 28 06:32:52 2019 UTC (5 years, 3 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -2 lines
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.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Aug 26 10:26:49 2019 UTC (5 years, 3 months ago) by adam
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -3 lines
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.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Jul 3 20:19:11 2019 UTC (5 years, 5 months ago) by adam
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -2 lines
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.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed May 29 21:11:51 2019 UTC (5 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q2-base, pkgsrc-2019Q2
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -2 lines
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.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Apr 29 10:26:27 2019 UTC (5 years, 7 months ago) by adam
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
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.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Apr 2 08:59:13 2019 UTC (5 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
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

Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed Feb 20 15:56:15 2019 UTC (5 years, 9 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -2 lines
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

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Jan 28 10:49:50 2019 UTC (5 years, 10 months ago) by adam
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
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

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Jan 15 11:51:27 2019 UTC (5 years, 10 months ago) by adam
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -2 lines
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

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Dec 13 11:46:16 2018 UTC (5 years, 11 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
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.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Nov 11 21:58:41 2018 UTC (6 years ago) by adam
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
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.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Nov 1 12:50:17 2018 UTC (6 years, 1 month ago) by adam
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -2 lines
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.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Sep 21 07:49:49 2018 UTC (6 years, 2 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -2 lines
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.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Aug 21 08:35:09 2018 UTC (6 years, 3 months ago) by adam
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -2 lines
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.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Jul 24 07:19:27 2018 UTC (6 years, 4 months ago) by adam
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -2 lines
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.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Jul 3 05:34:20 2018 UTC (6 years, 5 months ago) by adam
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -2 lines
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.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed May 30 07:33:29 2018 UTC (6 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
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.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Apr 27 06:51:55 2018 UTC (6 years, 7 months ago) by adam
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -5 lines
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.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Apr 2 13:06:16 2018 UTC (6 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -2 lines
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.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Mar 12 16:51:20 2018 UTC (6 years, 9 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2 lines
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.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Feb 23 14:10:32 2018 UTC (6 years, 9 months ago) by adam
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
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.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Thu Feb 22 09:53:07 2018 UTC (6 years, 9 months ago) by adam
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -2 lines
py-sqlalchemy: updated to 1.2.3

Release 1.2.3 includes fixes for a variety of ORM, Core, and dialect-specific issues.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Jan 29 13:44:32 2018 UTC (6 years, 10 months ago) by adam
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
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.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Jan 18 09:12:17 2018 UTC (6 years, 10 months ago) by adam
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -2 lines
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.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Sep 13 17:29:06 2017 UTC (7 years, 2 months ago) by minskim
Branches: MAIN
CVS tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
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.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Aug 3 18:21:51 2017 UTC (7 years, 4 months ago) by adam
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
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.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Jul 25 10:28:08 2017 UTC (7 years, 4 months ago) by adam
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
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.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Jun 20 07:32:19 2017 UTC (7 years, 5 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
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.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Jun 1 09:58:42 2017 UTC (7 years, 6 months ago) by adam
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
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.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Apr 19 11:24:37 2017 UTC (7 years, 7 months ago) by jperkin
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -2 lines
Reset MAINTAINER after tonnerre resigned.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Apr 5 15:47:28 2017 UTC (7 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
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.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Apr 1 15:43:54 2017 UTC (7 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
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.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Mar 30 08:00:01 2017 UTC (7 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
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.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Mar 12 12:21:16 2017 UTC (7 years, 9 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
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.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Feb 1 13:03:16 2017 UTC (7 years, 10 months ago) by adam
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
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.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Sep 7 13:43:05 2016 UTC (8 years, 3 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -2 lines
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.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Jul 22 20:47:00 2016 UTC (8 years, 4 months ago) by adam
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -2 lines
SQLAlchemy release 1.0.14 is now available.

This is the latest release in the 1.0 series which includes a variety of bug fixes that have accumulated since the last 1.0 release. This release happens to only feature Core and dialect level changes; none are ORM specific. All applicable fixes here are also in the 1.1 series, most of which are already released as of 1.1.0b2. As the 1.1 series moves towards final release, the 1.0 series will move into "maintenance" mode with very few additional changes being made.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Jun 2 10:29:03 2016 UTC (8 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2016Q2-base, pkgsrc-2016Q2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
Changes 1.0.13

Fixed bug in “evaluate” strategy of Query.update() and Query.delete() which would fail to accommodate a bound parameter with a “callable” value, as which occurs when filtering by a many-to-one equality expression along a relationship.

Fixed bug whereby the event listeners used for backrefs could be inadvertently applied multiple times, when using a deep class inheritance hierarchy in conjunction with mutiple mapper configuration steps.

Fixed bug whereby passing a text() construct to the Query.group_by() method would raise an error, instead of intepreting the object as a SQL fragment.

Anonymous labeling is applied to a func construct that is passed to column_property(), so that if the same attribute is referred to as a column expression twice the names are de-duped, thus avoiding “ambiguous column” errors. Previously, the .label(None) would need to be applied in order for the name to be de-anonymized.

Fixed regression appearing in the 1.0 series in ORM loading where the exception raised for an expected column missing would incorrectly be a NoneType error, rather than the expected NoSuchColumnError.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Apr 11 09:24:24 2016 UTC (8 years, 8 months ago) by adam
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
Release 1.0.12 is a bug fix release resolving a handful of issues reported in the past few weeks. Primary development continues on the 1.1 series which is slated for initial releases in the spring.

1.0.12 includes relatively minor fixes, including a revision to a fix made for version 1.0.10 where we're attempting to report on the "cause" of an error that is interrupted by a later failure to emit a ROLLBACK on the MySQL platform. While Python 3 solves this problem using exception chaining and cause reporting, on Python 2 we emit a warning so that the cause isn't totally concealed. The condition has been expanded to emit this warning in a much wider range of scenarios.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Jan 3 10:52:32 2016 UTC (8 years, 11 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2016Q1-base, pkgsrc-2016Q1
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
Release 1.0.11, only twelve days after 1.0.10's release, is expedited to correct for one ORM-related regression introduced by a 1.0.10 fix; some other fairly significant bugfixes involving more recently added features, all reported subsequent to the release of 1.0.10, were also fixed. Fixes include a major issue in the "baked lazy loader" extension when used as a systemwide-replacement for lazy loading, a major series of fixes to the "eager_defaults" mapper persistence option, and a revision to 1.0.10's fix for a particular polymorphic joined-eager loading issue.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Nov 18 10:41:39 2015 UTC (9 years ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2015Q4-base, pkgsrc-2015Q4
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
Changes 1.0.9:
Release 1.0.9 is a bugfix release, pushing out a collection of mostly small fixes that have accumulated over the past few months. In particular there is one small but important fix for users of the latest cx_Oracle library (5.2 or greater) in conjunction with Python 3 that corrects for an important issue in correctly detecting the version of this DBAPI and its Unicode behavior.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Aug 1 09:30:52 2015 UTC (9 years, 4 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2015Q3-base, pkgsrc-2015Q3
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -4 lines
Release 1.0.8 comes almost immediately after 1.0.7, as a new issue involving the connection pool has been identified and fixed which impacts any application that relies upon consistent behavior of the .info dictionary on a connection that is undergoing reconnect attempts. Applications and libraries which make use of connection pool event handlers may benefit from this release, as it repairs the behavior of the .info dictionary and reduces the likelihood of stale connections being passed to the "checkout" handler.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Mar 15 14:04:30 2015 UTC (9 years, 8 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
Release 0.9.9 is a large maintenance release featuring 30 changes, mostly bug fixes. A handful of modest feature adds are also present, including new Core features for SQLite, Postgresql, and new API features to provide better control of transaction isolation level when using the ORM.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Oct 17 11:10:21 2014 UTC (10 years, 1 month ago) by fhajny
Branches: MAIN
CVS tags: pkgsrc-2014Q4-base, pkgsrc-2014Q4
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
Update py-sqlalchemy to 0.9.8.

Changes since 0.9.4: bug fixes in preparation for 1.0.0. See full changelog:

http://docs.sqlalchemy.org/en/latest/changelog/changelog_09.html

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Jun 14 16:20:45 2014 UTC (10 years, 5 months ago) by rodent
Branches: MAIN
CVS tags: pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -4 lines
Updated to latest stable release, 0.9.4. This was required, because some
newer py-sqlalchemy-* packages won't work with our archive version. Changes
are too numerous to list here. Check:
http://docs.sqlalchemy.org/en/latest/changelog/

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Jan 20 22:27:00 2014 UTC (10 years, 10 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2014Q1-base, pkgsrc-2014Q1
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -2 lines
Fix PLIST for python-3.x. Fix interpreter path in installed file.
Bump PKGREVISION.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Dec 14 08:47:18 2013 UTC (10 years, 11 months ago) by obache
Branches: MAIN
CVS tags: pkgsrc-2013Q4-base, pkgsrc-2013Q4
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -2 lines
no need to set PYDISTUTILSPKG=yes here.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Oct 15 14:40:15 2013 UTC (11 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
Dependency (py-mock) doesn't support Python 3.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Oct 14 17:57:30 2013 UTC (11 years, 1 month ago) by tonnerre
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -2 lines
Update py-sqlalchemy to version 0.8.2.

Changes since 0.7.10:
 - Compatibility for Python 2.4 is being dropped.
 - The primaryjoin argument is no longer needed when constructing a
   relationship() against a class that has multiple foreign key paths to the
   target.
 - Relationships against self-referential, composite foreign keys where a
   column points to itself are now supported.
 - Previously difficult custom join conditions, like those involving
   functions and/or CASTing of types, will now function as expected in most
   cases.
 - New Class/Object Inspection System.
 - A new enhancement to the aliased() construct has been added called
   with_polymorphic() which allows any entity to be “aliased” into a
   “polymorphic” version of itself, freely usable anywhere.
 - The PropComparator.of_type() method can now be used to target any number
   of target subtypes, by combining it with the new with_polymorphic()
   function.
 - Mapper and instance events can now be associated with an unmapped
   superclass, where those events will be propagated to subclasses as those
   subclasses are mapped. The propagate=True flag should be used.
 - The registry of class names is now sensitive to the owning module and
   package of a given class. The classes can be referred to via dotted name
   in expressions.
 - The “deferred reflection” feature allows the construction of declarative
   mapped classes with only placeholder Table metadata, until a prepare()
   step is called, given an Engine with which to reflect fully all tables
   and establish actual mappings. The system supports overriding of columns,
   single and joined inheritance, as well as distinct bases-per-engine.
 - A new SQL registration system allows a mapped class to be accepted as a
   FROM clause within the core.
 - The new UPDATE..FROM mechanics work in query.update().
 - Upon rollback(), only those objects that were made dirty since the last
   flush will be expired, the rest of the Session remains intact.
 - Caching Example now uses dogpile.cache.
 - The new operator system in Core associates new and overridden operators
   with types.
 - SQL expressions can now be associated with types.
 - The inspect() function introduced in New Class/Object Inspection System
   also applies to the core.
 - select() now has a method Select.correlate_except() which specifies
   “correlate on all FROM clauses except those specified”.
 - Support for Postgresql’s HSTORE type is now available as
   postgresql.HSTORE. This type makes great usage of the new operator system
   to provide a full range of operators for HSTORE types, including index
   access, concatenation, and containment methods such as has_key(),
   has_any(), and matrix().
 - The postgresql.ARRAY type will accept an optional “dimension” argument,
   pinning it to a fixed number of dimensions and greatly improving
   efficiency when retrieving results.
 - SQLite has no built-in DATE, TIME, or DATETIME types, and instead
   provides some support for storage of date and time values either as
   strings or integers.
 - The “collate” keyword, long accepted by the MySQL dialect, is now
   established on all String types and will render on any backend, including
   when features such as MetaData.create_all() and cast() is used.
 - Geared towards MySQL, a “prefix” can be rendered within any of these
   constructs.
 - The consideration of a “pending” object as an “orphan” has been made more
   aggressive.
 - The after_attach event fires after the item is associated with the
   Session instead of before; before_attach added.
 - Query now auto-correlates like a select() does.
 - Correlation is now always context-specific.
 - create_all() and drop_all() will now honor an empty list as such.
 - Repaired the Event Targeting of InstrumentationEvents.
 - No more magic coercion of “=” to IN when comparing to subquery in
   MS-SQL.
 - The Session.is_modified() method accepts an argument passive which
   basically should not be necessary, the argument in all cases should be
   the value True - when left at its default of False it would have the
   effect of hitting the database, and often triggering autoflush which
   would itself change the results. In 0.8 the passive argument will have no
   effect, and unloaded attributes will never be checked for history since
   by definition there can be no pending state change on an unloaded
   attribute.
 - Column.key is honored in the Select.c attribute of select() with
   Select.apply_labels().
 - A relationship() that is many-to-one or many-to-many and specifies
   “cascade=’all, delete-orphan’”, which is an awkward but nonetheless
   supported use case (with restrictions) will now raise an error if the
   relationship does not specify the single_parent=True option.
 - Adding the inspector argument to the column_reflect event.
 - The MySQL dialect does two calls, one very expensive, to load all
   possible collations from the database as well as information on casing,
   the first time an Engine connects. Neither of these collections are used
   for any SQLAlchemy functions, so these calls will be changed to no longer
   be emitted automatically. Applications that might have relied on these
   collections being present on engine.dialect will need to call upon
   _detect_collations() and _detect_casing() directly.
 - Inspector.get_primary_keys() is deprecated, use
   Inspector.get_pk_constraint.
 - Case-insensitive result row names will be disabled in most cases. It will
   be available only optionally, by passing the flag `case_sensitive=False`
   to `create_engine()`, but otherwise column names requested from the row
   must match as far as casing.
 - The sqlalchemy.orm.interfaces.InstrumentationManager class is moved to
   sqlalchemy.ext.instrumentation.InstrumentationManager.
 - SQLSoup is now moved into its own project and documented/released
   separately; see https://bitbucket.org/zzzeek/sqlsoup.
 - The older “mutable” system within the SQLAlchemy ORM has been removed.
 - We had left in an alias sqlalchemy.exceptions to attempt to make it
   slightly easier for some very old libraries that hadn’t yet been upgraded
   to use sqlalchemy.exc. Some users are still being confused by it however
   so in 0.8 we’re taking it out entirely to eliminate any of that confusion.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Jun 16 05:36:13 2013 UTC (11 years, 5 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -7 lines
Changes 0.7.10:
This is a bugfix release, sending out a series of fixes that have accumulated as version 0.8.0's release is imminent.
Fixes in this version include issues related to the Oracle, SQL Server, MySQL, and Google App Engine dialects, as well as a few schema related and ORM related fixes.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Oct 16 06:48:15 2012 UTC (12 years, 1 month ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1 lines
Mark as ready for python-3.x.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Oct 2 21:25:50 2012 UTC (12 years, 2 months ago) by asau
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -3 lines
Drop superfluous PKG_DESTDIR_SUPPORT, "user-destdir" is default these days.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue May 29 13:22:28 2012 UTC (12 years, 6 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -2 lines
Update to 0.6.9. Set LICENSE.

SQLAlchemy 0.6.9, a maintenance release of the 0.6 branch, is now
available.

The 0.6 series has not seen a release since 0.6.8 was released
nearly a year ago. During that time, the 0.7 series has gone through
over six releases, gaining many new features and bug fixes. A
portion of these fixes have been backported to 0.6 since 0.6.8,
including twelve ORM fixes, so 0.6.9 is an effort to make these
fixes widely available to those installations who have not yet
upgraded to 0.7. The release coincides at the same time as release
0.7.7, which is also fast approaching maintenance-only mode with
0.8 now well underway and close to initial beta releases.

Care has been taken in 0.6.9 to minimize as much as possible the
potential for backwards-incompatibilities with existing code, which
sometimes can occur if an application is unknowingly relying upon
a buggy behavior that is then fixed. So while 0.6.9 is a very
conservative release, it does still represent changes over a year's
time; users are strongly urged to carefully review the CHANGES file
to see exactly what's been adjusted, and to test it fully in their
existing 0.6 applications before promoting it to production.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat May 1 15:43:41 2010 UTC (14 years, 7 months ago) by tonnerre
Branches: MAIN
CVS tags: pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
Update SQLalchemy to version 0.6.0.

Changes since 0.5.6:

0.6.0
=====

- orm
  - Unit of work internals have been rewritten.  Units of work
    with large numbers of objects interdependent objects
    can now be flushed without recursion overflows
    as there is no longer reliance upon recursive calls
    [ticket:1081].  The number of internal structures now stays
    constant for a particular session state, regardless of
    how many relationships are present on mappings.  The flow
    of events now corresponds to a linear list of steps,
    generated by the mappers and relationships based on actual
    work to be done, filtered through a single topological sort
    for correct ordering.  Flush actions are assembled using
    far fewer steps and less memory. [ticket:1742]

  - Along with the UOW rewrite, this also removes an issue
    introduced in 0.6beta3 regarding topological cycle detection
    for units of work with long dependency cycles.  We now use
    an algorithm written by Guido (thanks Guido!).

  - one-to-many relationships now maintain a list of positive
    parent-child associations within the flush, preventing
    previous parents marked as deleted from cascading a
    delete or NULL foreign key set on those child objects,
    despite the end-user not removing the child from the old
    association. [ticket:1764]

  - A collection lazy load will switch off default
    eagerloading on the reverse many-to-one side, since
    that loading is by definition unnecessary.  [ticket:1495]

  - Session.refresh() now does an equivalent expire()
    on the given instance first, so that the "refresh-expire"
    cascade is propagated.   Previously, refresh() was
    not affected in any way by the presence of "refresh-expire"
    cascade.   This is a change in behavior versus that
    of 0.6beta2, where the "lockmode" flag passed to refresh()
    would cause a version check to occur.  Since the instance
    is first expired, refresh() always upgrades the object
    to the most recent version.

  - The 'refresh-expire' cascade, when reaching a pending object,
    will expunge the object if the cascade also includes
    "delete-orphan", or will simply detach it otherwise.
    [ticket:1754]

  - id(obj) is no longer used internally within topological.py,
    as the sorting functions now require hashable objects
    only.  [ticket:1756]

  - The ORM will set the docstring of all generated descriptors
    to None by default.  This can be overridden using 'doc'
    (or if using Sphinx, attribute docstrings work too).

  - Added kw argument 'doc' to all mapper property callables
    as well as Column().  Will assemble the string 'doc' as
    the '__doc__' attribute on the descriptor.

  - Usage of version_id_col on a backend that supports
    cursor.rowcount for execute() but not executemany() now works
    when a delete is issued (already worked for saves, since those
    don't use executemany()). For a backend that doesn't support
    cursor.rowcount at all, a warning is emitted the same
    as with saves.  [ticket:1761]

  - The ORM now short-term caches the "compiled" form of
    insert() and update() constructs when flushing lists of
    objects of all the same class, thereby avoiding redundant
    compilation per individual INSERT/UPDATE within an
    individual flush() call.

  - internal getattr(), setattr(), getcommitted() methods
    on ColumnProperty, CompositeProperty, RelationshipProperty
    have been underscored (i.e. are private), signature has
    changed.

- engines
  - The C extension now also works with DBAPIs which use custom
    sequences as row (and not only tuples). [ticket:1757]

- sql
  - Restored some bind-labeling logic from 0.5 which ensures
    that tables with column names that overlap another column
    of the form "<tablename>_<columnname>" won't produce
    errors if column._label is used as a bind name during
    an UPDATE.  Test coverage which wasn't present in 0.5
    has been added.  [ticket:1755]

  - somejoin.select(fold_equivalents=True) is no longer
    deprecated, and will eventually be rolled into a more
    comprehensive version of the feature for [ticket:1729].

  - the Numeric type raises an *enormous* warning when expected
    to convert floats to Decimal from a DBAPI that returns floats.
    This includes SQLite, Sybase, MS-SQL. [ticket:1759]

  - Fixed an error in expression typing which caused an endless
    loop for expressions with two NULL types.

  - Fixed bug in execution_options() feature whereby the existing
    Transaction and other state information from the parent
    connection would not be propagated to the sub-connection.

  - Added new 'compiled_cache' execution option.  A dictionary
    where Compiled objects will be cached when the Connection
    compiles a clause expression into a dialect- and parameter-
    specific Compiled object.  It is the user's responsibility to
    manage the size of this dictionary, which will have keys
    corresponding to the dialect, clause element, the column
    names within the VALUES or SET clause of an INSERT or UPDATE,
    as well as the "batch" mode for an INSERT or UPDATE statement.

  - Added get_pk_constraint() to reflection.Inspector, similar
    to get_primary_keys() except returns a dict that includes the
    name of the constraint, for supported backends (PG so far).
    [ticket:1769]

  - Table.create() and Table.drop() no longer apply metadata-
    level create/drop events.  [ticket:1771]

- ext
  - the compiler extension now allows @compiles decorators
    on base classes that extend to child classes, @compiles
    decorators on child classes that aren't broken by a
    @compiles decorator on the base class.

  - Declarative will raise an informative error message
    if a non-mapped class attribute is referenced in the
    string-based relationship() arguments.

  - Further reworked the "mixin" logic in declarative to
    additionally allow __mapper_args__ as a @classproperty
    on a mixin, such as to dynamically assign polymorphic_identity.

- postgresql
  - Postgresql now reflects sequence names associated with
    SERIAL columns correctly, after the name of of the sequence
    has been changed.  Thanks to Kumar McMillan for the patch.
    [ticket:1071]

  - Repaired missing import in psycopg2._PGNumeric type when
    unknown numeric is received.

  - psycopg2/pg8000 dialects now aware of REAL[], FLOAT[],
    DOUBLE_PRECISION[], NUMERIC[] return types without
    raising an exception.

  - Postgresql reflects the name of primary key constraints,
    if one exists.  [ticket:1769]

- oracle
  - Now using cx_oracle output converters so that the
    DBAPI returns natively the kinds of values we prefer:
    - NUMBER values with positive precision + scale convert
      to cx_oracle.STRING and then to Decimal.   This
      allows perfect precision for the Numeric type when
      using cx_oracle.  [ticket:1759]
    - STRING/FIXED_CHAR now convert to unicode natively.
      SQLAlchemy's String types then don't need to
      apply any kind of conversions.

- firebird
   - The functionality of result.rowcount can be disabled on a
     per-engine basis by setting 'enable_rowcount=False'
     on create_engine().  Normally, cursor.rowcount is called
     after any UPDATE or DELETE statement unconditionally,
     because the cursor is then closed and Firebird requires
     an open cursor in order to get a rowcount.  This
     call is slightly expensive however so it can be disabled.
     To re-enable on a per-execution basis, the
     'enable_rowcount=True' execution option may be used.

- examples
  - Updated attribute_shard.py example to use a more robust
    method of searching a Query for binary expressions which
    compare columns against literal values.

0.6beta3
========

- orm
  - Major feature: Added new "subquery" loading capability to
    relationship().   This is an eager loading option which
    generates a second SELECT for each collection represented
    in a query, across all parents at once.  The query
    re-issues the original end-user query wrapped in a subquery,
    applies joins out to the target collection, and loads
    all those collections fully in one result, similar to
    "joined" eager loading but using all inner joins and not
    re-fetching full parent rows repeatedly (as most DBAPIs seem
    to do, even if columns are skipped).   Subquery loading is
    available at mapper config level using "lazy='subquery'" and
    at the query options level using "subqueryload(props..)",
    "subqueryload_all(props...)".  [ticket:1675]

  - To accomodate the fact that there are now two kinds of eager
    loading available, the new names for eagerload() and
    eagerload_all() are joinedload() and joinedload_all().  The
    old names will remain as synonyms for the foreseeable future.

  - The "lazy" flag on the relationship() function now accepts
    a string argument for all kinds of loading: "select", "joined",
    "subquery", "noload" and "dynamic", where the default is now
    "select".  The old values of True/
    False/None still retain their usual meanings and will remain
    as synonyms for the foreseeable future.

  - Added with_hint() method to Query() construct.  This calls
    directly down to select().with_hint() and also accepts
    entities as well as tables and aliases.  See with_hint() in the
    SQL section below. [ticket:921]

  - Fixed bug in Query whereby calling q.join(prop).from_self(...).
    join(prop) would fail to render the second join outside the
    subquery, when joining on the same criterion as was on the
    inside.

  - Fixed bug in Query whereby the usage of aliased() constructs
    would fail if the underlying table (but not the actual alias)
    were referenced inside the subquery generated by
    q.from_self() or q.select_from().

  - Fixed bug which affected all eagerload() and similar options
    such that "remote" eager loads, i.e. eagerloads off of a lazy
    load such as query(A).options(eagerload(A.b, B.c))
    wouldn't eagerload anything, but using eagerload("b.c") would
    work fine.

  - Query gains an add_columns(*columns) method which is a multi-
    version of add_column(col).  add_column(col) is future
    deprecated.

  - Query.join() will detect if the end result will be
    "FROM A JOIN A", and will raise an error if so.

  - Query.join(Cls.propname, from_joinpoint=True) will check more
    carefully that "Cls" is compatible with the current joinpoint,
    and act the same way as Query.join("propname", from_joinpoint=True)
    in that regard.

- sql
   - Added with_hint() method to select() construct.  Specify
     a table/alias, hint text, and optional dialect name, and
     "hints" will be rendered in the appropriate place in the
     statement.  Works for Oracle, Sybase, MySQL.  [ticket:921]

   - Fixed bug introduced in 0.6beta2 where column labels would
     render inside of column expressions already assigned a label.
     [ticket:1747]

- postgresql
   - The psycopg2 dialect will log NOTICE messages via the
     "sqlalchemy.dialects.postgresql" logger name.
     [ticket:877]

   - the TIME and TIMESTAMP types are now availble from the
     postgresql dialect directly, which add the PG-specific
     argument 'precision' to both.   'precision' and
     'timezone' are correctly reflected for both TIME and
     TIMEZONE types. [ticket:997]

- mysql
   - No longer guessing that TINYINT(1) should be BOOLEAN
     when reflecting - TINYINT(1) is returned.  Use Boolean/
     BOOLEAN in table definition to get boolean conversion
     behavior.  [ticket:1752]

- oracle
   - The Oracle dialect will issue VARCHAR type definitions
     using character counts, i.e. VARCHAR2(50 CHAR), so that
     the column is sized in terms of characters and not bytes.
     Column reflection of character types will also use
     ALL_TAB_COLUMNS.CHAR_LENGTH instead of
     ALL_TAB_COLUMNS.DATA_LENGTH.  Both of these behaviors take
     effect when the server version is 9 or higher - for
     version 8, the old behaviors are used.  [ticket:1744]

- declarative
   - Using a mixin won't break if the mixin implements an
     unpredictable __getattribute__(), i.e. Zope interfaces.
     [ticket:1746]

   - Using @classdecorator and similar on mixins to define
     __tablename__, __table_args__, etc. now works if
     the method references attributes on the ultimate
     subclass. [ticket:1749]

   - relationships and columns with foreign keys aren't
     allowed on declarative mixins, sorry.  [ticket:1751]

- ext
    - The sqlalchemy.orm.shard module now becomes an extension,
      sqlalchemy.ext.horizontal_shard.   The old import
      works with a deprecation warning.

0.6beta2
========

- py3k
  - Improved the installation/test setup regarding Python 3,
    now that Distribute runs on Py3k.   distribute_setup.py
    is now included.  See README.py3k for Python 3 installation/
    testing instructions.

- orm
  - The official name for the relation() function is now
    relationship(), to eliminate confusion over the relational
    algebra term.  relation() however will remain available
    in equal capacity for the foreseeable future.  [ticket:1740]

  - Added "version_id_generator" argument to Mapper, this is a
    callable that, given the current value of the "version_id_col",
    returns the next version number.  Can be used for alternate
    versioning schemes such as uuid, timestamps.  [ticket:1692]

  - added "lockmode" kw argument to Session.refresh(), will
    pass through the string value to Query the same as
    in with_lockmode(), will also do version check for a
    version_id_col-enabled mapping.

  - Fixed bug whereby calling query(A).join(A.bs).add_entity(B)
    in a joined inheritance scenario would double-add B as a
    target and produce an invalid query.  [ticket:1188]

  - Fixed bug in session.rollback() which involved not removing
    formerly "pending" objects from the session before
    re-integrating "deleted" objects, typically occured with
    natural primary keys. If there was a primary key conflict
    between them, the attach of the deleted would fail
    internally. The formerly "pending" objects are now expunged
    first. [ticket:1674]

  - Removed a lot of logging that nobody really cares about,
    logging that remains will respond to live changes in the
    log level.  No significant overhead is added.  [ticket:1719]

  - Fixed bug in session.merge() which prevented dict-like
    collections from merging.

  - session.merge() works with relations that specifically
    don't include "merge" in their cascade options - the target
    is ignored completely.

  - session.merge() will not expire existing scalar attributes
    on an existing target if the target has a value for that
    attribute, even if the incoming merged doesn't have
    a value for the attribute.  This prevents unnecessary loads
    on existing items.  Will still mark the attr as expired
    if the destination doesn't have the attr, though, which
    fulfills some contracts of deferred cols.  [ticket:1681]

  - The "allow_null_pks" flag is now called "allow_partial_pks",
    defaults to True, acts like it did in 0.5 again.  Except,
    it also is implemented within merge() such that a SELECT
    won't be issued for an incoming instance with partially
    NULL primary key if the flag is False.  [ticket:1680]

  - Fixed bug in 0.6-reworked "many-to-one" optimizations
    such that a many-to-one that is against a non-primary key
    column on the remote table (i.e. foreign key against a
    UNIQUE column) will pull the "old" value in from the
    database during a change, since if it's in the session
    we will need it for proper history/backref accounting,
    and we can't pull from the local identity map on a
    non-primary key column. [ticket:1737]

  - fixed internal error which would occur if calling has()
    or similar complex expression on a single-table inheritance
    relation(). [ticket:1731]

  - query.one() no longer applies LIMIT to the query, this to
    ensure that it fully counts all object identities present
    in the result, even in the case where joins may conceal
    multiple identities for two or more rows.  As a bonus,
    one() can now also be called with a query that issued
    from_statement() to start with since it no longer modifies
    the query.  [ticket:1688]

  - query.get() now returns None if queried for an identifier
    that is present in the identity map with a different class
    than the one requested, i.e. when using polymorphic loading.
    [ticket:1727]

  - A major fix in query.join(), when the "on" clause is an
    attribute of an aliased() construct, but there is already
    an existing join made out to a compatible target, query properly
    joins to the right aliased() construct instead of sticking
    onto the right side of the existing join.  [ticket:1706]

  - Slight improvement to the fix for [ticket:1362] to not issue
    needless updates of the primary key column during a so-called
    "row switch" operation, i.e. add + delete of two objects
    with the same PK.

  - Now uses sqlalchemy.orm.exc.DetachedInstanceError when an
    attribute load or refresh action fails due to object
    being detached from any Session.   UnboundExecutionError
    is specific to engines bound to sessions and statements.

  - Query called in the context of an expression will render
    disambiguating labels in all cases.    Note that this does
    not apply to the existing .statement and .subquery()
    accessor/method, which still honors the .with_labels()
    setting that defaults to False.

  - Query.union() retains disambiguating labels within the
    returned statement, thus avoiding various SQL composition
    errors which can result from column name conflicts.
    [ticket:1676]

  - Fixed bug in attribute history that inadvertently invoked
    __eq__ on mapped instances.

  - Some internal streamlining of object loading grants a
    small speedup for large results, estimates are around
    10-15%.   Gave the "state" internals a good solid
    cleanup with less complexity, datamembers,
    method calls, blank dictionary creates.

  - Documentation clarification for query.delete()
    [ticket:1689]

  - Fixed cascade bug in many-to-one relation() when attribute
    was set to None, introduced in r6711 (cascade deleted
    items into session during add()).

  - Calling query.order_by() or query.distinct() before calling
    query.select_from(), query.with_polymorphic(), or
    query.from_statement() raises an exception now instead of
    silently dropping those criterion. [ticket:1736]

  - query.scalar() now raises an exception if more than one
    row is returned.  All other behavior remains the same.
    [ticket:1735]

  - Fixed bug which caused "row switch" logic, that is an
    INSERT and DELETE replaced by an UPDATE, to fail when
    version_id_col was in use. [ticket:1692]

- sql
  - join() will now simulate a NATURAL JOIN by default.  Meaning,
    if the left side is a join, it will attempt to join the right
    side to the rightmost side of the left first, and not raise
    any exceptions about ambiguous join conditions if successful
    even if there are further join targets across the rest of
    the left.  [ticket:1714]

  - The most common result processors conversion function were
    moved to the new "processors" module.  Dialect authors are
    encouraged to use those functions whenever they correspond
    to their needs instead of implementing custom ones.

  - SchemaType and subclasses Boolean, Enum are now serializable,
    including their ddl listener and other event callables.
    [ticket:1694] [ticket:1698]

  - Some platforms will now interpret certain literal values
    as non-bind parameters, rendered literally into the SQL
    statement.   This to support strict SQL-92 rules that are
    enforced by some platforms including MS-SQL and Sybase.
    In this model, bind parameters aren't allowed in the
    columns clause of a SELECT, nor are certain ambiguous
    expressions like "?=?".  When this mode is enabled, the base
    compiler will render the binds as inline literals, but only across
    strings and numeric values.  Other types such as dates
    will raise an error, unless the dialect subclass defines
    a literal rendering function for those.  The bind parameter
    must have an embedded literal value already or an error
    is raised (i.e. won't work with straight bindparam('x')).
    Dialects can also expand upon the areas where binds are not
    accepted, such as within argument lists of functions
    (which don't work on MS-SQL when native SQL binding is used).

  - Added "unicode_errors" parameter to String, Unicode, etc.
    Behaves like the 'errors' keyword argument to
    the standard library's string.decode() functions.   This flag
    requires that `convert_unicode` is set to `"force"` - otherwise,
    SQLAlchemy is not guaranteed to handle the task of unicode
    conversion.   Note that this flag adds significant performance
    overhead to row-fetching operations for backends that already
    return unicode objects natively (which most DBAPIs do).  This
    flag should only be used as an absolute last resort for reading
    strings from a column with varied or corrupted encodings,
    which only applies to databases that accept invalid encodings
    in the first place (i.e. MySQL. *not* PG, Sqlite, etc.)

  - Added math negation operator support, -x.

  - FunctionElement subclasses are now directly executable the
    same way any func.foo() construct is, with automatic
    SELECT being applied when passed to execute().

  - The "type" and "bind" keyword arguments of a func.foo()
    construct are now local to "func." constructs and are
    not part of the FunctionElement base class, allowing
    a "type" to be handled in a custom constructor or
    class-level variable.

  - Restored the keys() method to ResultProxy.

  - The type/expression system now does a more complete job
    of determining the return type from an expression
    as well as the adaptation of the Python operator into
    a SQL operator, based on the full left/right/operator
    of the given expression.  In particular
    the date/time/interval system created for Postgresql
    EXTRACT in [ticket:1647] has now been generalized into
    the type system.   The previous behavior which often
    occured of an expression "column + literal" forcing
    the type of "literal" to be the same as that of "column"
    will now usually not occur - the type of
    "literal" is first derived from the Python type of the
    literal, assuming standard native Python types + date
    types, before falling back to that of the known type
    on the other side of the expression.  If the
    "fallback" type is compatible (i.e. CHAR from String),
    the literal side will use that.  TypeDecorator
    types override this by default to coerce the "literal"
    side unconditionally, which can be changed by implementing
    the coerce_compared_value() method. Also part of
    [ticket:1683].

  - Made sqlalchemy.sql.expressions.Executable part of public
    API, used for any expression construct that can be sent to
    execute().  FunctionElement now inherits Executable so that
    it gains execution_options(), which are also propagated
    to the select() that's generated within execute().
    Executable in turn subclasses _Generative which marks
    any ClauseElement that supports the @_generative
    decorator - these may also become "public" for the benefit
    of the compiler extension at some point.

  - A change to the solution for [ticket:1579] - an end-user
    defined bind parameter name that directly conflicts with
    a column-named bind generated directly from the SET or
    VALUES clause of an update/insert generates a compile error.
    This reduces call counts and eliminates some cases where
    undesirable name conflicts could still occur.

  - Column() requires a type if it has no foreign keys (this is
    not new).  An error is now raised if a Column() has no type
    and no foreign keys.  [ticket:1705]

  - the "scale" argument of the Numeric() type is honored when
    coercing a returned floating point value into a string
    on its way to Decimal - this allows accuracy to function
    on SQLite, MySQL.  [ticket:1717]

  - the copy() method of Column now copies over uninitialized
    "on table attach" events.  Helps with the new declarative
    "mixin" capability.

- engines
  - Added an optional C extension to speed up the sql layer by
    reimplementing RowProxy and the most common result processors.
    The actual speedups will depend heavily on your DBAPI and
    the mix of datatypes used in your tables, and can vary from
    a 30% improvement to more than 200%.  It also provides a modest
    (~15-20%) indirect improvement to ORM speed for large queries.
    Note that it is *not* built/installed by default.
    See README for installation instructions.

  - the execution sequence pulls all rowcount/last inserted ID
    info from the cursor before commit() is called on the
    DBAPI connection in an "autocommit" scenario.  This helps
    mxodbc with rowcount and is probably a good idea overall.

  - Opened up logging a bit such that isEnabledFor() is called
    more often, so that changes to the log level for engine/pool
    will be reflected on next connect.   This adds a small
    amount of method call overhead.  It's negligible and will make
    life a lot easier for all those situations when logging
    just happens to be configured after create_engine() is called.
    [ticket:1719]

  - The assert_unicode flag is deprecated.  SQLAlchemy will raise
    a warning in all cases where it is asked to encode a non-unicode
    Python string, as well as when a Unicode or UnicodeType type
    is explicitly passed a bytestring.  The String type will do nothing
    for DBAPIs that already accept Python unicode objects.

  - Bind parameters are sent as a tuple instead of a list. Some
    backend drivers will not accept bind parameters as a list.

  - threadlocal engine wasn't properly closing the connection
    upon close() - fixed that.

  - Transaction object doesn't rollback or commit if it isn't
    "active", allows more accurate nesting of begin/rollback/commit.

  - Python unicode objects as binds result in the Unicode type,
    not string, thus eliminating a certain class of unicode errors
    on drivers that don't support unicode binds.

  - Added "logging_name" argument to create_engine(), Pool() constructor
    as well as "pool_logging_name" argument to create_engine() which
    filters down to that of Pool.   Issues the given string name
    within the "name" field of logging messages instead of the default
    hex identifier string.  [ticket:1555]

  - The visit_pool() method of Dialect is removed, and replaced with
    on_connect().  This method returns a callable which receives
    the raw DBAPI connection after each one is created.   The callable
    is assembled into a first_connect/connect pool listener by the
    connection strategy if non-None.   Provides a simpler interface
    for dialects.

  - StaticPool now initializes, disposes and recreates without
    opening a new connection - the connection is only opened when
    first requested. dispose() also works on AssertionPool now.
    [ticket:1728]

- metadata
  - Added the ability to strip schema information when using
    "tometadata" by passing "schema=None" as an argument. If schema
    is not specified then the table's schema is retained.
    [ticket: 1673]

- declarative
  - DeclarativeMeta exclusively uses cls.__dict__ (not dict_)
    as the source of class information; _as_declarative exclusively
    uses the  dict_ passed to it as the source of class information
    (which when using DeclarativeMeta is cls.__dict__).  This should
    in theory make it easier for custom metaclasses to modify
    the state passed into _as_declarative.

  - declarative now accepts mixin classes directly, as a means
    to provide common functional and column-based elements on
    all subclasses, as well as a means to propagate a fixed
    set of __table_args__ or __mapper_args__ to subclasses.
    For custom combinations of __table_args__/__mapper_args__ from
    an inherited mixin to local, descriptors can now be used.
    New details are all up in the Declarative documentation.
    Thanks to Chris Withers for putting up with my strife
    on this. [ticket:1707]

  - the __mapper_args__ dict is copied when propagating to a subclass,
    and is taken straight off the class __dict__ to avoid any
    propagation from the parent.  mapper inheritance already
    propagates the things you want from the parent mapper.
    [ticket:1393]

  - An exception is raised when a single-table subclass specifies
    a column that is already present on the base class.
    [ticket:1732]

- mysql
  - Fixed reflection bug whereby when COLLATE was present,
    nullable flag and server defaults would not be reflected.
    [ticket:1655]

  - Fixed reflection of TINYINT(1) "boolean" columns defined with
    integer flags like UNSIGNED.

  - Further fixes for the mysql-connector dialect.  [ticket:1668]

  - Composite PK table on InnoDB where the "autoincrement" column
    isn't first will emit an explicit "KEY" phrase within
    CREATE TABLE thereby avoiding errors, [ticket:1496]

  - Added reflection/create table support for a wide range
    of MySQL keywords.  [ticket:1634]

  - Fixed import error which could occur reflecting tables on
    a Windows host [ticket:1580]

- mssql
  - Re-established support for the pymssql dialect.

  - Various fixes for implicit returning, reflection,
    etc. - the MS-SQL dialects aren't quite complete
    in 0.6 yet (but are close)

  - Added basic support for mxODBC [ticket:1710].

  - Removed the text_as_varchar option.

- oracle
   - "out" parameters require a type that is supported by
     cx_oracle.  An error will be raised if no cx_oracle
     type can be found.

   - Oracle 'DATE' now does not perform any result processing,
     as the DATE type in Oracle stores full date+time objects,
     that's what you'll get.  Note that the generic types.Date
     type *will* still call value.date() on incoming values,
     however.  When reflecting a table, the reflected type
     will be 'DATE'.

   - Added preliminary support for Oracle's WITH_UNICODE
     mode.  At the very least this establishes initial
     support for cx_Oracle with Python 3.  When WITH_UNICODE
     mode is used in Python 2.xx, a large and scary warning
     is emitted asking that the user seriously consider
     the usage of this difficult mode of operation.
     [ticket:1670]

   - The except_() method now renders as MINUS on Oracle,
     which is more or less equivalent on that platform.
     [ticket:1712]

   - Added support for rendering and reflecting
     TIMESTAMP WITH TIME ZONE, i.e. TIMESTAMP(timezone=True).
     [ticket:651]

   - Oracle INTERVAL type can now be reflected.

- sqlite
   - Added "native_datetime=True" flag to create_engine().
     This will cause the DATE and TIMESTAMP types to skip
     all bind parameter and result row processing, under
     the assumption that PARSE_DECLTYPES has been enabled
     on the connection.  Note that this is not entirely
     compatible with the "func.current_date()", which
     will be returned as a string. [ticket:1685]

- sybase
   - Implemented a preliminary working dialect for Sybase,
     with sub-implementations for Python-Sybase as well
     as Pyodbc.  Handles table
     creates/drops and basic round trip functionality.
     Does not yet include reflection or comprehensive
     support of unicode/special expressions/etc.

- examples
   - Changed the beaker cache example a bit to have a separate
     RelationCache option for lazyload caching.  This object
     does a lookup among any number of potential attributes
     more efficiently by grouping several into a common structure.
     Both FromCache and RelationCache are simpler individually.

- documentation
   - Major cleanup work in the docs to link class, function, and
     method names into the API docs. [ticket:1700/1702/1703]

0.6beta1
========
- Major Release
  - For the full set of feature descriptions, see
    http://www.sqlalchemy.org/trac/wiki/06Migration .
    This document is a work in progress.

  - All bug fixes and feature enhancements from the most
    recent 0.5 version and below are also included within 0.6.

  - Platforms targeted now include Python 2.4/2.5/2.6, Python
    3.1, Jython2.5.

- orm
  - Changes to query.update() and query.delete():
      - the 'expire' option on query.update() has been renamed to
        'fetch', thus matching that of query.delete().
        'expire' is deprecated and issues a warning.

      - query.update() and query.delete() both default to
        'evaluate' for the synchronize strategy.

      - the 'synchronize' strategy for update() and delete()
        raises an error on failure. There is no implicit fallback
        onto "fetch". Failure of evaluation is based on the
        structure of criteria, so success/failure is deterministic
        based on code structure.

  - Enhancements on many-to-one relations:
      - many-to-one relations now fire off a lazyload in fewer
        cases, including in most cases will not fetch the "old"
        value when a new one is replaced.

      - many-to-one relation to a joined-table subclass now uses
        get() for a simple load (known as the "use_get"
        condition), i.e. Related->Sub(Base), without the need to
        redefine the primaryjoin condition in terms of the base
        table. [ticket:1186]

      - specifying a foreign key with a declarative column, i.e.
        ForeignKey(MyRelatedClass.id) doesn't break the "use_get"
        condition from taking place [ticket:1492]

      - relation(), eagerload(), and eagerload_all() now feature
        an option called "innerjoin". Specify `True` or `False` to
        control whether an eager join is constructed as an INNER
        or OUTER join. Default is `False` as always. The mapper
        options will override whichever setting is specified on
        relation(). Should generally be set for many-to-one, not
        nullable foreign key relations to allow improved join
        performance. [ticket:1544]

      - the behavior of eagerloading such that the main query is
        wrapped in a subquery when LIMIT/OFFSET are present now
        makes an exception for the case when all eager loads are
        many-to-one joins. In those cases, the eager joins are
        against the parent table directly along with the
        limit/offset without the extra overhead of a subquery,
        since a many-to-one join does not add rows to the result.

  - Enhancements / Changes on Session.merge():
     - the "dont_load=True" flag on Session.merge() is deprecated
       and is now "load=False".

     - Session.merge() is performance optimized, using half the
       call counts for "load=False" mode compared to 0.5 and
       significantly fewer SQL queries in the case of collections
       for "load=True" mode.

     - merge() will not issue a needless merge of attributes if the
       given instance is the same instance which is already present.

     - merge() now also merges the "options" associated with a given
       state, i.e. those passed through query.options() which follow
       along with an instance, such as options to eagerly- or
       lazyily- load various attributes.   This is essential for
       the construction of highly integrated caching schemes.  This
       is a subtle behavioral change vs. 0.5.

     - A bug was fixed regarding the serialization of the "loader
       path" present on an instance's state, which is also necessary
       when combining the usage of merge() with serialized state
       and associated options that should be preserved.

     - The all new merge() is showcased in a new comprehensive
       example of how to integrate Beaker with SQLAlchemy.  See
       the notes in the "examples" note below.

  - Primary key values can now be changed on a joined-table inheritance
    object, and ON UPDATE CASCADE will be taken into account when
    the flush happens.  Set the new "passive_updates" flag to False
    on mapper() when using SQLite or MySQL/MyISAM. [ticket:1362]

  - flush() now detects when a primary key column was updated by
    an ON UPDATE CASCADE operation from another primary key, and
    can then locate the row for a subsequent UPDATE on the new PK
    value.  This occurs when a relation() is there to establish
    the relationship as well as passive_updates=True.  [ticket:1671]

  - the "save-update" cascade will now cascade the pending *removed*
    values from a scalar or collection attribute into the new session
    during an add() operation.  This so that the flush() operation
    will also delete or modify rows of those disconnected items.

  - Using a "dynamic" loader with a "secondary" table now produces
    a query where the "secondary" table is *not* aliased.  This
    allows the secondary Table object to be used in the "order_by"
    attribute of the relation(), and also allows it to be used
    in filter criterion against the dynamic relation.
    [ticket:1531]

  - relation() with uselist=False will emit a warning when
    an eager or lazy load locates more than one valid value for
    the row.  This may be due to primaryjoin/secondaryjoin
    conditions which aren't appropriate for an eager LEFT OUTER
    JOIN or for other conditions.  [ticket:1643]

  - an explicit check occurs when a synonym() is used with
    map_column=True, when a ColumnProperty (deferred or otherwise)
    exists separately in the properties dictionary sent to mapper
    with the same keyname.   Instead of silently replacing
    the existing property (and possible options on that property),
    an error is raised.  [ticket:1633]

  - a "dynamic" loader sets up its query criterion at construction
    time so that the actual query is returned from non-cloning
    accessors like "statement".

  - the "named tuple" objects returned when iterating a
    Query() are now pickleable.

  - mapping to a select() construct now requires that you
    make an alias() out of it distinctly.   This to eliminate
    confusion over such issues as [ticket:1542]

  - query.join() has been reworked to provide more consistent
    behavior and more flexibility (includes [ticket:1537])

  - query.select_from() accepts multiple clauses to produce
    multiple comma separated entries within the FROM clause.
    Useful when selecting from multiple-homed join() clauses.

  - query.select_from() also accepts mapped classes, aliased()
    constructs, and mappers as arguments.  In particular this
    helps when querying from multiple joined-table classes to ensure
    the full join gets rendered.

  - query.get() can be used with a mapping to an outer join
    where one or more of the primary key values are None.
    [ticket:1135]

  - query.from_self(), query.union(), others which do a
    "SELECT * from (SELECT...)" type of nesting will do
    a better job translating column expressions within the subquery
    to the columns clause of the outer query.  This is
    potentially backwards incompatible with 0.5, in that this
    may break queries with literal expressions that do not have labels
    applied (i.e. literal('foo'), etc.)
    [ticket:1568]

  - relation primaryjoin and secondaryjoin now check that they
    are column-expressions, not just clause elements.  this prohibits
    things like FROM expressions being placed there directly.
    [ticket:1622]

  - `expression.null()` is fully understood the same way
    None is when comparing an object/collection-referencing
    attribute within query.filter(), filter_by(), etc.
    [ticket:1415]

  - added "make_transient()" helper function which transforms a
    persistent/ detached instance into a transient one (i.e.
    deletes the instance_key and removes from any session.)
    [ticket:1052]

  - the allow_null_pks flag on mapper() is deprecated, and
    the feature is turned "on" by default.  This means that
    a row which has a non-null value for any of its primary key
    columns will be considered an identity.  The need for this
    scenario typically only occurs when mapping to an outer join.
    [ticket:1339]

   - the mechanics of "backref" have been fully merged into the
     finer grained "back_populates" system, and take place entirely
     within the _generate_backref() method of RelationProperty.  This
     makes the initialization procedure of RelationProperty
     simpler and allows easier propagation of settings (such as from
     subclasses of RelationProperty) into the reverse reference.
     The internal BackRef() is gone and backref() returns a plain
     tuple that is understood by RelationProperty.

   - The version_id_col feature on mapper() will raise a warning when
     used with dialects that don't support "rowcount" adequately.
     [ticket:1569]

   - added "execution_options()" to Query, to so options can be
     passed to the resulting statement. Currently only
     Select-statements have these options, and the only option
     used is "stream_results", and the only dialect which knows
     "stream_results" is psycopg2.

   - Query.yield_per() will set the "stream_results" statement
     option automatically.

   - Deprecated or removed:
      * 'allow_null_pks' flag on mapper() is deprecated.  It does
        nothing now and the setting is "on" in all cases.
      * 'transactional' flag on sessionmaker() and others is
        removed. Use 'autocommit=True' to indicate 'transactional=False'.
      * 'polymorphic_fetch' argument on mapper() is removed.
        Loading can be controlled using the 'with_polymorphic'
        option.
      * 'select_table' argument on mapper() is removed.  Use
        'with_polymorphic=("*", <some selectable>)' for this
        functionality.
      * 'proxy' argument on synonym() is removed.  This flag
        did nothing throughout 0.5, as the "proxy generation"
        behavior is now automatic.
      * Passing a single list of elements to eagerload(),
        eagerload_all(), contains_eager(), lazyload(),
        defer(), and undefer() instead of multiple positional
        *args is deprecated.
      * Passing a single list of elements to query.order_by(),
        query.group_by(), query.join(), or query.outerjoin()
        instead of multiple positional *args is deprecated.
      * query.iterate_instances() is removed.  Use query.instances().
      * Query.query_from_parent() is removed.  Use the
        sqlalchemy.orm.with_parent() function to produce a
        "parent" clause, or alternatively query.with_parent().
      * query._from_self() is removed, use query.from_self()
        instead.
      * the "comparator" argument to composite() is removed.
        Use "comparator_factory".
      * RelationProperty._get_join() is removed.
      * the 'echo_uow' flag on Session is removed.  Use
        logging on the "sqlalchemy.orm.unitofwork" name.
      * session.clear() is removed.  use session.expunge_all().
      * session.save(), session.update(), session.save_or_update()
        are removed.  Use session.add() and session.add_all().
      * the "objects" flag on session.flush() remains deprecated.
      * the "dont_load=True" flag on session.merge() is deprecated
        in favor of "load=False".
      * ScopedSession.mapper remains deprecated.  See the
        usage recipe at
        http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SessionAwareMapper
      * passing an InstanceState (internal SQLAlchemy state object) to
        attributes.init_collection() or attributes.get_history() is
        deprecated.  These functions are public API and normally
        expect a regular mapped object instance.
      * the 'engine' parameter to declarative_base() is removed.
        Use the 'bind' keyword argument.

- sql

    - the "autocommit" flag on select() and text() as well
      as select().autocommit() are deprecated - now call
      .execution_options(autocommit=True) on either of those
      constructs, also available directly on Connection and orm.Query.

    - the autoincrement flag on column now indicates the column
      which should be linked to cursor.lastrowid, if that method
      is used.  See the API docs for details.

    - an executemany() now requires that all bound parameter
      sets require that all keys are present which are
      present in the first bound parameter set.  The structure
      and behavior of an insert/update statement is very much
      determined by the first parameter set, including which
      defaults are going to fire off, and a minimum of
      guesswork is performed with all the rest so that performance
      is not impacted.  For this reason defaults would otherwise
      silently "fail" for missing parameters, so this is now guarded
      against. [ticket:1566]

    - returning() support is native to insert(), update(),
      delete(). Implementations of varying levels of
      functionality exist for Postgresql, Firebird, MSSQL and
      Oracle. returning() can be called explicitly with column
      expressions which are then returned in the resultset,
      usually via fetchone() or first().

      insert() constructs will also use RETURNING implicitly to
      get newly generated primary key values, if the database
      version in use supports it (a version number check is
      performed). This occurs if no end-user returning() was
      specified.

    - union(), intersect(), except() and other "compound" types
      of statements have more consistent behavior w.r.t.
      parenthesizing.   Each compound element embedded within
      another will now be grouped with parenthesis - previously,
      the first compound element in the list would not be grouped,
      as SQLite doesn't like a statement to start with
      parenthesis.   However, Postgresql in particular has
      precedence rules regarding INTERSECT, and it is
      more consistent for parenthesis to be applied equally
      to all sub-elements.   So now, the workaround for SQLite
      is also what the workaround for PG was previously -
      when nesting compound elements, the first one usually needs
      ".alias().select()" called on it to wrap it inside
      of a subquery.  [ticket:1665]

    - insert() and update() constructs can now embed bindparam()
      objects using names that match the keys of columns.  These
      bind parameters will circumvent the usual route to those
      keys showing up in the VALUES or SET clause of the generated
      SQL. [ticket:1579]

    - the Binary type now returns data as a Python string
      (or a "bytes" type in Python 3), instead of the built-
      in "buffer" type.  This allows symmetric round trips
      of binary data. [ticket:1524]

    - Added a tuple_() construct, allows sets of expressions
      to be compared to another set, typically with IN against
      composite primary keys or similar.  Also accepts an
      IN with multiple columns.   The "scalar select can
      have only one column" error message is removed - will
      rely upon the database to report problems with
      col mismatch.

    - User-defined "default" and "onupdate" callables which
      accept a context should now call upon
      "context.current_parameters" to get at the dictionary
      of bind parameters currently being processed.  This
      dict is available in the same way regardless of
      single-execute or executemany-style statement execution.

    - multi-part schema names, i.e. with dots such as
      "dbo.master", are now rendered in select() labels
      with underscores for dots, i.e. "dbo_master_table_column".
      This is a "friendly" label that behaves better
      in result sets. [ticket:1428]

    - removed needless "counter" behavior with select()
      labelnames that match a column name in the table,
      i.e. generates "tablename_id" for "id", instead of
      "tablename_id_1" in an attempt to avoid naming
      conflicts, when the table has a column actually
      named "tablename_id" - this is because
      the labeling logic is always applied to all columns
      so a naming conflict will never occur.

    - calling expr.in_([]), i.e. with an empty list, emits a warning
      before issuing the usual "expr != expr" clause.  The
      "expr != expr" can be very expensive, and it's preferred
      that the user not issue in_() if the list is empty,
      instead simply not querying, or modifying the criterion
       as appropriate for more complex situations.
       [ticket:1628]

    - Added "execution_options()" to select()/text(), which set the
      default options for the Connection.  See the note in "engines".

    - Deprecated or removed:
        * "scalar" flag on select() is removed, use
          select.as_scalar().
        * "shortname" attribute on bindparam() is removed.
        * postgres_returning, firebird_returning flags on
          insert(), update(), delete() are deprecated, use
          the new returning() method.
        * fold_equivalents flag on join is deprecated (will remain
          until [ticket:1131] is implemented)

- engines
  - transaction isolation level may be specified with
    create_engine(... isolation_level="..."); available on
    postgresql and sqlite. [ticket:443]

  - Connection has execution_options(), generative method
    which accepts keywords that affect how the statement
    is executed w.r.t. the DBAPI.   Currently supports
    "stream_results", causes psycopg2 to use a server
    side cursor for that statement, as well as
    "autocommit", which is the new location for the "autocommit"
    option from select() and text().   select() and
    text() also have .execution_options() as well as
    ORM Query().

  - fixed the import for entrypoint-driven dialects to
    not rely upon silly tb_info trick to determine import
    error status.  [ticket:1630]

  - added first() method to ResultProxy, returns first row and
    closes result set immediately.

  - RowProxy objects are now pickleable, i.e. the object returned
    by result.fetchone(), result.fetchall() etc.

  - RowProxy no longer has a close() method, as the row no longer
    maintains a reference to the parent.  Call close() on
    the parent ResultProxy instead, or use autoclose.

  - ResultProxy internals have been overhauled to greatly reduce
    method call counts when fetching columns.  Can provide a large
    speed improvement (up to more than 100%) when fetching large
    result sets.  The improvement is larger when fetching columns
    that have no type-level processing applied and when using
    results as tuples (instead of as dictionaries).  Many
    thanks to Elixir's Gaëtan de Menten for this dramatic
    improvement !  [ticket:1586]

  - Databases which rely upon postfetch of "last inserted id"
    to get at a generated sequence value (i.e. MySQL, MS-SQL)
    now work correctly when there is a composite primary key
    where the "autoincrement" column is not the first primary
    key column in the table.

  - the last_inserted_ids() method has been renamed to the
    descriptor "inserted_primary_key".

  - setting echo=False on create_engine() now sets the loglevel
    to WARN instead of NOTSET.  This so that logging can be
    disabled for a particular engine even if logging
    for "sqlalchemy.engine" is enabled overall.  Note that the
    default setting of "echo" is `None`. [ticket:1554]

  - ConnectionProxy now has wrapper methods for all transaction
    lifecycle events, including begin(), rollback(), commit()
    begin_nested(), begin_prepared(), prepare(), release_savepoint(),
    etc.

  - Connection pool logging now uses both INFO and DEBUG
    log levels for logging.  INFO is for major events such
    as invalidated connections, DEBUG for all the acquire/return
    logging.  `echo_pool` can be False, None, True or "debug"
    the same way as `echo` works.

  - All pyodbc-dialects now support extra pyodbc-specific
    kw arguments 'ansi', 'unicode_results', 'autocommit'.
    [ticket:1621]

  - the "threadlocal" engine has been rewritten and simplified
    and now supports SAVEPOINT operations.

  - deprecated or removed
      * result.last_inserted_ids() is deprecated.  Use
        result.inserted_primary_key
      * dialect.get_default_schema_name(connection) is now
        public via dialect.default_schema_name.
      * the "connection" argument from engine.transaction() and
        engine.run_callable() is removed - Connection itself
        now has those methods.   All four methods accept
        *args and **kwargs which are passed to the given callable,
        as well as the operating connection.

- schema
    - the `__contains__()` method of `MetaData` now accepts
      strings or `Table` objects as arguments.  If given
      a `Table`, the argument is converted to `table.key` first,
      i.e. "[schemaname.]<tablename>" [ticket:1541]

    - deprecated MetaData.connect() and
      ThreadLocalMetaData.connect() have been removed - send
      the "bind" attribute to bind a metadata.

    - deprecated metadata.table_iterator() method removed (use
      sorted_tables)

    - deprecated PassiveDefault - use DefaultClause.

    - the "metadata" argument is removed from DefaultGenerator
      and subclasses, but remains locally present on Sequence,
      which is a standalone construct in DDL.

    - Removed public mutability from Index and Constraint
      objects:
        - ForeignKeyConstraint.append_element()
        - Index.append_column()
        - UniqueConstraint.append_column()
        - PrimaryKeyConstraint.add()
        - PrimaryKeyConstraint.remove()
      These should be constructed declaratively (i.e. in one
      construction).

    - The "start" and "increment" attributes on Sequence now
      generate "START WITH" and "INCREMENT BY" by default,
      on Oracle and Postgresql.  Firebird doesn't support
      these keywords right now.  [ticket:1545]

    - UniqueConstraint, Index, PrimaryKeyConstraint all accept
      lists of column names or column objects as arguments.

    - Other removed things:
        - Table.key (no idea what this was for)
        - Table.primary_key is not assignable - use
          table.append_constraint(PrimaryKeyConstraint(...))
        - Column.bind       (get via column.table.bind)
        - Column.metadata   (get via column.table.metadata)
        - Column.sequence   (use column.default)
        - ForeignKey(constraint=some_parent) (is now private _constraint)

    - The use_alter flag on ForeignKey is now a shortcut option
      for operations that can be hand-constructed using the
      DDL() event system. A side effect of this refactor is
      that ForeignKeyConstraint objects with use_alter=True
      will *not* be emitted on SQLite, which does not support
      ALTER for foreign keys.

    - ForeignKey and ForeignKeyConstraint objects now correctly
      copy() all their public keyword arguments.  [ticket:1605]

- Reflection/Inspection
    - Table reflection has been expanded and generalized into
      a new API called "sqlalchemy.engine.reflection.Inspector".
      The Inspector object provides fine-grained information about
      a wide variety of schema information, with room for expansion,
      including table names, column names, view definitions, sequences,
      indexes, etc.

    - Views are now reflectable as ordinary Table objects.  The same
      Table constructor is used, with the caveat that "effective"
      primary and foreign key constraints aren't part of the reflection
      results; these have to be specified explicitly if desired.

    - The existing autoload=True system now uses Inspector underneath
      so that each dialect need only return "raw" data about tables
      and other objects - Inspector is the single place that information
      is compiled into Table objects so that consistency is at a maximum.

- DDL
    - the DDL system has been greatly expanded.  the DDL() class
      now extends the more generic DDLElement(), which forms the basis
      of many new constructs:

        - CreateTable()
        - DropTable()
        - AddConstraint()
        - DropConstraint()
        - CreateIndex()
        - DropIndex()
        - CreateSequence()
        - DropSequence()

       These support "on" and "execute-at()" just like plain DDL()
       does.  User-defined DDLElement subclasses can be created and
       linked to a compiler using the sqlalchemy.ext.compiler extension.

    - The signature of the "on" callable passed to DDL() and
      DDLElement() is revised as follows:

        "ddl" - the DDLElement object itself.
        "event" - the string event name.
        "target" - previously "schema_item", the Table or
        MetaData object triggering the event.
        "connection" - the Connection object in use for the operation.
        **kw - keyword arguments.  In the case of MetaData before/after
          create/drop, the list of Table objects for which
          CREATE/DROP DDL is to be issued is passed as the kw
          argument "tables". This is necessary for metadata-level
          DDL that is dependent on the presence of specific tables.

      - the "schema_item" attribute of DDL has been renamed to
        "target".

- dialect refactor
    - Dialect modules are now broken into database dialects
      plus DBAPI implementations. Connect URLs are now
      preferred to be specified using dialect+driver://...,
      i.e. "mysql+mysqldb://scott:tiger@localhost/test". See
      the 0.6 documentation for examples.

    - the setuptools entrypoint for external dialects is now
      called "sqlalchemy.dialects".

    - the "owner" keyword argument is removed from Table. Use
      "schema" to represent any namespaces to be prepended to
      the table name.

    - server_version_info becomes a static attribute.

    - dialects receive an initialize() event on initial
      connection to determine connection properties.

    - dialects receive a visit_pool event have an opportunity
      to establish pool listeners.

    - cached TypeEngine classes are cached per-dialect class
      instead of per-dialect.

    - new UserDefinedType should be used as a base class for
      new types, which preserves the 0.5 behavior of
      get_col_spec().

    - The result_processor() method of all type classes now
      accepts a second argument "coltype", which is the DBAPI
      type argument from cursor.description.  This argument
      can help some types decide on the most efficient processing
      of result values.

    - Deprecated Dialect.get_params() removed.

    - Dialect.get_rowcount() has been renamed to a descriptor
      "rowcount", and calls cursor.rowcount directly. Dialects
      which need to hardwire a rowcount in for certain calls
      should override the method to provide different behavior.

    - DefaultRunner and subclasses have been removed.  The job
      of this object has been simplified and moved into
      ExecutionContext.  Dialects which support sequences should
      add a `fire_sequence()` method to their execution context
      implementation.  [ticket:1566]

    - Functions and operators generated by the compiler now use
      (almost) regular dispatch functions of the form
      "visit_<opname>" and "visit_<funcname>_fn" to provide
      customed processing. This replaces the need to copy the
      "functions" and "operators" dictionaries in compiler
      subclasses with straightforward visitor methods, and also
      allows compiler subclasses complete control over
      rendering, as the full _Function or _BinaryExpression
      object is passed in.

- postgresql
    - New dialects: pg8000, zxjdbc, and pypostgresql
      on py3k.

    - The "postgres" dialect is now named "postgresql" !
      Connection strings look like:

           postgresql://scott:tiger@localhost/test
           postgresql+pg8000://scott:tiger@localhost/test

       The "postgres" name remains for backwards compatiblity
       in the following ways:

           - There is a "postgres.py" dummy dialect which
             allows old URLs to work, i.e.
             postgres://scott:tiger@localhost/test

           - The "postgres" name can be imported from the old
             "databases" module, i.e. "from
             sqlalchemy.databases import postgres" as well as
             "dialects", "from sqlalchemy.dialects.postgres
             import base as pg", will send a deprecation
             warning.

           - Special expression arguments are now named
             "postgresql_returning" and "postgresql_where", but
             the older "postgres_returning" and
             "postgres_where" names still work with a
             deprecation warning.

    - "postgresql_where" now accepts SQL expressions which
      can also include literals, which will be quoted as needed.

    - The psycopg2 dialect now uses psycopg2's "unicode extension"
      on all new connections, which allows all String/Text/etc.
      types to skip the need to post-process bytestrings into
      unicode (an expensive step due to its volume).  Other
      dialects which return unicode natively (pg8000, zxjdbc)
      also skip unicode post-processing.

    - Added new ENUM type, which exists as a schema-level
      construct and extends the generic Enum type.  Automatically
      associates itself with tables and their parent metadata
      to issue the appropriate CREATE TYPE/DROP TYPE
      commands as needed, supports unicode labels, supports
      reflection.  [ticket:1511]

    - INTERVAL supports an optional "precision" argument
      corresponding to the argument that PG accepts.

    - using new dialect.initialize() feature to set up
      version-dependent behavior.

    - somewhat better support for % signs in table/column names;
      psycopg2 can't handle a bind parameter name of
      %(foobar)s however and SQLA doesn't want to add overhead
      just to treat that one non-existent use case.
      [ticket:1279]

    - Inserting NULL into a primary key + foreign key column
      will allow the "not null constraint" error to raise,
      not an attempt to execute a nonexistent "col_id_seq"
      sequence.  [ticket:1516]

    - autoincrement SELECT statements, i.e. those which
      select from a procedure that modifies rows, now work
      with server-side cursor mode (the named cursor isn't
      used for such statements.)

    - postgresql dialect can properly detect pg "devel" version
      strings, i.e. "8.5devel" [ticket:1636]

    - The psycopg2 now respects the statement option
      "stream_results". This option overrides the connection setting
      "server_side_cursors". If true, server side cursors will be
      used for the statement. If false, they will not be used, even
      if "server_side_cursors" is true on the
      connection. [ticket:1619]

- mysql
    - New dialects: oursql, a new native dialect,
      MySQL Connector/Python, a native Python port of MySQLdb,
      and of course zxjdbc on Jython.

    - VARCHAR/NVARCHAR will not render without a length, raises
      an error before passing to MySQL.   Doesn't impact
      CAST since VARCHAR is not allowed in MySQL CAST anyway,
      the dialect renders CHAR/NCHAR in those cases.

    - all the _detect_XXX() functions now run once underneath
      dialect.initialize()

    - somewhat better support for % signs in table/column names;
      MySQLdb can't handle % signs in SQL when executemany() is used,
      and SQLA doesn't want to add overhead just to treat that one
      non-existent use case. [ticket:1279]

    - the BINARY and MSBinary types now generate "BINARY" in all
      cases.  Omitting the "length" parameter will generate
      "BINARY" with no length.  Use BLOB to generate an unlengthed
      binary column.

    - the "quoting='quoted'" argument to MSEnum/ENUM is deprecated.
      It's best to rely upon the automatic quoting.

    - ENUM now subclasses the new generic Enum type, and also handles
      unicode values implicitly, if the given labelnames are unicode
      objects.

    - a column of type TIMESTAMP now defaults to NULL if
      "nullable=False" is not passed to Column(), and no default
      is present. This is now consistent with all other types,
      and in the case of TIMESTAMP explictly renders "NULL"
      due to MySQL's "switching" of default nullability
      for TIMESTAMP columns. [ticket:1539]

- oracle
    - unit tests pass 100% with cx_oracle !

    - support for cx_Oracle's "native unicode" mode which does
      not require NLS_LANG to be set. Use the latest 5.0.2 or
      later of cx_oracle.

    - an NCLOB type is added to the base types.

    - use_ansi=False won't leak into the FROM/WHERE clause of
      a statement that's selecting from a subquery that also
      uses JOIN/OUTERJOIN.

    - added native INTERVAL type to the dialect.  This supports
      only the DAY TO SECOND interval type so far due to lack
      of support in cx_oracle for YEAR TO MONTH. [ticket:1467]

    - usage of the CHAR type results in cx_oracle's
      FIXED_CHAR dbapi type being bound to statements.

    - the Oracle dialect now features NUMBER which intends
      to act justlike Oracle's NUMBER type.  It is the primary
      numeric type returned by table reflection and attempts
      to return Decimal()/float/int based on the precision/scale
      parameters.  [ticket:885]

    - func.char_length is a generic function for LENGTH

    - ForeignKey() which includes onupdate=<value> will emit a
      warning, not emit ON UPDATE CASCADE which is unsupported
      by oracle

    - the keys() method of RowProxy() now returns the result
      column names *normalized* to be SQLAlchemy case
      insensitive names. This means they will be lower case for
      case insensitive names, whereas the DBAPI would normally
      return them as UPPERCASE names. This allows row keys() to
      be compatible with further SQLAlchemy operations.

    - using new dialect.initialize() feature to set up
      version-dependent behavior.

    - using types.BigInteger with Oracle will generate
      NUMBER(19) [ticket:1125]

    - "case sensitivity" feature will detect an all-lowercase
      case-sensitive column name during reflect and add
      "quote=True" to the generated Column, so that proper
      quoting is maintained.

- firebird
    - the keys() method of RowProxy() now returns the result
      column names *normalized* to be SQLAlchemy case
      insensitive names. This means they will be lower case for
      case insensitive names, whereas the DBAPI would normally
      return them as UPPERCASE names. This allows row keys() to
      be compatible with further SQLAlchemy operations.

    - using new dialect.initialize() feature to set up
      version-dependent behavior.

    - "case sensitivity" feature will detect an all-lowercase
      case-sensitive column name during reflect and add
      "quote=True" to the generated Column, so that proper
      quoting is maintained.

- mssql
    - MSSQL + Pyodbc + FreeTDS now works for the most part,
      with possible exceptions regarding binary data as well as
      unicode schema identifiers.
    - the "has_window_funcs" flag is removed. LIMIT/OFFSET
      usage will use ROW NUMBER as always, and if on an older
      version of SQL Server, the operation fails. The behavior
      is exactly the same except the error is raised by SQL
      server instead of the dialect, and no flag setting is
      required to enable it.
    - the "auto_identity_insert" flag is removed. This feature
      always takes effect when an INSERT statement overrides a
      column that is known to have a sequence on it. As with
      "has_window_funcs", if the underlying driver doesn't
      support this, then you can't do this operation in any
      case, so there's no point in having a flag.
    - using new dialect.initialize() feature to set up
      version-dependent behavior.
    - removed references to sequence which is no longer used.
      implicit identities in mssql work the same as implicit
      sequences on any other dialects. Explicit sequences are
      enabled through the use of "default=Sequence()". See
      the MSSQL dialect documentation for more information.

- sqlite
    - DATE, TIME and DATETIME types can now take optional storage_format
      and regexp argument. storage_format can be used to store those types
      using a custom string format. regexp allows to use a custom regular
      expression to match string values from the database.
    - Time and DateTime types now use by a default a stricter regular
      expression to match strings from the database. Use the regexp
      argument if you are using data stored in a legacy format.
    - __legacy_microseconds__ on SQLite Time and DateTime types is not
      supported anymore. You should use the storage_format argument
      instead.
    - Date, Time and DateTime types are now stricter in what they accept as
      bind parameters: Date type only accepts date objects (and datetime
      ones, because they inherit from date), Time only accepts time
      objects, and DateTime only accepts date and datetime objects.
    - Table() supports a keyword argument "sqlite_autoincrement", which
      applies the SQLite keyword "AUTOINCREMENT" to the single integer
      primary key column when generating DDL. Will prevent generation of
      a separate PRIMARY KEY constraint. [ticket:1016]

- new dialects
    - postgresql+pg8000
    - postgresql+pypostgresql (partial)
    - postgresql+zxjdbc
    - mysql+pyodbc
    - mysql+zxjdbc

- types
    - The construction of types within dialects has been totally
      overhauled.  Dialects now define publically available types
      as UPPERCASE names exclusively, and internal implementation
      types using underscore identifiers (i.e. are private).
      The system by which types are expressed in SQL and DDL
      has been moved to the compiler system.  This has the
      effect that there are much fewer type objects within
      most dialects. A detailed document on this architecture
      for dialect authors is in
      lib/sqlalchemy/dialects/type_migration_guidelines.txt .

    - Types no longer make any guesses as to default
      parameters. In particular, Numeric, Float, NUMERIC,
      FLOAT, DECIMAL don't generate any length or scale unless
      specified.

    - types.Binary is renamed to types.LargeBinary, it only
      produces BLOB, BYTEA, or a similar "long binary" type.
      New base BINARY and VARBINARY
      types have been added to access these MySQL/MS-SQL specific
      types in an agnostic way [ticket:1664].

    - String/Text/Unicode types now skip the unicode() check
      on each result column value if the dialect has
      detected the DBAPI as returning Python unicode objects
      natively.  This check is issued on first connect
      using "SELECT CAST 'some text' AS VARCHAR(10)" or
      equivalent, then checking if the returned object
      is a Python unicode.   This allows vast performance
      increases for native-unicode DBAPIs, including
      pysqlite/sqlite3, psycopg2, and pg8000.

    - Most types result processors have been checked for possible speed
      improvements. Specifically, the following generic types have been
      optimized, resulting in varying speed improvements:
      Unicode, PickleType, Interval, TypeDecorator, Binary.
      Also the following dbapi-specific implementations have been improved:
      Time, Date and DateTime on Sqlite, ARRAY on Postgresql,
      Time on MySQL, Numeric(as_decimal=False) on MySQL, oursql and
      pypostgresql, DateTime on cx_oracle and LOB-based types on cx_oracle.

    - Reflection of types now returns the exact UPPERCASE
      type within types.py, or the UPPERCASE type within
      the dialect itself if the type is not a standard SQL
      type.  This means reflection now returns more accurate
      information about reflected types.

    - Added a new Enum generic type. Enum is a schema-aware object
      to support databases which require specific DDL in order to
      use enum or equivalent; in the case of PG it handles the
      details of `CREATE TYPE`, and on other databases without
      native enum support will by generate VARCHAR + an inline CHECK
      constraint to enforce the enum.
      [ticket:1109] [ticket:1511]

    - The Interval type includes a "native" flag which controls
      if native INTERVAL types (postgresql + oracle) are selected
      if available, or not.  "day_precision" and "second_precision"
      arguments are also added which propagate as appropriately
      to these native types. Related to [ticket:1467].

    - The Boolean type, when used on a backend that doesn't
      have native boolean support, will generate a CHECK
      constraint "col IN (0, 1)" along with the int/smallint-
      based column type.  This can be switched off if
      desired with create_constraint=False.
      Note that MySQL has no native boolean *or* CHECK constraint
      support so this feature isn't available on that platform.
      [ticket:1589]

    - PickleType now uses == for comparison of values when
      mutable=True, unless the "comparator" argument with a
      comparsion function is specified to the type. Objects
      being pickled will be compared based on identity (which
      defeats the purpose of mutable=True) if __eq__() is not
      overridden or a comparison function is not provided.

    - The default "precision" and "scale" arguments of Numeric
      and Float have been removed and now default to None.
      NUMERIC and FLOAT will be rendered with no numeric
      arguments by default unless these values are provided.

    - AbstractType.get_search_list() is removed - the games
      that was used for are no longer necessary.

    - Added a generic BigInteger type, compiles to
      BIGINT or NUMBER(19). [ticket:1125]

-ext
    - sqlsoup has been overhauled to explicitly support an 0.5 style
      session, using autocommit=False, autoflush=True. Default
      behavior of SQLSoup now requires the usual usage of commit()
      and rollback(), which have been added to its interface. An
      explcit Session or scoped_session can be passed to the
      constructor, allowing these arguments to be overridden.

    - sqlsoup db.<sometable>.update() and delete() now call
      query(cls).update() and delete(), respectively.

    - sqlsoup now has execute() and connection(), which call upon
      the Session methods of those names, ensuring that the bind is
      in terms of the SqlSoup object's bind.

    - sqlsoup objects no longer have the 'query' attribute - it's
      not needed for sqlsoup's usage paradigm and it gets in the
      way of a column that is actually named 'query'.

    - The signature of the proxy_factory callable passed to
      association_proxy is now (lazy_collection, creator,
      value_attr, association_proxy), adding a fourth argument
      that is the parent AssociationProxy argument.  Allows
      serializability and subclassing of the built in collections.
      [ticket:1259]

    - association_proxy now has basic comparator methods .any(),
      .has(), .contains(), ==, !=, thanks to Scott Torborg.
      [ticket:1372]

- examples
    - The "query_cache" examples have been removed, and are replaced
      with a fully comprehensive approach that combines the usage of
      Beaker with SQLAlchemy.  New query options are used to indicate
      the caching characteristics of a particular Query, which
      can also be invoked deep within an object graph when lazily
      loading related objects.  See /examples/beaker_caching/README.

0.5.9
=====
- sql
    - Fixed erroneous self_group() call in expression package.
      [ticket:1661]

0.5.8
=====
- sql
    - The copy() method on Column now supports uninitialized,
      unnamed Column objects. This allows easy creation of
      declarative helpers which place common columns on multiple
      subclasses.

    - Default generators like Sequence() translate correctly
      across a copy() operation.

    - Sequence() and other DefaultGenerator objects are accepted
      as the value for the "default" and "onupdate" keyword
      arguments of Column, in addition to being accepted
      positionally.

    - Fixed a column arithmetic bug that affected column
      correspondence for cloned selectables which contain
      free-standing column expressions.   This bug is
      generally only noticeable when exercising newer
      ORM behavior only availble in 0.6 via [ticket:1568],
      but is more correct at the SQL expression level
      as well. [ticket:1617]

- postgresql
    - The extract() function, which was slightly improved in
      0.5.7, needed a lot more work to generate the correct
      typecast (the typecasts appear to be necessary in PG's
      EXTRACT quite a lot of the time).  The typecast is
      now generated using a rule dictionary based
      on PG's documentation for date/time/interval arithmetic.
      It also accepts text() constructs again, which was broken
      in 0.5.7. [ticket:1647]

- firebird
    - Recognize more errors as disconnections. [ticket:1646]

0.5.7
=====
- orm
    - contains_eager() now works with the automatically
      generated subquery that results when you say
      "query(Parent).join(Parent.somejoinedsubclass)", i.e.
      when Parent joins to a joined-table-inheritance subclass.
      Previously contains_eager() would erroneously add the
      subclass table to the query separately producing a
      cartesian product.  An example is in the ticket
      description.  [ticket:1543]

    - query.options() now only propagate to loaded objects
      for potential further sub-loads only for options where
      such behavior is relevant, keeping
      various unserializable options like those generated
      by contains_eager() out of individual instance states.
      [ticket:1553]

    - Session.execute() now locates table- and
      mapper-specific binds based on a passed
      in expression which is an insert()/update()/delete()
      construct. [ticket:1054]

    - Session.merge() now properly overwrites a many-to-one or
      uselist=False attribute to None if the attribute
      is also None in the given object to be merged.

    - Fixed a needless select which would occur when merging
      transient objects that contained a null primary key
      identifier.  [ticket:1618]

    - Mutable collection passed to the "extension" attribute
      of relation(), column_property() etc. will not be mutated
      or shared among multiple instrumentation calls, preventing
      duplicate extensions, such as backref populators,
      from being inserted into the list.
      [ticket:1585]

    - Fixed the call to get_committed_value() on CompositeProperty.
      [ticket:1504]

    - Fixed bug where Query would crash if a join() with no clear
      "left" side were called when a non-mapped column entity
      appeared in the columns list. [ticket:1602]

    - Fixed bug whereby composite columns wouldn't load properly
      when configured on a joined-table subclass, introduced in
      version 0.5.6 as a result of the fix for [ticket:1480].
      [ticket:1616] thx to Scott Torborg.

    - The "use get" behavior of many-to-one relations, i.e. that a
      lazy load will fallback to the possibly cached query.get()
      value, now works across join conditions where the two compared
      types are not exactly the same class, but share the same
      "affinity" - i.e. Integer and SmallInteger.  Also allows
      combinations of reflected and non-reflected types to work
      with 0.5 style type reflection, such as PGText/Text (note 0.6
      reflects types as their generic versions).   [ticket:1556]

    - Fixed bug in query.update() when passing Cls.attribute
      as keys in the value dict and using synchronize_session='expire'
      ('fetch' in 0.6). [ticket:1436]

- sql
    - Fixed bug in two-phase transaction whereby commit() method
      didn't set the full state which allows subsequent close()
      call to succeed. [ticket:1603]

    - Fixed the "numeric" paramstyle, which apparently is the
      default paramstyle used by Informixdb.

    - Repeat expressions in the columns clause of a select
      are deduped based on the identity of each clause element,
      not the actual string.  This allows positional
      elements to render correctly even if they all render
      identically, such as "qmark" style bind parameters.
      [ticket:1574]

    - The cursor associated with connection pool connections
      (i.e. _CursorFairy) now proxies `__iter__()` to the
      underlying cursor correctly. [ticket:1632]

    - types now support an "affinity comparison" operation, i.e.
      that an Integer/SmallInteger are "compatible", or
      a Text/String, PickleType/Binary, etc.  Part of
      [ticket:1556].

    - Fixed bug preventing alias() of an alias() from being
      cloned or adapted (occurs frequently in ORM operations).
      [ticket:1641]

- sqlite
    - sqlite dialect properly generates CREATE INDEX for a table
      that is in an alternate schema.  [ticket:1439]

- postgresql
    - Added support for reflecting the DOUBLE PRECISION type,
      via a new postgres.PGDoublePrecision object.
      This is postgresql.DOUBLE_PRECISION in 0.6.
      [ticket:1085]

    - Added support for reflecting the INTERVAL YEAR TO MONTH
      and INTERVAL DAY TO SECOND syntaxes of the INTERVAL
      type.  [ticket:460]

    - Corrected the "has_sequence" query to take current schema,
      or explicit sequence-stated schema, into account.
      [ticket:1576]

    - Fixed the behavior of extract() to apply operator
      precedence rules to the "::" operator when applying
      the "timestamp" cast - ensures proper parenthesization.
      [ticket:1611]

- mssql
    - Changed the name of TrustedConnection to
      Trusted_Connection when constructing pyodbc connect
      arguments [ticket:1561]

- oracle
     - The "table_names" dialect function, used by MetaData
       .reflect(), omits "index overflow tables", a system
       table generated by Oracle when "index only tables"
       with overflow are used.  These tables aren't accessible
       via SQL and can't be reflected.  [ticket:1637]

- ext
    - A column can be added to a joined-table declarative
      superclass after the class has been constructed
      (i.e. via class-level attribute assignment), and
      the column will be propagated down to
      subclasses. [ticket:1570]  This is the reverse
      situation as that of [ticket:1523], fixed in 0.5.6.

    - Fixed a slight inaccuracy in the sharding example.
      Comparing equivalence of columns in the ORM is best
      accomplished using col1.shares_lineage(col2).
      [ticket:1491]

    - Removed unused `load()` method from ShardedQuery.
      [ticket:1606]

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Nov 18 14:53:28 2009 UTC (15 years ago) by he
Branches: MAIN
CVS tags: pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -2 lines
Update from version 0.4.7p1 to 0.5.6.

This updates to a new stable branch of SQLAlchemy.
The list of changes are too extensive to include verbatim here, the change
log for the 0.5.6 release (and the rest of the 0.5 releases) is available at
  http://www.sqlalchemy.org/trac/browser/sqlalchemy/tags/rel_0_5_6/CHANGES

These changes were submitted as PR#42260 by Fredrik Pettai.

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Thu Sep 4 20:42:28 2008 UTC (16 years, 3 months ago) by tonnerre
Branches: TNF
CVS tags: pkgsrc-base, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, cube-native-xorg-base, cube-native-xorg
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Import the SQLAlchemy Python module. SQLAlchemy is a customizable object
oriented interface to databases like DBIx-Class is for Perl. It is quite
extensible and widely deployed.

It contains compilers for a number of database engines which are used
only if they're requested explicitly, nevertheless the package offers to
depend on some of them explicitly as requested by
PKG_OPTIONS.py-sqlalchemy.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Sep 4 20:42:28 2008 UTC (16 years, 3 months ago) by tonnerre
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>