Hello community, here is the log from the commit of package python-tooz for openSUSE:Factory checked in at 2018-09-07 15:39:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tooz (Old) and /work/SRC/openSUSE:Factory/.python-tooz.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tooz" Fri Sep 7 15:39:38 2018 rev:7 rq:633123 version:1.62.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tooz/python-tooz.changes 2018-03-19 23:37:00.768308713 +0100 +++ /work/SRC/openSUSE:Factory/.python-tooz.new/python-tooz.changes 2018-09-07 15:39:38.938520368 +0200 @@ -1,0 +2,19 @@ +Mon Sep 3 18:03:21 UTC 2018 - [email protected] + +- update to version 1.62.0 + - set default python to python3 + - Use native Zuul v3 tox jobs + - Update reno for stable/queens + - Zuul: Remove project name + - Remove setting of version/release from releasenotes + - Trivial: Update pypi url to new url + - Add doc/requirements.txt + - Implement group support for etcd3gw + - Zuul: add file extension to playbook path + - Move legacy jobs to project + - partitioner: do not use hash() to determine object identity + - Follow the new PTI for document build + - msgpack-python has been renamed to msgpack + - Remove tox_install.sh + +------------------------------------------------------------------- Old: ---- tooz-1.60.0.tar.gz New: ---- tooz-1.62.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tooz.spec ++++++ --- /var/tmp/diff_new_pack.SkeO9W/_old 2018-09-07 15:39:39.378519896 +0200 +++ /var/tmp/diff_new_pack.SkeO9W/_new 2018-09-07 15:39:39.382519891 +0200 @@ -21,47 +21,47 @@ %global rdo 1 %endif Name: python-tooz -Version: 1.60.0 +Version: 1.62.0 Release: 0 Summary: Coordination library for distributed systems License: Apache-2.0 Group: Development/Languages/Python -Url: http://docs.openstack.org/developer/tooz/ +URL: https://docs.openstack.org/developer/tooz/ Source0: https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: memcached BuildRequires: openstack-macros BuildRequires: python-devel -BuildRequires: python-enum34 >= 1.0.4 -BuildRequires: python-fasteners >= 0.7.0 -BuildRequires: python-fixtures >= 3.0.0 -BuildRequires: python-futures >= 3.0.0 -BuildRequires: python-futurist >= 1.2.0 -BuildRequires: python-iso8601 >= 0.1.11 -BuildRequires: python-mock >= 2.0.0 -BuildRequires: python-oslo.serialization >= 2.18.0 -BuildRequires: python-oslo.utils >= 3.33.0 -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-pifpaf >= 0.10.0 -BuildRequires: python-pymemcache >= 1.2.9 -BuildRequires: python-setuptools >= 16.0 -BuildRequires: python-stevedore >= 1.20.0 +BuildRequires: python-enum34 +BuildRequires: python-fasteners >= 0.7 +BuildRequires: python-fixtures +BuildRequires: python-futures >= 3.0 +BuildRequires: python-futurist >= 0.11.0 +BuildRequires: python-iso8601 +BuildRequires: python-mock +BuildRequires: python-oslo.serialization >= 1.10.0 +BuildRequires: python-oslo.utils >= 3.15.0 +BuildRequires: python-pbr >= 1.6 +BuildRequires: python-pifpaf +BuildRequires: python-pymemcache +BuildRequires: python-setuptools +BuildRequires: python-stevedore >= 1.16.0 BuildRequires: python-tenacity >= 3.2.1 -BuildRequires: python-testtools >= 2.2.0 +BuildRequires: python-testtools BuildRequires: python-voluptuous >= 0.8.9 -Requires: python-Babel >= 2.3.4 -Requires: python-enum34 >= 1.0.4 -Requires: python-fasteners >= 0.7.0 -Requires: python-futures >= 3.0.0 -Requires: python-futurist >= 1.2.0 -Requires: python-iso8601 >= 0.1.11 +Requires: python-Babel +Requires: python-enum34 +Requires: python-fasteners >= 0.7 +Requires: python-futures >= 3.0 +Requires: python-futurist >= 0.11.0 +Requires: python-iso8601 Requires: python-msgpack >= 0.4.0 -Requires: python-oslo.serialization >= 2.18.0 -Requires: python-oslo.utils >= 3.33.0 -Requires: python-six >= 1.10.0 -Requires: python-stevedore >= 1.20.0 +Requires: python-oslo.serialization >= 1.10.0 +Requires: python-oslo.utils >= 3.15.0 +Requires: python-six >= 1.9.0 +Requires: python-stevedore >= 1.16.0 Requires: python-tenacity >= 3.2.1 Requires: python-voluptuous >= 0.8.9 -Requires: python-zake >= 0.1.6 +Requires: python-zake BuildArch: noarch %description @@ -73,8 +73,8 @@ Summary: Documentation for %{name} Group: Documentation/HTML BuildRequires: python-Sphinx -BuildRequires: python-openstackdocstheme >= 1.18.1 -BuildRequires: python-redis >= 2.10.0 +BuildRequires: python-openstackdocstheme +BuildRequires: python-redis %description doc The Tooz project aims at centralizing the most common distributed primitives @@ -94,7 +94,7 @@ # generate html docs %{__python2} setup.py build_sphinx # remove the Sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} +rm -rf build/sphinx/html/.{doctrees,buildinfo} %check %if ! 0%{?rdo} @@ -114,6 +114,6 @@ %files doc %license LICENSE -%doc doc/build/html +%doc build/sphinx/html %changelog ++++++ _service ++++++ --- /var/tmp/diff_new_pack.SkeO9W/_old 2018-09-07 15:39:39.414519857 +0200 +++ /var/tmp/diff_new_pack.SkeO9W/_new 2018-09-07 15:39:39.414519857 +0200 @@ -1,8 +1,8 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/queens/openstack/tooz/tooz.spec.j2</param> + <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/rocky/openstack/tooz/tooz.spec.j2</param> <param name="output-name">python-tooz.spec</param> - <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/queens/requirements.txt</param> + <param name="requirements">https://raw.githubusercontent.com/openstack/tooz/stable/rocky/requirements.txt</param> <param name="changelog-email">[email protected]</param> <param name="changelog-provider">gh,openstack,tooz</param> </service> ++++++ tooz-1.60.0.tar.gz -> tooz-1.62.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/AUTHORS new/tooz-1.62.0/AUTHORS --- old/tooz-1.60.0/AUTHORS 2018-02-15 21:07:03.000000000 +0100 +++ new/tooz-1.62.0/AUTHORS 2018-05-01 23:08:23.000000000 +0200 @@ -10,10 +10,13 @@ Dina Belova <[email protected]> Dirk Mueller <[email protected]> Doug Hellmann <[email protected]> +Duong Ha-Quang <[email protected]> Eoghan Glynn <[email protected]> Gary Kotton <[email protected]> Gorka Eguileor <[email protected]> +Hoang Trung Hieu <[email protected]> Imran Ansari <[email protected]> +James E. Blair <[email protected]> Jay Clark <[email protected]> Jay Pipes <[email protected]> Jeremy Stanley <[email protected]> @@ -35,7 +38,9 @@ OpenStack Release Bot <[email protected]> Robert Collins <[email protected]> Ronald Bradford <[email protected]> +Sean McGinnis <[email protected]> Sergey Lukjanov <[email protected]> +Thomas Herve <[email protected]> Tony Breeds <[email protected]> Victor Morales <[email protected]> Vilobh Meshram <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/ChangeLog new/tooz-1.62.0/ChangeLog --- old/tooz-1.60.0/ChangeLog 2018-02-15 21:07:03.000000000 +0100 +++ new/tooz-1.62.0/ChangeLog 2018-05-01 23:08:23.000000000 +0200 @@ -1,12 +1,28 @@ CHANGES ======= -1.60.0 +1.62.0 ------ +* Trivial: Update pypi url to new url +* set default python to python3 +* Implement group support for etcd3gw + +1.61.0 +------ + +* Zuul: Remove project name +* Zuul: Remove project name +* Update reno for stable/queens +* partitioner: do not use hash() to determine object identity * msgpack-python has been renamed to msgpack -* Update .gitreview for stable/queens +* Follow the new PTI for document build +* Remove tox\_install.sh * Use native Zuul v3 tox jobs +* Add doc/requirements.txt +* Remove setting of version/release from releasenotes +* Zuul: add file extension to playbook path +* Move legacy jobs to project 1.59.0 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/PKG-INFO new/tooz-1.62.0/PKG-INFO --- old/tooz-1.60.0/PKG-INFO 2018-02-15 21:07:04.000000000 +0100 +++ new/tooz-1.62.0/PKG-INFO 2018-05-01 23:08:24.000000000 +0200 @@ -1,21 +1,20 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: tooz -Version: 1.60.0 +Version: 1.62.0 Summary: Coordination library for distributed systems. Home-page: https://docs.openstack.org/tooz/latest/ Author: OpenStack Author-email: [email protected] License: Apache-2 -Description-Content-Type: UNKNOWN Description: Tooz ==== .. image:: https://img.shields.io/pypi/v/tooz.svg - :target: https://pypi.python.org/pypi/tooz/ + :target: https://pypi.org/project/tooz/ :alt: Latest Version .. image:: https://img.shields.io/pypi/dm/tooz.svg - :target: https://pypi.python.org/pypi/tooz/ + :target: https://pypi.org/project/tooz/ :alt: Downloads The Tooz project aims at centralizing the most common distributed primitives @@ -45,3 +44,16 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Topic :: System :: Distributed Computing +Provides-Extra: etcd +Provides-Extra: test +Provides-Extra: consul +Provides-Extra: etcd3 +Provides-Extra: zookeeper +Provides-Extra: memcached +Provides-Extra: ipc +Provides-Extra: redis +Provides-Extra: mysql +Provides-Extra: postgresql +Provides-Extra: zake +Provides-Extra: doc +Provides-Extra: etcd3gw diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/README.rst new/tooz-1.62.0/README.rst --- old/tooz-1.60.0/README.rst 2018-02-15 21:04:44.000000000 +0100 +++ new/tooz-1.62.0/README.rst 2018-05-01 23:06:08.000000000 +0200 @@ -2,11 +2,11 @@ ==== .. image:: https://img.shields.io/pypi/v/tooz.svg - :target: https://pypi.python.org/pypi/tooz/ + :target: https://pypi.org/project/tooz/ :alt: Latest Version .. image:: https://img.shields.io/pypi/dm/tooz.svg - :target: https://pypi.python.org/pypi/tooz/ + :target: https://pypi.org/project/tooz/ :alt: Downloads The Tooz project aims at centralizing the most common distributed primitives diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/RELEASENOTES.rst new/tooz-1.62.0/RELEASENOTES.rst --- old/tooz-1.60.0/RELEASENOTES.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-1.62.0/RELEASENOTES.rst 2018-05-01 23:08:24.000000000 +0200 @@ -0,0 +1,18 @@ +==== +tooz +==== + +.. _tooz_1.62.0: + +1.62.0 +====== + +.. _tooz_1.62.0_New Features: + +New Features +------------ + +.. releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml @ b'6ab8c380c8d6a2e15611b225da7594e820cc773e' + +- The etcd3gw driver now supports the group membership API. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml new/tooz-1.62.0/releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml --- old/tooz-1.60.0/releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-1.62.0/releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml 2018-05-01 23:06:08.000000000 +0200 @@ -0,0 +1,4 @@ +--- +features: + - | + The etcd3gw driver now supports the group membership API. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/releasenotes/notes/reno.cache new/tooz-1.62.0/releasenotes/notes/reno.cache --- old/tooz-1.60.0/releasenotes/notes/reno.cache 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-1.62.0/releasenotes/notes/reno.cache 2018-05-01 23:08:24.000000000 +0200 @@ -0,0 +1,12 @@ +--- +file-contents: + releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml: + features: ['The etcd3gw driver now supports the group membership API. + + '] +notes: +- files: + - - releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml + - !!binary | + NmFiOGMzODBjOGQ2YTJlMTU2MTFiMjI1ZGE3NTk0ZTgyMGNjNzczZQ== + version: 1.62.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/releasenotes/source/conf.py new/tooz-1.62.0/releasenotes/source/conf.py --- old/tooz-1.60.0/releasenotes/source/conf.py 2018-02-15 21:04:54.000000000 +0100 +++ new/tooz-1.62.0/releasenotes/source/conf.py 2018-05-01 23:06:08.000000000 +0200 @@ -60,16 +60,12 @@ project = u'tooz Release Notes' copyright = u'2016, tooz Developers' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. +# Release do not need a version number in the title, they +# cover multiple versions. # The full version, including alpha/beta/rc tags. -import pkg_resources -release = pkg_resources.get_distribution('tooz').version +release = '' # The short X.Y version. -version = release +version = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/releasenotes/source/index.rst new/tooz-1.62.0/releasenotes/source/index.rst --- old/tooz-1.60.0/releasenotes/source/index.rst 2018-02-15 21:04:54.000000000 +0100 +++ new/tooz-1.62.0/releasenotes/source/index.rst 2018-05-01 23:06:08.000000000 +0200 @@ -6,5 +6,6 @@ :maxdepth: 1 unreleased + queens pike ocata diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/releasenotes/source/queens.rst new/tooz-1.62.0/releasenotes/source/queens.rst --- old/tooz-1.60.0/releasenotes/source/queens.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-1.62.0/releasenotes/source/queens.rst 2018-05-01 23:06:08.000000000 +0200 @@ -0,0 +1,6 @@ +=================================== + Queens Series Release Notes +=================================== + +.. release-notes:: + :branch: stable/queens diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/setup.cfg new/tooz-1.62.0/setup.cfg --- old/tooz-1.60.0/setup.cfg 2018-02-15 21:07:04.000000000 +0100 +++ new/tooz-1.62.0/setup.cfg 2018-05-01 23:08:24.000000000 +0200 @@ -79,12 +79,6 @@ [wheel] universal = 1 -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = 1 - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tools/tox_install.sh new/tooz-1.62.0/tools/tox_install.sh --- old/tooz-1.60.0/tools/tox_install.sh 2018-02-15 21:04:54.000000000 +0100 +++ new/tooz-1.62.0/tools/tox_install.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -# Client constraint file contains this client version pin that is in conflict -# with installing the client from source. We should remove the version pin in -# the constraints file before applying it for from-source installation. - -CONSTRAINTS_FILE="$1" -shift 1 - -set -e - -# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get -# published to logs.openstack.org for easy debugging. -localfile="$VIRTUAL_ENV/log/upper-constraints.txt" - -if [[ "$CONSTRAINTS_FILE" != http* ]]; then - CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE" -fi -# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep -curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile" - -pip install -c"$localfile" openstack-requirements - -# This is the main purpose of the script: Allow local installation of -# the current repo. It is listed in constraints file and thus any -# install will be constrained and we need to unconstrain it. -edit-constraints "$localfile" -- "$CLIENT_NAME" - -pip install -c"$localfile" -U "$@" -exit $? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz/drivers/etcd3gw.py new/tooz-1.62.0/tooz/drivers/etcd3gw.py --- old/tooz-1.60.0/tooz/drivers/etcd3gw.py 2018-02-15 21:04:44.000000000 +0100 +++ new/tooz-1.62.0/tooz/drivers/etcd3gw.py 2018-05-01 23:06:08.000000000 +0200 @@ -29,6 +29,11 @@ from tooz import utils +def _encode(data): + """Safely encode data for consumption of the gateway.""" + return base64.b64encode(data).decode("ascii") + + def _translate_failures(func): """Translates common requests exceptions into tooz exceptions.""" @@ -66,8 +71,8 @@ self._timeout = timeout self._coord = coord self._key = self.LOCK_PREFIX + name - self._key_b64 = base64.b64encode(self._key).decode("ascii") - self._uuid = base64.b64encode(uuid.uuid4().bytes).decode("ascii") + self._key_b64 = _encode(self._key) + self._uuid = _encode(uuid.uuid4().bytes) self._exclusive_access = threading.Lock() @_translate_failures @@ -156,7 +161,7 @@ return False -class Etcd3Driver(coordination.CoordinationDriver): +class Etcd3Driver(coordination.CoordinationDriverWithExecutor): """An etcd based driver. This driver uses etcd provide the coordination driver semantics and @@ -172,6 +177,8 @@ #: Default port used if none provided (4001 or 2379 are the common ones). DEFAULT_PORT = 2379 + GROUP_PREFIX = b"tooz/groups/" + def __init__(self, member_id, parsed_url, options): super(Etcd3Driver, self).__init__(member_id, parsed_url, options) host = parsed_url.hostname or self.DEFAULT_HOST @@ -180,8 +187,14 @@ timeout = int(options.get('timeout', self.DEFAULT_TIMEOUT)) self.client = etcd3gw.client(host=host, port=port, timeout=timeout) self.lock_timeout = int(options.get('lock_timeout', timeout)) + self.membership_timeout = int(options.get( + 'membership_timeout', timeout)) self._acquired_locks = set() + def _start(self): + super(Etcd3Driver, self)._start() + self._membership_lease = self.client.lease(self.membership_timeout) + def get_lock(self, name): return Etcd3Lock(self, name, self.lock_timeout) @@ -202,3 +215,193 @@ def unwatch_leave_group(self, group_id, callback): raise tooz.NotImplemented + + def _encode_group_id(self, group_id): + return _encode(self._prefix_group(group_id)) + + def _prefix_group(self, group_id): + return b"%s%s/" % (self.GROUP_PREFIX, group_id) + + def create_group(self, group_id): + @_translate_failures + def _create_group(): + encoded_group = self._encode_group_id(group_id) + txn = { + 'compare': [{ + 'key': encoded_group, + 'result': 'EQUAL', + 'target': 'VERSION', + 'version': 0 + }], + 'success': [{ + 'request_put': { + 'key': encoded_group, + # We shouldn't need a value, but etcd3gw needs it for + # now + 'value': encoded_group + } + }], + 'failure': [] + } + result = self.client.transaction(txn) + if not result.get("succeeded"): + raise coordination.GroupAlreadyExist(group_id) + + return coordination.CoordinatorResult( + self._executor.submit(_create_group)) + + def _destroy_group(self, group_id): + self.client.delete(group_id) + + def delete_group(self, group_id): + @_translate_failures + def _delete_group(): + prefix_group = self._prefix_group(group_id) + members = self.client.get_prefix(prefix_group) + if len(members) > 1: + raise coordination.GroupNotEmpty(group_id) + + encoded_group = self._encode_group_id(group_id) + txn = { + 'compare': [{ + 'key': encoded_group, + 'result': 'NOT_EQUAL', + 'target': 'VERSION', + 'version': 0 + }], + 'success': [{ + 'request_delete_range': { + 'key': encoded_group, + } + }], + 'failure': [] + } + result = self.client.transaction(txn) + + if not result.get("succeeded"): + raise coordination.GroupNotCreated(group_id) + + return coordination.CoordinatorResult( + self._executor.submit(_delete_group)) + + def join_group(self, group_id, capabilities=b""): + @_retry.retry() + @_translate_failures + def _join_group(): + prefix_group = self._prefix_group(group_id) + prefix_member = prefix_group + self._member_id + members = self.client.get_prefix(prefix_group) + + encoded_member = _encode(prefix_member) + + group_metadata = None + for cap, metadata in members: + if metadata['key'] == prefix_member: + raise coordination.MemberAlreadyExist(group_id, + self._member_id) + if metadata['key'] == prefix_group: + group_metadata = metadata + + if group_metadata is None: + raise coordination.GroupNotCreated(group_id) + + encoded_group = self._encode_group_id(group_id) + txn = { + 'compare': [{ + 'key': encoded_group, + 'result': 'EQUAL', + 'target': 'VERSION', + 'version': int(group_metadata['version']) + }], + 'success': [{ + 'request_put': { + 'key': encoded_member, + 'value': _encode(utils.dumps(capabilities)), + 'lease': self._membership_lease.id + } + }], + 'failure': [] + } + result = self.client.transaction(txn) + if not result.get('succeeded'): + raise _retry.TryAgain + else: + self._joined_groups.add(group_id) + + return coordination.CoordinatorResult( + self._executor.submit(_join_group)) + + def leave_group(self, group_id): + @_translate_failures + def _leave_group(): + prefix_group = self._prefix_group(group_id) + prefix_member = prefix_group + self._member_id + members = self.client.get_prefix(prefix_group) + for capabilities, metadata in members: + if metadata['key'] == prefix_member: + break + else: + raise coordination.MemberNotJoined(group_id, + self._member_id) + + self.client.delete(prefix_member) + self._joined_groups.discard(group_id) + + return coordination.CoordinatorResult( + self._executor.submit(_leave_group)) + + def get_members(self, group_id): + @_translate_failures + def _get_members(): + prefix_group = self._prefix_group(group_id) + members = set() + group_found = False + + for cap, metadata in self.client.get_prefix(prefix_group): + if metadata['key'] == prefix_group: + group_found = True + else: + members.add(metadata['key'][len(prefix_group):]) + + if not group_found: + raise coordination.GroupNotCreated(group_id) + + return members + + return coordination.CoordinatorResult( + self._executor.submit(_get_members)) + + def get_member_capabilities(self, group_id, member_id): + @_translate_failures + def _get_member_capabilities(): + prefix_member = self._prefix_group(group_id) + member_id + result = self.client.get(prefix_member) + if not result: + raise coordination.MemberNotJoined(group_id, member_id) + return utils.loads(result[0]) + + return coordination.CoordinatorResult( + self._executor.submit(_get_member_capabilities)) + + def update_capabilities(self, group_id, capabilities): + @_translate_failures + def _update_capabilities(): + prefix_member = self._prefix_group(group_id) + self._member_id + result = self.client.get(prefix_member) + if not result: + raise coordination.MemberNotJoined(group_id, self._member_id) + + self.client.put(prefix_member, utils.dumps(capabilities), + lease=self._membership_lease) + + return coordination.CoordinatorResult( + self._executor.submit(_update_capabilities)) + + def get_groups(self): + @_translate_failures + def _get_groups(): + groups = self.client.get_prefix(self.GROUP_PREFIX) + return [ + group[1]['key'][len(self.GROUP_PREFIX):-1] for group in groups] + return coordination.CoordinatorResult( + self._executor.submit(_get_groups)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz/drivers/zake.py new/tooz-1.62.0/tooz/drivers/zake.py --- old/tooz-1.60.0/tooz/drivers/zake.py 2018-02-15 21:04:44.000000000 +0100 +++ new/tooz-1.62.0/tooz/drivers/zake.py 2018-05-01 23:06:08.000000000 +0200 @@ -28,7 +28,7 @@ this manner) for testing and integration (where real `zookeeper`_ servers are typically not available). - .. _zake: https://pypi.python.org/pypi/zake + .. _zake: https://pypi.org/project/zake .. _zookeeper: http://zookeeper.apache.org/ """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz/partitioner.py new/tooz-1.62.0/tooz/partitioner.py --- old/tooz-1.60.0/tooz/partitioner.py 2018-02-15 21:04:54.000000000 +0100 +++ new/tooz-1.62.0/tooz/partitioner.py 2018-05-01 23:06:08.000000000 +0200 @@ -53,7 +53,7 @@ def _hash_object(obj): if hasattr(obj, "__tooz_hash__"): return obj.__tooz_hash__() - return str(hash(obj)).encode('ascii') + return str(obj).encode() def members_for_object(self, obj, ignore_members=None, replicas=1): """Return the members responsible for an object. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz.egg-info/PKG-INFO new/tooz-1.62.0/tooz.egg-info/PKG-INFO --- old/tooz-1.60.0/tooz.egg-info/PKG-INFO 2018-02-15 21:07:03.000000000 +0100 +++ new/tooz-1.62.0/tooz.egg-info/PKG-INFO 2018-05-01 23:08:23.000000000 +0200 @@ -1,21 +1,20 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: tooz -Version: 1.60.0 +Version: 1.62.0 Summary: Coordination library for distributed systems. Home-page: https://docs.openstack.org/tooz/latest/ Author: OpenStack Author-email: [email protected] License: Apache-2 -Description-Content-Type: UNKNOWN Description: Tooz ==== .. image:: https://img.shields.io/pypi/v/tooz.svg - :target: https://pypi.python.org/pypi/tooz/ + :target: https://pypi.org/project/tooz/ :alt: Latest Version .. image:: https://img.shields.io/pypi/dm/tooz.svg - :target: https://pypi.python.org/pypi/tooz/ + :target: https://pypi.org/project/tooz/ :alt: Downloads The Tooz project aims at centralizing the most common distributed primitives @@ -45,3 +44,16 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Topic :: System :: Distributed Computing +Provides-Extra: etcd +Provides-Extra: test +Provides-Extra: consul +Provides-Extra: etcd3 +Provides-Extra: zookeeper +Provides-Extra: memcached +Provides-Extra: ipc +Provides-Extra: redis +Provides-Extra: mysql +Provides-Extra: postgresql +Provides-Extra: zake +Provides-Extra: doc +Provides-Extra: etcd3gw diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz.egg-info/SOURCES.txt new/tooz-1.62.0/tooz.egg-info/SOURCES.txt --- old/tooz-1.60.0/tooz.egg-info/SOURCES.txt 2018-02-15 21:07:04.000000000 +0100 +++ new/tooz-1.62.0/tooz.egg-info/SOURCES.txt 2018-05-01 23:08:23.000000000 +0200 @@ -41,6 +41,7 @@ examples/partitioner.py releasenotes/notes/add-reno-996dd44974d53238.yaml releasenotes/notes/etcd3-group-support-b039cf19f4a268a3.yaml +releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml releasenotes/notes/hashring-0470f9119ef63d49.yaml releasenotes/notes/join_group_create-5095ec02e20c7242.yaml releasenotes/notes/partitioner-4005767d287dc7c9.yaml @@ -48,12 +49,12 @@ releasenotes/source/index.rst releasenotes/source/ocata.rst releasenotes/source/pike.rst +releasenotes/source/queens.rst releasenotes/source/unreleased.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder tools/compat-matrix.py tools/pretty_tox.sh -tools/tox_install.sh tooz/__init__.py tooz/_retry.py tooz/coordination.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz.egg-info/pbr.json new/tooz-1.62.0/tooz.egg-info/pbr.json --- old/tooz-1.60.0/tooz.egg-info/pbr.json 2018-02-15 21:07:03.000000000 +0100 +++ new/tooz-1.62.0/tooz.egg-info/pbr.json 2018-05-01 23:08:23.000000000 +0200 @@ -1 +1 @@ -{"git_version": "4fd0c8a", "is_release": true} \ No newline at end of file +{"git_version": "2ac3ef3", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tooz.egg-info/requires.txt new/tooz-1.62.0/tooz.egg-info/requires.txt --- old/tooz-1.60.0/tooz.egg-info/requires.txt 2018-02-15 21:07:03.000000000 +0100 +++ new/tooz-1.62.0/tooz.egg-info/requires.txt 2018-05-01 23:08:23.000000000 +0200 @@ -1,16 +1,20 @@ pbr>=1.6 stevedore>=1.16.0 six>=1.9.0 -enum34 voluptuous>=0.8.9 msgpack>=0.4.0 fasteners>=0.7 tenacity>=3.2.1 -futures>=3.0 futurist!=0.15.0,>=0.11.0 oslo.utils>=3.15.0 oslo.serialization>=1.10.0 +[:(python_version=='2.7' or python_version=='2.6' or python_version=='3.3')] +enum34 + +[:(python_version=='2.7' or python_version=='2.6')] +futures>=3.0 + [consul] python-consul>=0.4.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-1.60.0/tox.ini new/tooz-1.62.0/tox.ini --- old/tooz-1.60.0/tox.ini 2018-02-15 21:04:44.000000000 +0100 +++ new/tooz-1.62.0/tox.ini 2018-05-01 23:06:08.000000000 +0200 @@ -3,6 +3,7 @@ envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8 [testenv] +basepython = python3 # We need to install a bit more than just `test' because those drivers have # custom tests that we always run deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw] @@ -35,6 +36,9 @@ {toxinidir}/run-tests.sh {toxinidir}/tools/pretty_tox.sh "{posargs}" {toxinidir}/run-examples.sh +[testenv:py27] +basepython = python2.7 + [testenv:venv] # This target is used by the gate go run Sphinx to build the doc deps = {[testenv:docs]deps} @@ -45,7 +49,7 @@ [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt -commands = python setup.py build_sphinx +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pep8] deps = hacking<0.13,>=0.12
