<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/orm/test_unitofworkv2.py, branch pr/183</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>- Fixed regression in the :mod:`sqlalchemy.ext.mutable` extension</title>
<updated>2015-05-21T18:21:01+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-21T18:21:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=525cc6fe0247a76201c173e535d8309333461afc'/>
<id>525cc6fe0247a76201c173e535d8309333461afc</id>
<content type='text'>
as a result of the bugfix for :ticket:`3167`,
where attribute and validation events are no longer
called within the flush process.  The mutable
extension was relying upon this behavior in the case where a column
level Python-side default were responsible for generating the new value
on INSERT or UPDATE, or when a value were fetched from the RETURNING
clause for "eager defaults" mode.  The new value would not be subject
to any event when populated and the mutable extension could not
establish proper coercion or history listening.  A new event
:meth:`.InstanceEvents.refresh_flush` is added which the mutable
extension now makes use of for this use case.
fixes #3427
- Added new event :meth:`.InstanceEvents.refresh_flush`, invoked
when an INSERT or UPDATE level default value fetched via RETURNING
or Python-side default is invoked within the flush process.  This
is to provide a hook that is no longer present as a result of
:ticket:`3167`, where attribute and validation events are no longer
called within the flush process.
- Added a new semi-public method to :class:`.MutableBase`
:meth:`.MutableBase._get_listen_keys`.  Overriding this method
is needed in the case where a :class:`.MutableBase` subclass needs
events to propagate for attribute keys other than the key to which
the mutable type is associated with, when intercepting the
:meth:`.InstanceEvents.refresh` or
:meth:`.InstanceEvents.refresh_flush` events.  The current example of
this is composites using :class:`.MutableComposite`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as a result of the bugfix for :ticket:`3167`,
where attribute and validation events are no longer
called within the flush process.  The mutable
extension was relying upon this behavior in the case where a column
level Python-side default were responsible for generating the new value
on INSERT or UPDATE, or when a value were fetched from the RETURNING
clause for "eager defaults" mode.  The new value would not be subject
to any event when populated and the mutable extension could not
establish proper coercion or history listening.  A new event
:meth:`.InstanceEvents.refresh_flush` is added which the mutable
extension now makes use of for this use case.
fixes #3427
- Added new event :meth:`.InstanceEvents.refresh_flush`, invoked
when an INSERT or UPDATE level default value fetched via RETURNING
or Python-side default is invoked within the flush process.  This
is to provide a hook that is no longer present as a result of
:ticket:`3167`, where attribute and validation events are no longer
called within the flush process.
- Added a new semi-public method to :class:`.MutableBase`
:meth:`.MutableBase._get_listen_keys`.  Overriding this method
is needed in the case where a :class:`.MutableBase` subclass needs
events to propagate for attribute keys other than the key to which
the mutable type is associated with, when intercepting the
:meth:`.InstanceEvents.refresh` or
:meth:`.InstanceEvents.refresh_flush` events.  The current example of
this is composites using :class:`.MutableComposite`.
</pre>
</div>
</content>
</entry>
<entry>
<title>- fix another issue from rf49c367ef, add another test</title>
<updated>2015-01-19T04:32:52+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-01-19T04:32:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=28d0b8d1d1b135c2d6974f4d31e56b8d49c8ef09'/>
<id>28d0b8d1d1b135c2d6974f4d31e56b8d49c8ef09</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- fix a regression from ref #3178, where dialects that don't actually support</title>
<updated>2015-01-18T02:58:49+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-01-18T02:36:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f49c367ef712d080e630ba722f96903922d7de7b'/>
<id>f49c367ef712d080e630ba722f96903922d7de7b</id>
<content type='text'>
sane multi rowcount (e.g. pyodbc) would fail on multirow update.  add
a test that mocks this breakage into plain dialects
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sane multi rowcount (e.g. pyodbc) would fail on multirow update.  add
a test that mocks this breakage into plain dialects
</pre>
</div>
</content>
</entry>
<entry>
<title>- major simplification of _collect_update_commands.  in particular,</title>
<updated>2014-08-18T17:18:46+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-18T16:50:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=d39927ec20dd0b66f4ab3aab3e4e67b3814186ce'/>
<id>d39927ec20dd0b66f4ab3aab3e4e67b3814186ce</id>
<content type='text'>
we only call upon the history API fully for primary key columns.
We also now skip the whole step of looking at PK columns and using
any history at all if no net changes are detected on the object.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we only call upon the history API fully for primary key columns.
We also now skip the whole step of looking at PK columns and using
any history at all if no net changes are detected on the object.
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed bug where attribute "set" events or columns with</title>
<updated>2014-08-18T00:06:16+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-18T00:06:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=530d3f07e0c1e70e0f9b80d3b5986253e06dcaf2'/>
<id>530d3f07e0c1e70e0f9b80d3b5986253e06dcaf2</id>
<content type='text'>
``@validates`` would have events triggered within the flush process,
when those columns were the targets of a "fetch and populate"
operation, such as an autoincremented primary key, a Python side
default, or a server-side default "eagerly" fetched via RETURNING.
fixes #3167
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
``@validates`` would have events triggered within the flush process,
when those columns were the targets of a "fetch and populate"
operation, such as an autoincremented primary key, a Python side
default, or a server-side default "eagerly" fetched via RETURNING.
fixes #3167
</pre>
</div>
</content>
</entry>
<entry>
<title>- UPDATE statements can now be batched within an ORM flush</title>
<updated>2014-08-15T00:47:49+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-15T00:47:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=bc509dd50d7b65e35412e2be67bd37a6c19e7119'/>
<id>bc509dd50d7b65e35412e2be67bd37a6c19e7119</id>
<content type='text'>
into more performant executemany() call, similarly to how INSERT
statements can be batched; this will be invoked within flush
to the degree that subsequent UPDATE statements for the
same mapping and table involve the identical columns within the
VALUES clause, as well as that no VALUES-level SQL expressions
are embedded.
- some other inlinings within persistence.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
into more performant executemany() call, similarly to how INSERT
statements can be batched; this will be invoked within flush
to the degree that subsequent UPDATE statements for the
same mapping and table involve the identical columns within the
VALUES clause, as well as that no VALUES-level SQL expressions
are embedded.
- some other inlinings within persistence.py
</pre>
</div>
</content>
</entry>
<entry>
<title>pep8</title>
<updated>2014-08-15T00:37:28+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-15T00:37:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f0a56bc5aa8cb0ca7b642eaa99093ade2065d4b5'/>
<id>f0a56bc5aa8cb0ca7b642eaa99093ade2065d4b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- reverse course in #3061 so that we instead no longer set None in the attribute</title>
<updated>2014-06-23T23:50:23+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-06-23T23:50:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f10eb28d90cbf73f4757897f52bf26722f98372e'/>
<id>f10eb28d90cbf73f4757897f52bf26722f98372e</id>
<content type='text'>
when we do a get; we return the None as always but we leave the dict blank
and the loader callable still in place.  The case for this implicit get on a pending object is not
super common and there really should be no change in state at all when this
operation proceeds.   This change is more dramatic as it reverses
a behavior SQLA has had since the first release.
fixes #3061
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when we do a get; we return the None as always but we leave the dict blank
and the loader callable still in place.  The case for this implicit get on a pending object is not
super common and there really should be no change in state at all when this
operation proceeds.   This change is more dramatic as it reverses
a behavior SQLA has had since the first release.
fixes #3061
</pre>
</div>
</content>
</entry>
<entry>
<title>- Reverted the change for :ticket:`3060` - this is a unit of work</title>
<updated>2014-06-23T22:42:54+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-06-23T22:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=7e7447db1ff1a49f15269f6515a82607db9384f4'/>
<id>7e7447db1ff1a49f15269f6515a82607db9384f4</id>
<content type='text'>
fix that is updated more comprehensively in 1.0 via :ticket:`3061`.
The fix in :ticket:`3060` unfortunately produces a new issue whereby
an eager load of a many-to-one attribute can produce an event
that is interpreted into an attribute change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix that is updated more comprehensively in 1.0 via :ticket:`3061`.
The fix in :ticket:`3060` unfortunately produces a new issue whereby
an eager load of a many-to-one attribute can produce an event
that is interpreted into an attribute change.
</pre>
</div>
</content>
</entry>
<entry>
<title>- Related to :ticket:`3060`, an adjustment has been made to the unit</title>
<updated>2014-05-30T05:32:53+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-05-30T05:32:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=69dbcdd0ebf8de81643c038276fcc822a7b0bd0b'/>
<id>69dbcdd0ebf8de81643c038276fcc822a7b0bd0b</id>
<content type='text'>
of work such that loading for related many-to-one objects is slightly
more aggressive, in the case of a graph of self-referential objects
that are to be deleted; the load of related objects is to help
determine the correct order for deletion if passive_deletes is
not set.
- revert the changes to test_delete_unloaded_m2o, these deletes do in fact
need to occur in the order of the two child objects first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of work such that loading for related many-to-one objects is slightly
more aggressive, in the case of a graph of self-referential objects
that are to be deleted; the load of related objects is to help
determine the correct order for deletion if passive_deletes is
not set.
- revert the changes to test_delete_unloaded_m2o, these deletes do in fact
need to occur in the order of the two child objects first.
</pre>
</div>
</content>
</entry>
</feed>
