Hi, I just finished the kaa.notifier changes discussed here and in the irc channel. I also updated all kaa modules and Freevo 2.0 to reflect the changes, Freevo 1.x branch is broken I guess. Here a list of changes:
1. Rename kaa.notifier mainloop control:
kaa.notifier.init() is kaa.main.select_notifier()
kaa.notifier.loop() and kaa.main() is now kaa.main.run()
kaa.notifier.step() is kaa.main.step()
kaa.notifier.shutdown() is kaa.main.stop()
kaa.notifier.running is kaa.main.is_running()
kaa.notifier.signals (shutdown/step) are now kaa.main.signals
kaa.main can be accessed by importing kaa, you can NOT import
kaa.main directly.
2. Move kaa.notifier classes and functions into the kaa namespace.
E.g. kaa.notifier.Timer is now kaa.Timer. No part of the code
should use anything from kaa.notifier.
Note: Exception for this is kaa.notifier.url right now
3. Renamed ThreadCallback to NamedThreadCallback and make the first
paramater in __init__ the thread information (name or list of name
and priority). The register function will be changed to __call__.
The NamedThreadCallback is not InProgress object anymore, it is a
Callback. In most cases ThreadCallback was not used directly so
this API change should not break some code.
4. Renamed Thread to ThreadCallback. The class has no signals anymore
and the start function is now __call__ and it will return an
InProgress object.
5. Rename exception_handler in InProgress into exception and the
exception callback function to throw. Add a convenience function
connect_both. The member variable is_finished is now a function.
6. yield_execution decorator: lock kwarg was renamed to synchronize
7. All exception handlers now take three arguments (instead of one):
exception type, exception value, traceback.
8. yield_execution now always returns an InProgress object. This
InProgress object may already be finished. Using yield on a
finished object will return without waiting. For Python 2.5 the
yield also returns the value or can raise an exception.
Freevo 2.0 trunk may be a bit unstable now, not everything has been
tested yet. Change number 8 has also the following side-effect:
kaa.beacon now requires Python 2.5 which means Freevo 2.0 will not
work with Python 2.4 anymore. Gentoo users: unmask Python 2.5, it is
stable. :)
Please test
Dischi
--
When in doubt, do it. It's much easier to apologize than to get permission.
-- Grace Murray Hopper
pgpegGmp4srdF.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Freevo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-devel
