James Mills is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

prologic / circuits http://pypi.python.org/pypi/circuits

circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture.

Clone this repository (size: 8.8 MB): HTTPS / SSH
hg clone https://bitbucket.org/prologic/circuits
hg clone ssh://hg@bitbucket.org/prologic/circuits

Issues

#23 "Success" not created correctly (presuambly)

Reported by mnlipp (last edited )

I just noticed that in circuits-dev the Success event is fired in Manager._dispatcher after all handlers have been executed. In 1.6 this event is fired after each event handler has been executed.

The comment of the Success event in cicuits-dev has remained unchanged and suggests that it should be fired after each handler (as has been done in 1.6). so presumably the lines in Manager._dispatch that fire the Success event should be shifted to the right, into the loop (or the comment should be changed).

- Michael

Status: resolved Responsible: Alessio Deiana Type: bug Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 James Mills

    written

    I believe this was deliberate and was changed in 548f64c8f7ad

    Is there a problem with the new behavior specifically? It makes more sense to fire the Success event after all handlers have finished successfully.

    --James

  2. #2 mnlipp

    written

    The problem is the mismatch between the implementation and the behaviour. Have a look at events.py (dev branch):

    "End event: This Event is sent just after all handlers for an event have been run"

    "Success Event: This Event is sent when an Event Handler's execution has completed successfully."

    So if the change has been made deliberately, the documentation should be adjusted. Question arises what the End event is good for then, however.

    - Michael

  3. #3 Edwin Marshall

    written

    mnlipp, in regards to why have the End event, according to issue #22, End is going away.

  4. #4 Anonymous

    written

    I have updated the help message for the success event to reflect the new behavior. https://bitbucket.org/prologic/circuits-dev/changeset/4231cdc12f57

    (We still have the end event which was added back)

  5. #5 Alessio Deiana

    written

    • Changed status from new to resolved.

    Previous message was me

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?