Commit Graph

12 Commits

Author SHA1 Message Date
Takashi Kajinami 9acbc53915 Deprecate zake driver because of unmaintained library
The zake library[1] was already archived a few years ago. It has had
no release for 7 years.

[1] https://github.com/yahoo/Zake
[2] https://pypi.org/project/zake/#history

Change-Id: I82d6cdeec2be4f69d325270f4cd74f2cafe9db55
2023-12-18 06:08:41 +00:00
Hervé Beraud 9c4f23a019 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I95809cf4035a6bc487b24f9e91aaa715921ad842
2020-06-02 21:02:18 +02:00
melissaml 96ce23ad12 Trivial: Update pypi url to new url
Pypi url changed from [1] to [2]

[1] https://pypi.python.org/pypi/<package>
[2] https://pypi.org/project/<package>

Change-Id: I8c515aa5662e020c76672a45555dfa6572267604
2018-04-21 05:07:07 +08:00
Julien Danjou 756d265232 Expose timeout capabilities and use them for tests
Change-Id: I5b6ee43e6a6b91859dacedb9791da74e247cd12b
2016-06-09 10:40:16 +02:00
Joshua Harlow a3f22fe90c Add programatic introspection of drivers characteristic(s)
Change-Id: Icf187db9ba7d076b1a0f3cc9343acb0eaa1862cb
2016-01-07 12:38:15 -08:00
Joshua Harlow cdac135a57 Provide and use a options collapsing function
Instead of having each driver index the last value of
each option, when all current drivers do not actually care
about any of the other indexes we can just use and provide
a option collapsing function that we by default apply to
all the existing drivers options (to avoid needing to index
by -1).

This avoids a confusion point for new folks, and one that
does not currently really provide any value (no driver in
tree besides one option in the redis driver uses/consumes
or understands multiple options in the first place).

Change-Id: Ia2898d84fd0e54871b829f4a95786a33accc20b8
2015-05-04 15:19:02 -07:00
Joshua Harlow 6569329e9b Beef up the docstrings on the various drivers
Change-Id: I1ca05629cc5f28c1248767bb18384a29801bece2
2015-04-08 12:35:07 -07:00
Joshua Harlow 60bf3af587 Allow coordinator non-string options and use them
To allow the zake driver to use a pre-existing storage
backend (for example, shared with a taskflow test that
also uses zake) we need a way to provide non-query-string
options and to get those options to the zake driver for
usage.

This approach allows the `get_coordinator` function
to take **kwargs and have those take precedence over
the options found with the same name in the urls query
string (and merge those together to form the coordinators
option dictionary that exists already).

Change-Id: Ibc745927eccac050992227410cca393d956f8c44
2015-02-12 18:11:02 -08:00
Joshua Harlow 84bb5fbef5 Change inline docs about class fake storage variable
Adjust the docs to better describe why a fake storage
class attribute exists and how it is used and what it
represents compared to a real zookeeper setup.

Change-Id: I255ccd83c8033266e9cee09a343468ae4e0f2bfd
2014-09-16 17:03:06 -07:00
Joshua Harlow ac6f7d93db Let zake act as a in-memory fully functional driver
The zake driver should theoretically function the same as the
non-local driver so all the same kazoo functions should work,
without the whole distributed part as they work with the regular
zookeeper backed kazoo driver.

Change-Id: I19df0da0e58c5624ca1b10f61c42510f1f104847
2014-09-15 16:38:11 -07:00
Julien Danjou 3981a3a300 Switch to a custom NotImplemented error
Some code in the drivers might actually raise the standard
NotImplemented error, and that would be a bug to skip a test if that was
the case. In that case we want the test to fail.

So let's switch to a custom exception that is used to skip the test if
it's raised.

Change-Id: Ideafee0b1f008ff32724fb98d6a477bd3976104d
2014-09-12 11:20:17 +02:00
Dina Belova faaeb41721 Move Zake driver code to separated Python module
That is needed to prevent Zake driver load in real-life Zookeeper
usage - currently we had the situation when even if you want to use
just KaZoo, you needed to install partially test-requierements
(zake package).

Change-Id: I9664fda2d6e76a6e48776b4a6d92af4c4baf1425
2014-09-05 11:13:03 -07:00