A month or two back I described an effort to unify and merge several of the higher level Python Zookeeper libraries. I'm thrilled to announce the second release of kazoo, the new project merging a variety of bug-fixes and recipes that were scattered amongst the others.
- Fixed doc references to start_async using an AsyncResult object, it uses an Event object.
Bug Handling ************
- Issue #16 fixed: gevent zookeeper logging failed to handle a monkey patched logging setup. Logging is now setup such that a greenlet is used for logging messages under gevent, and the thread one is used otherwise. - Fixed bug similar to #14 for ChildrenWatch on the session listener. - Issue #14 fixed: DataWatch had inconsistent handling of the node it was watching not existing. DataWatch also properly spawns its _get_data function to avoid blocking session events. - Issue #15 fixed: sleep_func for SequentialGeventHandler was not set on the class appropriately leading to additional arguments being passed to gevent.sleep. - Issue #9 fixed: Threads/greenlets didn't gracefully shut down. Handler now has a start/stop that is used by the client when calling start and stop that shuts down the handler workers. This addresses errors and warnings that could be emitted upon process shutdown regarding a clean exit of the workers. - Issue #12 fixed: gevent 0.13 doesn't use the same start_new_thread as gevent 1.0 which resulted in a fully monkey-patched environment halting due to the wrong thread. Updated to use the older kazoo method of getting the real thread module object.
API Changes ***********
- The KazooClient handler is now officially exposed as KazooClient.handler so that the appropriate sync objects can be used by end-users. - Refactored ChildrenWatcher used by SetPartitioner into a publicly exposed PatientChildrenWatch under recipe.watchers.
- connect/connect_async has been renamed to start/start_async to better match the stop to indicate connection handling. The prior names are aliased for the time being.
- Added Barrier and DoubleBarrier implementation.
0.2b1 (7/27/2012) -----------------
Bug Handling ************
- ZOOKEEPER-1318: SystemError is caught and rethrown as the proper invalid state exception in older zookeeper python bindings where this issue is still valid. - ZOOKEEPER-1431: Install the latest zc-zookeeper-static library or use the packaged ubuntu one for ubuntu 12.04 or later. - ZOOKEEPER-553: State handling isn't checked via this method, we track it in a simpler manner with the watcher to ensure we know the right state.
- Exponential backoff with jitter for retrying commands. - Gevent 0.13 and 1.0b support. - Lock, Party, SetPartitioner, and Election recipe implementations. - Data and Children watching API's. - State transition handling with listener registering to handle session state changes (choose to fatal the app on session expiration, etc.) - Zookeeper logging stream redirected into Python logging channel under the name 'Zookeeper'. - Base client library with handler support for threading and gevent async environments. Cheers, Ben Bangert
On Tue, Aug 14, 2012 at 7:37 AM, Loki Davison <[EMAIL PROTECTED]> wrote: > Good to hear! When do you recommend porting from old Kazoo to this?
I'd encourage you to use the new version more or less right away; putting it through your usual testing/staging/q&a process. Most of the API's are still present, so there isn't all too much of any porting required. We've gotten good feedback and usage reports from sites like reddit and quora.
> How is testing / correctness levels in comparison?
There are a lot more tests now, about a factor of 10x in terms of lines of code. There's also a new testing framework using a real 3-node ZK cluster for integration tests, which you can also use in your own tests (http://kazoo.readthedocs.org/en/latest/testing.html).
That said, most of the automated tests use the threading backend, so the gevent backend is a bit less proven.
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by Sematext