Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signalslot integration #29

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

sjlongland
Copy link

Finally pulled my finger out and had a look at fixing #23.

I nicked the callback tests and re-worked them to use signals instead. I haven't added tests that combine callbacks and signals at this point, I figure people will likely use one or the other, but in theory, mixing them should work, it'll execute the signals before the callbacks.

If detected, fysom will create `signalslot.Signal` instances for each of
the events.  The signals have the suffix `_sig` appended to them, to
differentiate them from the callback names.
For the following signals:
- onenter{STATE}_sig
- onchangestate_sig
- onafter{EVENT}_sig
- onreenter{STATE}_sig

The return values of the corresponding helper functions is not checked
by fysom.
This probably needs to be fixed in signalslot actually, but for now,
this will do.
Seems map() won't unconditionally iterate over its arguments.  Another
Python 3 vs 2 difference bites me in the nether regions.
@sjlongland
Copy link
Author

Okay, the Python 3.3 failure is due to a bug in weakrefmethod (used by signalslot) possibly addressed by twang817/weakrefmethod#4.

The commit 305f4ac can probably be reverted once Numergy/signalslot#11 is merged.

A TODO item is figuring out how to skip the test_signal tests when signalslot isn't present. Tempting to put it all in one big if block.

signalslot should pull this in by itself now.
@sjlongland
Copy link
Author

Okay, upstream weakrefmethod has been fixed for Python 3.x, and I've fixed the dependency issues in signalslot.

Soon as a new release of weakrefmethod is up on pypi, I should be able to push a patch that takes weakrefmethod out of .travis.yml and should pull in the newer weakrefmethod to fix the Python 3.3 test.

@coveralls
Copy link

coveralls commented Nov 6, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 847ddd7 on vrtsystems:signalslot into a1c8938 on mriehl:master.

@sjlongland
Copy link
Author

At long last, there's an update to signalslot, which fixes the Python 3.3 incompatibility, and so I was able to prod the build system. That revealed a bug in my test cases, which I have now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants