Merge lp:~james-w/python-timeline-django/robust-wrappers into lp:python-timeline-django

Proposed by James Westby
Status: Superseded
Proposed branch: lp:~james-w/python-timeline-django/robust-wrappers
Merge into: lp:python-timeline-django
Prerequisite: lp:~james-w/python-timeline-django/middelware
Diff against target: 0 lines
To merge this branch: bzr merge lp:~james-w/python-timeline-django/robust-wrappers
Reviewer Review Type Date Requested Status
Canonical Consumer Applications Hackers Pending
Review via email: mp+211578@code.launchpad.net

Commit message

Make the wrappers/signal handlers more robust.

Description of the change

Hi,

This makes the hook code more robust against unexpected usage.

Firstly it changes the way that it tracks which connections have been
wrapped. It causes problems for two wrappers to be used that have
timeline factories that will produce the same timelines. We therefore
try to only allow a single wrapping. An alternative would be to wrap
with an object that could use multiple timeline factories, and not
update the same timeline twice.

Secondly it changes the signal handling for the request signals, to
not require perfectly nested signal pairs. This leads the same
timeline entries when they are perfect pairs, but prevents exceptions
when they are not, meaning that the timeline will contain the available
information and the request can complete.

Thanks,

James

To post a comment you must log in.

Unmerged revisions

Preview Diff

Empty

Subscribers

People subscribed via source and target branches