| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
| |
|
|\
| |
| |
| | |
https://bitbucket.org/goodscloud/sqlalchemy into pr27
|
| | |
|
|/
|
|
| |
If a class inherited from MutableDict (say, for instance, to add an update() method), coerce() would give back an instance of MutableDict instead of an instance of the derived class.
|
| |
|
|
|
|
| |
to get all flake8 passing
|
| |
|
|
|
|
|
| |
report change events for the ``setdefault()`` dictionary operation.
fixes #3051
|
|
|
|
|
|
| |
:func:`.attributes.flag_modified` where the change event would not be
propagated if the attribute had been reassigned to itself.
fixes #2997
|
|
|
|
|
| |
This had me reread the code twice to see if I missed why the import was
present.
|
| |
|
|
|
|
| |
versionadded
|
| |
|
|
|
|
|
|
| |
We should probably reword this entirely as, IMHO, this should be in the
changelog and not in the doc proper (which should only describe the
current state of affairs).
|
|
|
|
|
| |
if the given target/event/fn is set up to listen.
- repair mutable package which is doing some conditional event listening
|
|
|
|
| |
- simplify
|
| |
|
|
|
|
| |
before checking if it is a subclass of `MutableComposite`
|
|
|
|
|
| |
when ``clear()`` was called.
[ticket:2730]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
:meth:`.MutableBase.coerce` method to be used, even though
the code seemed to indicate this intent, so this now works
and a brief example is added. As a side-effect,
the mechanics of this event handler have been changed so that
new :class:`.MutableComposite` types no longer add per-type
global event handlers. Also in 0.7.10
[ticket:2624]
|
| |
|
| |
|
|
|
|
| |
- this was a mistake in mutable
|
| |
|
| |
|
|
|
|
| |
such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
|
| |
|
| |
|
|
|
|
| |
no longer compatible with docutils 0.8
|
|
|
|
|
|
|
| |
if None or a non-corresponding type were set,
an error would be raised. None is now accepted
which assigns None to all attributes,
illegal values raise ValueError.
|
|
|
|
|
|
| |
if the same type were used twice in one
mapping, the attributes beyond the first
would not get instrumented.
|
|
|
|
|
|
| |
events to subclasses correctly; don't
create multiple event listeners for
subclasses either. [ticket:2180]
|
|
|
|
|
|
| |
`None` was not appropriately handled, replacement
events were not appropriately handled.
[ticket:2143]
|
|
|
|
|
|
| |
abc from the ext.mutable docs as it was being used
incorrectly and makes the example more difficult
to understand in any case. [ticket:2152]
|
|
|
|
|
| |
correct type-association methods.
[ticket:2118]
|
| |
|
|
|
|
|
|
|
| |
- add pickle/unpickle events to ORM events. these are needed
for the mutable extension.
- finish mutable extension documentation, consolidate examples,
add full descriptions
|
| |
|
|
|
|
|
| |
a consistent tag
- AUTHORS file
|
|
|
|
|
|
| |
- add list of attribute names to refresh()
- ensure refresh() only called when attributes actually refreshed
- tests. [ticket:2011]
|
| |
|
|
- streamline interfaces, get Mutable/MutableComposite to be as minimal
in usage as possible
- docs for mutable, warnings regrarding mapper events being global
- move MutableType/mutable=True outwards, move orm tests to its
own module, note in all documentation
- still need more events/tests for correct pickling support of
composites, mutables. in the case of composites its needed
even without mutation. see [ticket:2009]
|