Mahadev konar commented on ZOOKEEPER-432:

henry, just to clear what I meant

  if (!PyArg_ParseTuple(args, "isO", &zkhid, &path, &watcherfn))

line 567 in zookeeper.c in zkpython does not deserialize the local watcherctx. 
So does the python api allow you do pass a ctx object with a local watcherfn? 

> Various improvements to zkpython bindings
> -----------------------------------------
>                 Key: ZOOKEEPER-432
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-432
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.2.0
>         Attachments: ZOOKEEPER-432.patch, ZOOKEEPER-432.patch
> What's new, from the README for this new version:
> ----------------------------------
> More test coverage. 
> Better reference counting, fixing at least two serious bugs.
> Out-of-range zhandles are now checked, fixing a potential security hole.
> Docstrings! Editing and cleanup required, but most of the text is there.
> zookeeper.set_watcher is now implemented correctly.
> zookeeper.client_id is now implemented correctly. zookeeper.init now respects 
> the client_id parameter.
> get_context and set_context have been removed from the API. The context 
> mechanism is used by PyZK to store the callables that are dispatched by 
> C-side watchers. Messing with this from Python-side causes bugs very quickly. 
> You should wrap all desired context up in a callable and then use 
> zookeeper.set_watcher to attach it to the global watcher. 
> Many methods now have optional parameters (usually if you can specify a 
> watch, it's optional). The only time where genuinely optional parameters are 
> still mandatory is when a required parameters comes after it. Currently we 
> still respect the ZK C client parameter ordering. For example, you can simply 
> connect with zookeeper.init("host:port") and ignore the other three 
> parameters.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to