python-zk/kazoo — pull request #103 by ryanuber (2013-07-06 06:08:53+00:00)
Title: Prefixless sequential znodes

In Zookeeper, it is possible to create sequential znodes without a prefix. This is handy when it is know that there will be no other data stored within some parent znode, for example, `/hosts/0000000000`, `/hosts/0000000001`, and so on.

The below session yields an undesirable result, in that the znode is created in the root-level namespace with `test` as a prefix, when expressively what I said was "I want a sequential znode *inside* of /tests/ with no prefix".
```
>>> from kazoo.client import *
>>> zk = KazooClient()
>>> zk.start()
>>> zk.create('/test/', 'test', None, False, True, True)
u'/test0000000000'
```

This patch fixes the following behavior thusly:
```
>>> from kazoo.client import *
>>> zk = KazooClient()
>>> zk.start()
>>> zk.create('/test/', 'test', None, False, True, True)
u'/test/0000000000'
```

It seems that the code that does the slash-stripping is fairly embedded, so in this pull, there are numerous pass-throughs to support *not* stripping the trailing slash. If there is a better way of doing this that I am missing, lets hear it! All other methods should remain unaffected, tests included.