diff options
| author | Chris McDonough <chrism@plope.com> | 2011-07-01 03:18:03 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-07-01 03:18:03 -0400 |
| commit | 2ea5c1fbe9fef8fc6a1f16f98368abe68100783d (patch) | |
| tree | f20baca98db0c022479420eadbf72662fac8171a /docs/whatsnew-1.1.rst | |
| parent | 6c9959c34b403c2b1e3088d34b67bef5c79ee9fc (diff) | |
| download | pyramid-2ea5c1fbe9fef8fc6a1f16f98368abe68100783d.tar.gz pyramid-2ea5c1fbe9fef8fc6a1f16f98368abe68100783d.tar.bz2 pyramid-2ea5c1fbe9fef8fc6a1f16f98368abe68100783d.zip | |
- The ``pyramid.events.subscriber`` directive behaved contrary to the
documentation when passed more than one interface object to its
constructor. For example, when the following listener was registered::
@subscriber(IFoo, IBar)
def expects_ifoo_events_and_ibar_events(event):
print event
The Events chapter docs claimed that the listener would be registered and
listening for both ``IFoo`` and ``IBar`` events. Instead, it registered an
"object event" subscriber which would only be called if an IObjectEvent was
emitted where the object interface was ``IFoo`` and the event interface was
``IBar``.
The behavior now matches the documentation. If you were relying on the
buggy behavior of the 1.0 ``subscriber`` directive in order to register an
object event subscriber, you must now pass a sequence to indicate you'd
like to register a subscriber for an object event. e.g.:
@subscriber([IFoo, IBar])
def expects_object_event(object, event):
print object, event
Diffstat (limited to 'docs/whatsnew-1.1.rst')
0 files changed, 0 insertions, 0 deletions
