<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/base/test_events.py, branch pr/134</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>- Removing (or adding) an event listener at the same time that the event</title>
<updated>2014-08-14T18:40:28+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-14T18:40:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4a4cccfee5a2eb78380e56eb9476e91658656676'/>
<id>4a4cccfee5a2eb78380e56eb9476e91658656676</id>
<content type='text'>
is being run itself, either from inside the listener or from a
concurrent thread, now raises a RuntimeError, as the collection used is
now an instance of ``colletions.deque()`` and does not support changes
while being iterated.  Previously, a plain Python list was used where
removal from inside the event itself would produce silent failures.
fixes #3163
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
is being run itself, either from inside the listener or from a
concurrent thread, now raises a RuntimeError, as the collection used is
now an instance of ``colletions.deque()`` and does not support changes
while being iterated.  Previously, a plain Python list was used where
removal from inside the event itself would produce silent failures.
fixes #3163
</pre>
</div>
</content>
</entry>
<entry>
<title>pep8</title>
<updated>2014-08-14T18:21:03+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-08-14T18:21:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c0c6aaa58ad1bf01345189a917029c40edc3c8eb'/>
<id>c0c6aaa58ad1bf01345189a917029c40edc3c8eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Added a new keyword argument ``once=True`` to :func:`.event.listen`</title>
<updated>2014-03-11T16:27:10+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-03-11T16:27:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=009df6a3d041e517cc9efa74d3c87184357a5006'/>
<id>009df6a3d041e517cc9efa74d3c87184357a5006</id>
<content type='text'>
and :func:`.event.listens_for`.  This is a convenience feature which
will wrap the given listener such that it is only invoked once.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and :func:`.event.listens_for`.  This is a convenience feature which
will wrap the given listener such that it is only invoked once.
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed bug where events set to listen at the class</title>
<updated>2014-02-25T21:55:42+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-02-25T21:55:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e60529da797491e9e88e9fcc581334ad3a09bcc2'/>
<id>e60529da797491e9e88e9fcc581334ad3a09bcc2</id>
<content type='text'>
level (e.g. on the :class:`.Mapper` or :class:`.ClassManager`
level, as opposed to on an individual mapped class, and also on
:class:`.Connection`) that also made use of internal argument conversion
(which is most within those categories) would fail to be removable.
fixes #2973
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
level (e.g. on the :class:`.Mapper` or :class:`.ClassManager`
level, as opposed to on an individual mapped class, and also on
:class:`.Connection`) that also made use of internal argument conversion
(which is most within those categories) would fail to be removable.
fixes #2973
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed regression where using a ``functools.partial()`` with the event</title>
<updated>2014-01-04T05:35:48+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-04T05:35:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c450cd6cb6d0c8fed110abcec5bc17ec4e0e8c5e'/>
<id>c450cd6cb6d0c8fed110abcec5bc17ec4e0e8c5e</id>
<content type='text'>
system would cause a recursion overflow due to usage of inspect.getargspec()
on it in order to detect a legacy calling signature for certain events,
and apparently there's no way to do this with a partial object.  Instead
we skip the legacy check and assume the modern style; the check itself
now only occurs for the SessionEvents.after_bulk_update and
SessionEvents.after_bulk_delete events.  Those two events will require
the new signature style if assigned to a "partial" event listener.
[ticket:2905]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
system would cause a recursion overflow due to usage of inspect.getargspec()
on it in order to detect a legacy calling signature for certain events,
and apparently there's no way to do this with a partial object.  Instead
we skip the legacy check and assume the modern style; the check itself
now only occurs for the SessionEvents.after_bulk_update and
SessionEvents.after_bulk_delete events.  Those two events will require
the new signature style if assigned to a "partial" event listener.
[ticket:2905]
</pre>
</div>
</content>
</entry>
<entry>
<title>- add support for removal of instance methods as event listeners, taking</title>
<updated>2013-10-01T16:14:34+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-10-01T16:14:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3d4d93332951a790e7d74afc5a3e13ed2523fe90'/>
<id>3d4d93332951a790e7d74afc5a3e13ed2523fe90</id>
<content type='text'>
into account the id() of the function itself and self, [ticket:2832]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
into account the id() of the function itself and self, [ticket:2832]
</pre>
</div>
</content>
</entry>
<entry>
<title>- Removal of event listeners is now implemented.    The feature is</title>
<updated>2013-07-26T18:21:58+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-07-26T18:21:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4505425a38b079a8e2a59fdbe31bc033de25e871'/>
<id>4505425a38b079a8e2a59fdbe31bc033de25e871</id>
<content type='text'>
provided via the :func:`.event.remove` function.
[ticket:2268]
- reorganization of event.py module into a package; with the addition of the
docstring work as well as the new registry for removal, there's a lot more code now.
the package separates concerns and provides a top-level doc for each subsection
of functionality
- the remove feature works by providing the EventKey object which associates
the user-provided arguments to listen() with a global, weak-referencing registry.
This registry stores a collection of _ListenerCollection and _DispatchDescriptor
objects associated with each set of arguments, as well as the wrapped function
which was applied to that collection.  The EventKey can then be recreated for
a removal, all the _ListenerCollection and _DispatchDescriptor objects are located,
and the correct wrapped function is removed from each one.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
provided via the :func:`.event.remove` function.
[ticket:2268]
- reorganization of event.py module into a package; with the addition of the
docstring work as well as the new registry for removal, there's a lot more code now.
the package separates concerns and provides a top-level doc for each subsection
of functionality
- the remove feature works by providing the EventKey object which associates
the user-provided arguments to listen() with a global, weak-referencing registry.
This registry stores a collection of _ListenerCollection and _DispatchDescriptor
objects associated with each set of arguments, as well as the wrapped function
which was applied to that collection.  The EventKey can then be recreated for
a removal, all the _ListenerCollection and _DispatchDescriptor objects are located,
and the correct wrapped function is removed from each one.
</pre>
</div>
</content>
</entry>
<entry>
<title>- create a new system where we can decorate an event method</title>
<updated>2013-07-08T17:39:56+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-07-08T17:39:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=02a81707dc8b7c4d69551cad195fb16ca6955df1'/>
<id>02a81707dc8b7c4d69551cad195fb16ca6955df1</id>
<content type='text'>
with @_legacy_signature, will inspect incoming listener functions
to see if they match an older signature, will wrap into a newer sig
- add an event listen argument named=True, will send all args as
kw args so that event listeners can be written with **kw, any combination
of names
- add a doc system to events that writes out the various calling styles
for a given event, produces deprecation messages automatically.
a little concerned that it's a bit verbose but will look at it up
on RTD for awhile to get a feel.
- change the calling signature for bulk update/delete events - we have
the BulkUD object right there, and there's at least six or seven things
people might want to see, so just send the whole BulkUD in
[ticket:2775]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with @_legacy_signature, will inspect incoming listener functions
to see if they match an older signature, will wrap into a newer sig
- add an event listen argument named=True, will send all args as
kw args so that event listeners can be written with **kw, any combination
of names
- add a doc system to events that writes out the various calling styles
for a given event, produces deprecation messages automatically.
a little concerned that it's a bit verbose but will look at it up
on RTD for awhile to get a feel.
- change the calling signature for bulk update/delete events - we have
the BulkUD object right there, and there's at least six or seven things
people might want to see, so just send the whole BulkUD in
[ticket:2775]
</pre>
</div>
</content>
</entry>
<entry>
<title>- replace most explicitly-named test objects called "Mock..." with</title>
<updated>2013-06-30T22:35:12+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-06-30T22:35:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=b38a76cd1d47cd6b8f1abef30ad7c3aeaa27d537'/>
<id>b38a76cd1d47cd6b8f1abef30ad7c3aeaa27d537</id>
<content type='text'>
actual mock objects from the mock library.  I'd like to use mock
for new tests so we might as well use it in obvious places.
- use unittest.mock in py3.3
- changelog
- add a note to README.unittests
- add tests_require in setup.py
- have tests import from sqlalchemy.testing.mock
- apply usage of mock to one of the event tests.  we can be using
this approach all over the place.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
actual mock objects from the mock library.  I'd like to use mock
for new tests so we might as well use it in obvious places.
- use unittest.mock in py3.3
- changelog
- add a note to README.unittests
- add tests_require in setup.py
- have tests import from sqlalchemy.testing.mock
- apply usage of mock to one of the event tests.  we can be using
this approach all over the place.
</pre>
</div>
</content>
</entry>
<entry>
<title>- the raw 2to3 run</title>
<updated>2013-04-27T23:53:57+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-04-27T23:53:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4b614b9b35cd2baddb7ca67c04bee5d70ec6a172'/>
<id>4b614b9b35cd2baddb7ca67c04bee5d70ec6a172</id>
<content type='text'>
- went through examples/ and cleaned out excess list() calls
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- went through examples/ and cleaned out excess list() calls
</pre>
</div>
</content>
</entry>
</feed>
