PKG-INFO 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. Metadata-Version: 1.1
  2. Name: kazoo
  3. Version: 2.0
  4. Summary: Higher Level Zookeeper Client
  5. Home-page: https://kazoo.readthedocs.org
  6. Author: Kazoo team
  7. Author-email: python-zk@googlegroups.com
  8. License: Apache 2.0
  9. Description: =====
  10. Kazoo
  11. =====
  12. ``kazoo`` implements a higher level API to `Apache Zookeeper`_ for Python
  13. clients.
  14. See `the full docs`_ for more information.
  15. License
  16. =======
  17. ``kazoo`` is offered under the Apache License 2.0.
  18. Authors
  19. =======
  20. ``kazoo`` started under the `Nimbus Project`_ and through collaboration with
  21. the open-source community has been merged with code from `Mozilla`_ and the
  22. `Zope Corporation`_. It has since gathered an active community of over two
  23. dozen contributors.
  24. .. _Apache Zookeeper: http://zookeeper.apache.org/
  25. .. _the full docs: http://kazoo.rtfd.org/
  26. .. _Nimbus Project: http://www.nimbusproject.org/
  27. .. _Zope Corporation: http://zope.com/
  28. .. _Mozilla: http://www.mozilla.org/
  29. Changelog
  30. =========
  31. 2.0 (2014-06-19)
  32. ----------------
  33. Documentation
  34. *************
  35. - Extend support to Python 3.4, deprecating Python 3.2.
  36. - Issue #198: Mention Zake as a sophisticated kazoo mock testing library.
  37. - Issue #181: Add documentation on basic logging setup.
  38. 2.0b1 (2014-04-24)
  39. ------------------
  40. API Changes
  41. ***********
  42. - Null or None data is no longer treated as "". Pull req #165, patch by
  43. Raul Gutierrez S. This will affect how you should treat null data in a
  44. znode vs. an empty string.
  45. - Passing acl=[] to create() now works properly instead of an InvalidACLError
  46. as it returned before. Patch by Raul Gutierrez S in PR #164.
  47. - Removed the dependency on zope.interface. The classes in the interfaces
  48. module are left for documentation purposes only (issue #131).
  49. Features
  50. ********
  51. - Logging levels have been reduced.
  52. - Logging previously at the ``logging.DEBUG`` level is now logged at
  53. the ``kazoo.loggingsupport.BLATHER`` level (5).
  54. - Some low-level logging previously at the ``logging.INFO`` level is
  55. now logged at the ``logging.DEBUG`` level.
  56. - Issue #133: Introduce a new environment variable `ZOOKEEPER_PORT_OFFSET`
  57. for the testing support, to run the testing cluster on a different range.
  58. Bug Handling
  59. ************
  60. - When authenticating via add_auth() the auth data will be saved to ensure that
  61. the authentication happens on reconnect (as is the case when feeding auth
  62. data via KazooClient's constructor). PR #172, patch by Raul Gutierrez S.
  63. - Change gevent import to remove deprecation warning when newer gevent is
  64. used. PR #191, patch by Hiroaki Kawai.
  65. - Lock recipe was failing to use the client's sleep_func causing issues with
  66. gevent. Issue #150.
  67. - Calling a DataWatch or ChildrenWatch instance twice (decorator) now throws
  68. an exception as only a single function can be associated with a single
  69. watcher. Issue #154.
  70. - Another fix for atexit handling so that when disposing of connections the
  71. atexit handler is removed. PR #190, patch by Devaev Maxim.
  72. - Fix atexit handling for kazoo threading handler, PR #183. Patch by
  73. Brian Wickman.
  74. - Partitioner should handle a suspended connection properly and restore
  75. an allocated state if it was allocated previously. Patch by Manish Tomar.
  76. - Issue #167: Closing a client that was never started throws a type error.
  77. Patch by Joshua Harlow.
  78. - Passing dictionaries to KazooClient.__init__() wasn't actually working
  79. properly. Patch by Ryan Uber.
  80. - Issue #119: Handler timeout takes the max of the random interval or
  81. the read timeout to ensure a negative number isn't used for the read
  82. timeout.
  83. - Fix ordering of exception catches in lock.acquire as it was capturing a
  84. parent exception before the child. Patch by ReneSac.
  85. - Fix issue with client.stop() not always setting the client state to
  86. KeeperState.CLOSED. Patch by Jyrki Pulliainen in PR #174.
  87. - Issue #169: Fixed pipes leaking into child processes.
  88. Documentation
  89. *************
  90. - Add section on contributing recipes, add maintainer/status information for
  91. existing recipes.
  92. - Add note about alternate use of DataWatch.
  93. 1.3.1 (2013-09-25)
  94. ------------------
  95. Bug Handling
  96. ************
  97. - #118, #125, #128: Fix unknown variable in KazooClient `command_retry`
  98. argument handling.
  99. - #126: Fix `KazooRetry.copy` to correctly copy sleep function.
  100. - #118: Correct session/socket timeout conversion (int vs. float).
  101. Documentation
  102. *************
  103. - #121: Add a note about `kazoo.recipe.queue.LockingQueue` requiring a
  104. Zookeeper 3.4+ server.
  105. 1.3 (2013-09-05)
  106. ----------------
  107. Features
  108. ********
  109. - #115: Limit the backends we use for SLF4J during tests.
  110. - #112: Add IPv6 support. Patch by Dan Kruchinin.
  111. 1.2.1 (2013-08-01)
  112. ------------------
  113. Bug Handling
  114. ************
  115. - Issue #108: Circular import fail when importing kazoo.recipe.watchers
  116. directly has now been resolved. Watchers and partitioner properly import
  117. the KazooState from kazoo.protocol.states rather than kazoo.client.
  118. - Issue #109: Partials not usable properly as a datawatch call can now be
  119. used. All funcs will be called with 3 args and fall back to 2 args if
  120. there's an argument error.
  121. - Issue #106, #107: `client.create_async` didn't strip change root from the
  122. returned path.
  123. 1.2 (2013-07-24)
  124. ----------------
  125. Features
  126. ********
  127. - KazooClient can now be stopped more reliably even if its in the middle
  128. of a long retry sleep. This utilizes the new interrupt feature of
  129. KazooRetry which lets the sleep be broken down into chunks and an
  130. interrupt function called to determine if the retry should fail early.
  131. - Issue #62, #92, #89, #101, #102: Allow KazooRetry to have a
  132. max deadline, transition properly when connection fails to LOST, and
  133. setup separate connection retry behavior from client command retry
  134. behavior. Patches by Mike Lundy.
  135. - Issue #100: Make it easier to see exception context in threading and
  136. connection modules.
  137. - Issue #85: Increase information density of logs and don't prevent
  138. dynamic reconfiguration of log levels at runtime.
  139. - Data-watchers for the same node are no longer 'stacked'. That is, if
  140. a get and an exists call occur for the same node with the same watch
  141. function, then it will be registered only once. This change results in
  142. Kazoo behaving per Zookeeper client spec regarding repeat watch use.
  143. Bug Handling
  144. ************
  145. - Issue #53: Throw a warning upon starting if the chroot path doesn't exist
  146. so that it's more obvious when the chroot should be created before
  147. performing more operations.
  148. - Kazoo previously would let the same function be registered as a data-watch
  149. or child-watch multiple times, and then call it multiple times upon being
  150. triggered. This was non-compliant Zookeeper client behavior, the same
  151. watch can now only be registered once for the same znode path per Zookeeper
  152. client documentation.
  153. - Issue #105: Avoid rare import lock problems by moving module imports in
  154. client.py to the module scope.
  155. - Issue #103: Allow prefix-less sequential znodes.
  156. - Issue #98: Extend testing ZK harness to work with different file locations
  157. on some versions of Debian/Ubuntu.
  158. - Issue #97: Update some docstrings to reflect current state of handlers.
  159. - Issue #62, #92, #89, #101, #102: Allow KazooRetry to have a
  160. max deadline, transition properly when connection fails to LOST, and
  161. setup separate connection retry behavior from client command retry
  162. behavior. Patches by Mike Lundy.
  163. API Changes
  164. ***********
  165. - The `kazoo.testing.harness.KazooTestHarness` class directly inherits from
  166. `unittest.TestCase` and you need to ensure to call its `__init__` method.
  167. - DataWatch no longer takes any parameters besides for the optional function
  168. during instantiation. The additional options are now implicitly True, with
  169. the user being left to ignore events as they choose. See the DataWatch
  170. API docs for more information.
  171. - Issue #99: Better exception raised when the writer fails to close. A
  172. WriterNotClosedException that inherits from KazooException is now raised
  173. when the writer fails to close in time.
  174. 1.1 (2013-06-08)
  175. ----------------
  176. Features
  177. ********
  178. - Issue #93: Add timeout option to lock/semaphore acquire methods.
  179. - Issue #79 / #90: Add ability to pass the WatchedEvent to DataWatch and
  180. ChildWatch functions.
  181. - Respect large client timeout values when closing the connection.
  182. - Add a `max_leases` consistency check to the semaphore recipe.
  183. - Issue #76: Extend testing helpers to allow customization of the Java
  184. classpath by specifying the new `ZOOKEEPER_CLASSPATH` environment variable.
  185. - Issue #65: Allow non-blocking semaphore acquisition.
  186. Bug Handling
  187. ************
  188. - Issue #96: Provide Windows compatibility in testing harness.
  189. - Issue #95: Handle errors deserializing connection response.
  190. - Issue #94: Clean up stray bytes in connection pipe.
  191. - Issue #87 / #88: Allow re-acquiring lock after cancel.
  192. - Issue #77: Use timeout in initial socket connection.
  193. - Issue #69: Only ensure path once in lock and semaphore recipes.
  194. - Issue #68: Closing the connection causes exceptions to be raised by watchers
  195. which assume the connection won't be closed when running commands.
  196. - Issue #66: Require ping reply before sending another ping, otherwise the
  197. connection will be considered dead and a ConnectionDropped will be raised
  198. to trigger a reconnect.
  199. - Issue #63: Watchers weren't reset on lost connection.
  200. - Issue #58: DataWatcher failed to re-register for changes after non-existent
  201. node was created then deleted.
  202. API Changes
  203. ***********
  204. - KazooClient.create_async now supports the makepath argument.
  205. - KazooClient.ensure_path now has an async version, ensure_path_async.
  206. 1.0 (2013-03-26)
  207. ----------------
  208. Features
  209. ********
  210. - Added a LockingQueue recipe. The queue first locks an item and removes it
  211. from the queue only after the consume() method is called. This enables other
  212. nodes to retake the item if an error occurs on the first node.
  213. Bug Handling
  214. ************
  215. - Issue #50: Avoid problems with sleep function in mixed gevent/threading
  216. setup.
  217. - Issue #56: Avoid issues with watch callbacks evaluating to false.
  218. 1.0b1 (2013-02-24)
  219. ------------------
  220. Features
  221. ********
  222. - Refactored the internal connection handler to use a single thread. It now
  223. uses a deque and pipe to signal the ZK thread that there's a new command to
  224. send, so that the ZK thread can send it, or retrieve a response.
  225. Processing ZK requests and responses serially in a single thread eliminates
  226. the need for a bunch of the locking, the peekable queue and two threads
  227. working on the same underlying socket.
  228. - Issue #48: Added documentation for the `retry` helper module.
  229. - Issue #55: Fix `os.pipe` file descriptor leak and introduce a
  230. `KazooClient.close` method. The method is particular useful in tests, where
  231. multiple KazooClients are created and closed in the same process.
  232. Bug Handling
  233. ************
  234. - Issue #46: Avoid TypeError in GeneratorContextManager on process shutdown.
  235. - Issue #43: Let DataWatch return node data if allow_missing_node is used.
  236. 0.9 (2013-01-07)
  237. ----------------
  238. API Changes
  239. ***********
  240. - When a retry operation ultimately fails, it now raises a
  241. `kazoo.retry.RetryFailedError` exception, instead of a general `Exception`
  242. instance. `RetryFailedError` also inherits from the base `KazooException`.
  243. Features
  244. ********
  245. - Improvements to Debian packaging rules.
  246. Bug Handling
  247. ************
  248. - Issue #39 / #41: Handle connection dropped errors during session writes.
  249. Ensure client connection is re-established to a new ZK node if available.
  250. - Issue #38: Set `CLOEXEC` flag on all sockets when available.
  251. - Issue #37 / #40: Handle timeout errors during `select` calls on sockets.
  252. - Issue #36: Correctly set `ConnectionHandler.writer_stopped` even if an
  253. exception is raised inside the writer, like a retry operation failing.
  254. 0.8 (2012-10-26)
  255. ----------------
  256. API Changes
  257. ***********
  258. - The `KazooClient.__init__` took as `watcher` argument as its second keyword
  259. argument. The argument had no effect anymore since version 0.5 and was
  260. removed.
  261. Bug Handling
  262. ************
  263. - Issue #35: `KazooClient.__init__` didn't pass on `retry_max_delay` to the
  264. retry helper.
  265. - Issue #34: Be more careful while handling socket connection errors.
  266. 0.7 (2012-10-15)
  267. ----------------
  268. Features
  269. ********
  270. - DataWatch now has a `allow_missing_node` setting that allows a watch to be
  271. set on a node that doesn't exist when the DataWatch is created.
  272. - Add new Queue recipe, with optional priority support.
  273. - Add new Counter recipe.
  274. - Added debian packaging rules.
  275. Bug Handling
  276. ************
  277. - Issue #31 fixed: Only catch KazooExceptions in catch-all calls.
  278. - Issue #15 fixed again: Force sleep delay to be a float to appease gevent.
  279. - Issue #29 fixed: DataWatch and ChildrenWatch properly re-register their
  280. watches on server disconnect.
  281. 0.6 (2012-09-27)
  282. ----------------
  283. API Changes
  284. ***********
  285. - Node paths are assumed to be Unicode objects. Under Python 2 pure-ascii
  286. strings will also be accepted. Node values are considered bytes. The byte
  287. type is an alias for `str` under Python 2.
  288. - New KeeperState.CONNECTED_RO state for Zookeeper servers connected in
  289. read-only mode.
  290. - New NotReadOnlyCallError exception when issuing a write change against a
  291. server thats currently read-only.
  292. Features
  293. ********
  294. - Add support for Python 3.2, 3.3 and PyPy (only for the threading handler).
  295. - Handles connecting to Zookeeper 3.4+ read-only servers.
  296. - Automatic background scanning for a Read/Write server when connected to a
  297. server in read-only mode.
  298. - Add new Semaphore recipe.
  299. - Add a new `retry_max_delay` argument to the client and by default limit the
  300. retry delay to at most an hour regardless of exponential backoff settings.
  301. - Add new `randomize_hosts` argument to `KazooClient`, allowing one to disable
  302. host randomization.
  303. Bug Handling
  304. ************
  305. - Fix bug with locks not handling intermediary lock contenders disappearing.
  306. - Fix bug with set_data type check failing to catch unicode values.
  307. - Fix bug with gevent 0.13.x backport of peekable queue.
  308. - Fix PatientChildrenWatch to use handler specific sleep function.
  309. 0.5 (2012-09-06)
  310. ----------------
  311. Skipping a version to reflect the magnitude of the change. Kazoo is now a pure
  312. Python client with no C bindings. This release should run without a problem
  313. on alternate Python implementations such as PyPy and Jython. Porting to Python
  314. 3 in the future should also be much easier.
  315. Documentation
  316. *************
  317. - Docs have been restructured to handle the new classes and locations of the
  318. methods from the pure Python refactor.
  319. Bug Handling
  320. ************
  321. This change may introduce new bugs, however there is no longer the possibility
  322. of a complete Python segfault due to errors in the C library and/or the C
  323. binding.
  324. - Possible segfaults from the C lib are gone.
  325. - Password mangling due to the C lib is gone.
  326. - The party recipes didn't set their participating flag to False after
  327. leaving.
  328. Features
  329. ********
  330. - New `client.command` and `client.server_version` API, exposing Zookeeper's
  331. four letter commands and giving access to structured version information.
  332. - Added 'include_data' option for get_children to include the node's Stat
  333. object.
  334. - Substantial increase in logging data with debug mode. All correspondence with
  335. the Zookeeper server can now be seen to help in debugging.
  336. API Changes
  337. ***********
  338. - The testing helpers have been moved from `testing.__init__` into a
  339. `testing.harness` module. The official API's of `KazooTestCase` and
  340. `KazooTestHarness` can still be directly imported from `testing`.
  341. - The kazoo.handlers.util module was removed.
  342. - Backwards compatible exception class aliases are provided for now in kazoo
  343. exceptions for the prior C exception names.
  344. - Unicode strings now work fine for node names and are properly converted to
  345. and from unicode objects.
  346. - The data value argument for the create and create_async methods of the
  347. client was made optional and defaults to an empty byte string. The data
  348. value must be a byte string. Unicode values are no longer allowed and
  349. will raise a TypeError.
  350. 0.3 (2012-08-23)
  351. ----------------
  352. API Changes
  353. ***********
  354. - Handler interface now has an rlock_object for use by recipes.
  355. Bug Handling
  356. ************
  357. - Fixed password bug with updated zc-zookeeper-static release, which retains
  358. null bytes in the password properly.
  359. - Fixed reconnect hammering, so that the reconnection follows retry jitter and
  360. retry backoff's.
  361. - Fixed possible bug with using a threading.Condition in the set partitioner.
  362. Set partitioner uses new rlock_object handler API to get an appropriate RLock
  363. for gevent.
  364. - Issue #17 fixed: Wrap timeout exceptions with staticmethod so they can be
  365. used directly as intended. Patch by Bob Van Zant.
  366. - Fixed bug with client reconnection looping indefinitely using an expired
  367. session id.
  368. 0.2 (2012-08-12)
  369. ----------------
  370. Documentation
  371. *************
  372. - Fixed doc references to start_async using an AsyncResult object, it uses
  373. an Event object.
  374. Bug Handling
  375. ************
  376. - Issue #16 fixed: gevent zookeeper logging failed to handle a monkey patched
  377. logging setup. Logging is now setup such that a greenlet is used for logging
  378. messages under gevent, and the thread one is used otherwise.
  379. - Fixed bug similar to #14 for ChildrenWatch on the session listener.
  380. - Issue #14 fixed: DataWatch had inconsistent handling of the node it was
  381. watching not existing. DataWatch also properly spawns its _get_data function
  382. to avoid blocking session events.
  383. - Issue #15 fixed: sleep_func for SequentialGeventHandler was not set on the
  384. class appropriately leading to additional arguments being passed to
  385. gevent.sleep.
  386. - Issue #9 fixed: Threads/greenlets didn't gracefully shut down. Handler now
  387. has a start/stop that is used by the client when calling start and stop that
  388. shuts down the handler workers. This addresses errors and warnings that could
  389. be emitted upon process shutdown regarding a clean exit of the workers.
  390. - Issue #12 fixed: gevent 0.13 doesn't use the same start_new_thread as gevent
  391. 1.0 which resulted in a fully monkey-patched environment halting due to the
  392. wrong thread. Updated to use the older kazoo method of getting the real thread
  393. module object.
  394. API Changes
  395. ***********
  396. - The KazooClient handler is now officially exposed as KazooClient.handler
  397. so that the appropriate sync objects can be used by end-users.
  398. - Refactored ChildrenWatcher used by SetPartitioner into a publicly exposed
  399. PatientChildrenWatch under recipe.watchers.
  400. Deprecations
  401. ************
  402. - connect/connect_async has been renamed to start/start_async to better match
  403. the stop to indicate connection handling. The prior names are aliased for
  404. the time being.
  405. Recipes
  406. *******
  407. - Added Barrier and DoubleBarrier implementation.
  408. 0.2b1 (2012-07-27)
  409. ------------------
  410. Bug Handling
  411. ************
  412. - ZOOKEEPER-1318: SystemError is caught and rethrown as the proper invalid
  413. state exception in older zookeeper python bindings where this issue is still
  414. valid.
  415. - ZOOKEEPER-1431: Install the latest zc-zookeeper-static library or use the
  416. packaged ubuntu one for ubuntu 12.04 or later.
  417. - ZOOKEEPER-553: State handling isn't checked via this method, we track it in
  418. a simpler manner with the watcher to ensure we know the right state.
  419. Features
  420. ********
  421. - Exponential backoff with jitter for retrying commands.
  422. - Gevent 0.13 and 1.0b support.
  423. - Lock, Party, SetPartitioner, and Election recipe implementations.
  424. - Data and Children watching API's.
  425. - State transition handling with listener registering to handle session state
  426. changes (choose to fatal the app on session expiration, etc.)
  427. - Zookeeper logging stream redirected into Python logging channel under the
  428. name 'Zookeeper'.
  429. - Base client library with handler support for threading and gevent async
  430. environments.
  431. Keywords: zookeeper lock leader configuration
  432. Platform: UNKNOWN
  433. Classifier: Development Status :: 5 - Production/Stable
  434. Classifier: License :: OSI Approved :: Apache Software License
  435. Classifier: Intended Audience :: Developers
  436. Classifier: Operating System :: OS Independent
  437. Classifier: Programming Language :: Python
  438. Classifier: Programming Language :: Python :: 2
  439. Classifier: Programming Language :: Python :: 2.6
  440. Classifier: Programming Language :: Python :: 2.7
  441. Classifier: Programming Language :: Python :: 3
  442. Classifier: Programming Language :: Python :: 3.3
  443. Classifier: Programming Language :: Python :: 3.4
  444. Classifier: Programming Language :: Python :: Implementation :: CPython
  445. Classifier: Programming Language :: Python :: Implementation :: PyPy
  446. Classifier: Topic :: Communications
  447. Classifier: Topic :: System :: Distributed Computing
  448. Classifier: Topic :: System :: Networking