Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-tooz for openSUSE:Factory checked in at 2024-01-04 15:59:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tooz (Old) and /work/SRC/openSUSE:Factory/.python-tooz.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tooz" Thu Jan 4 15:59:18 2024 rev:16 rq:1136722 version:4.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tooz/python-tooz.changes 2022-08-11 18:31:55.650206811 +0200 +++ /work/SRC/openSUSE:Factory/.python-tooz.new.28375/python-tooz.changes 2024-01-04 16:01:23.521274257 +0100 @@ -1,0 +2,21 @@ +Thu Jan 4 09:04:25 UTC 2024 - [email protected] + +- update to version 4.2.0 + - Cap protobuf < 4.x + - Loosen protobuf version that's used for docs/renos + - tox: set allowlist_externals + - [etcd3gw] create new lease if expired. + - Drop python3.6/3.7 support in testing runtime + - Fix mysql timeout + - Allow to pass ssl-related args for zookeeper + - Add TLS support for MySQL driver + - Support etcd3gw api version + - Revert "Moves supported python runtimes from version 3.8 to 3.10" + - remove unicode from code + - Fix: Add timeout for mysql driver + - Moves supported python runtimes from version 3.8 to 3.10 + - Enable watch functionality for Etcd3Driver + - Fix inappropriate logic in memcachedlock.release() + - Add grouping support in etcd to compatibility matrix. + +------------------------------------------------------------------- Old: ---- tooz-2.11.1.tar.gz New: ---- tooz-4.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tooz.spec ++++++ --- /var/tmp/diff_new_pack.PEHlBO/_old 2024-01-04 16:01:23.993291500 +0100 +++ /var/tmp/diff_new_pack.PEHlBO/_new 2024-01-04 16:01:23.993291500 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-tooz # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,13 +20,13 @@ %global rdo 1 %endif Name: python-tooz -Version: 2.11.1 +Version: 4.2.0 Release: 0 Summary: Coordination library for distributed systems License: Apache-2.0 Group: Development/Languages/Python URL: https://docs.openstack.org/tooz/latest/ -Source0: https://files.pythonhosted.org/packages/source/t/tooz/tooz-2.11.1.tar.gz +Source0: https://files.pythonhosted.org/packages/source/t/tooz/tooz-4.2.0.tar.gz BuildRequires: memcached BuildRequires: openstack-macros BuildRequires: python3-fasteners >= 0.7 @@ -82,7 +82,7 @@ This package contains documentation in HTML format. %prep -%autosetup -p1 -n tooz-2.11.1 +%autosetup -p1 -n tooz-4.2.0 %py_req_cleanup %build ++++++ _service ++++++ --- /var/tmp/diff_new_pack.PEHlBO/_old 2024-01-04 16:01:24.021292523 +0100 +++ /var/tmp/diff_new_pack.PEHlBO/_new 2024-01-04 16:01:24.021292523 +0100 @@ -1,14 +1,14 @@ <services> - <service mode="disabled" name="renderspec"> + <service mode="manual" name="renderspec"> <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/master/openstack/tooz/tooz.spec.j2</param> <param name="output-name">python-tooz.spec</param> <param name="requirements">https://opendev.org/openstack/tooz/raw/master/requirements.txt</param> <param name="changelog-email">[email protected]</param> <param name="changelog-provider">gh,openstack,tooz</param> </service> - <service mode="disabled" name="download_files"> + <service mode="manual" name="download_files"> <param name="changesgenerate">enable</param> </service> - <service name="format_spec_file" mode="disabled"/> + <service name="format_spec_file" mode="manual"/> </services> ++++++ tooz-2.11.1.tar.gz -> tooz-4.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/.zuul.yaml new/tooz-4.2.0/.zuul.yaml --- old/tooz-2.11.1/.zuul.yaml 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/.zuul.yaml 2023-07-26 14:02:28.000000000 +0200 @@ -9,43 +9,43 @@ check: jobs: - tooz-tox-py38-etcd - - tooz-tox-py36-etcd + - tooz-tox-py310-etcd - tooz-tox-py38-etcd3gw - - tooz-tox-py36-etcd3gw + - tooz-tox-py310-etcd3gw - tooz-tox-py38-zookeeper - - tooz-tox-py36-zookeeper + - tooz-tox-py310-zookeeper - tooz-tox-py38-redis - - tooz-tox-py36-redis + - tooz-tox-py310-redis - tooz-tox-py38-sentinel - - tooz-tox-py36-sentinel + - tooz-tox-py310-sentinel - tooz-tox-py38-memcached - - tooz-tox-py36-memcached + - tooz-tox-py310-memcached - tooz-tox-py38-postgresql - - tooz-tox-py36-postgresql + - tooz-tox-py310-postgresql - tooz-tox-py38-mysql - - tooz-tox-py36-mysql + - tooz-tox-py310-mysql - tooz-tox-py38-consul - - tooz-tox-py36-consul + - tooz-tox-py310-consul gate: jobs: - tooz-tox-py38-etcd - - tooz-tox-py36-etcd + - tooz-tox-py310-etcd - tooz-tox-py38-etcd3gw - - tooz-tox-py36-etcd3gw + - tooz-tox-py310-etcd3gw - tooz-tox-py38-zookeeper - - tooz-tox-py36-zookeeper + - tooz-tox-py310-zookeeper - tooz-tox-py38-redis - - tooz-tox-py36-redis + - tooz-tox-py310-redis - tooz-tox-py38-sentinel - - tooz-tox-py36-sentinel + - tooz-tox-py310-sentinel - tooz-tox-py38-memcached - - tooz-tox-py36-memcached + - tooz-tox-py310-memcached - tooz-tox-py38-postgresql - - tooz-tox-py36-postgresql + - tooz-tox-py310-postgresql - tooz-tox-py38-mysql - - tooz-tox-py36-mysql + - tooz-tox-py310-mysql - tooz-tox-py38-consul - - tooz-tox-py36-consul + - tooz-tox-py310-consul - job: name: tooz-tox-py38-consul @@ -124,77 +124,77 @@ tox_envlist: py38-zookeeper - job: - name: tooz-tox-py36-consul - parent: openstack-tox-py36 + name: tooz-tox-py310-consul + parent: openstack-tox-py310 description: | - Run tests using ``py36-consul`` environment. + Run tests using ``py310-consul`` environment. vars: - tox_envlist: py36-consul + tox_envlist: py310-consul - job: - name: tooz-tox-py36-etcd - parent: openstack-tox-py36 + name: tooz-tox-py310-etcd + parent: openstack-tox-py310 description: | - Run tests using ``py36-etcd`` environment. + Run tests using ``py310-etcd`` environment. vars: - tox_envlist: py36-etcd + tox_envlist: py310-etcd - job: - name: tooz-tox-py36-etcd3gw - parent: openstack-tox-py36 + name: tooz-tox-py310-etcd3gw + parent: openstack-tox-py310 description: | - Run tests using ``py36-etcd3gw`` environment. + Run tests using ``py310-etcd3gw`` environment. vars: - tox_envlist: py36-etcd3gw + tox_envlist: py310-etcd3gw - job: - name: tooz-tox-py36-memcached - parent: openstack-tox-py36 + name: tooz-tox-py310-memcached + parent: openstack-tox-py310 description: | - Run tests using ``py36-memcached`` environment. + Run tests using ``py310-memcached`` environment. vars: - tox_envlist: py36-memcached + tox_envlist: py310-memcached - job: - name: tooz-tox-py36-mysql - parent: openstack-tox-py36 + name: tooz-tox-py310-mysql + parent: openstack-tox-py310 description: | - Run tests using ``py36-mysql`` environment. + Run tests using ``py310-mysql`` environment. vars: - tox_envlist: py36-mysql + tox_envlist: py310-mysql - job: - name: tooz-tox-py36-postgresql - parent: openstack-tox-py36 + name: tooz-tox-py310-postgresql + parent: openstack-tox-py310 description: | - Run tests using ``py36-postgresql`` environment. + Run tests using ``py310-postgresql`` environment. vars: - tox_envlist: py36-postgresql + tox_envlist: py310-postgresql - job: - name: tooz-tox-py36-redis - parent: openstack-tox-py36 + name: tooz-tox-py310-redis + parent: openstack-tox-py310 description: | - Run tests using ``py36-redis`` environment. + Run tests using ``py310-redis`` environment. vars: - tox_envlist: py36-redis + tox_envlist: py310-redis pre-run: - playbooks/stop-redis.yaml - job: - name: tooz-tox-py36-sentinel - parent: openstack-tox-py36 + name: tooz-tox-py310-sentinel + parent: openstack-tox-py310 description: | - Run tests using ``py36-sentinel`` environment. + Run tests using ``py310-sentinel`` environment. vars: - tox_envlist: py36-sentinel + tox_envlist: py310-sentinel pre-run: - playbooks/stop-redis.yaml - job: - name: tooz-tox-py36-zookeeper - parent: openstack-tox-py36 + name: tooz-tox-py310-zookeeper + parent: openstack-tox-py310 description: | - Run tests using ``py36-zookeeper`` environment. + Run tests using ``py310-zookeeper`` environment. vars: - tox_envlist: py36-zookeeper + tox_envlist: py310-zookeeper diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/AUTHORS new/tooz-4.2.0/AUTHORS --- old/tooz-2.11.1/AUTHORS 2022-05-05 11:53:30.000000000 +0200 +++ new/tooz-4.2.0/AUTHORS 2023-07-26 14:02:54.000000000 +0200 @@ -10,6 +10,7 @@ Cao Xuan Hoang <[email protected]> ChangBo Guo(gcb) <[email protected]> Chris Dent <[email protected]> +Christian Rohmann <[email protected]> Corey Bryant <[email protected]> Daniel Bengtsson <[email protected]> Davanum Srinivas <[email protected]> @@ -17,6 +18,7 @@ Dina Belova <[email protected]> Dirk Mueller <[email protected]> Dmitriy Rabotjagov <[email protected]> +Dmitriy Rabotyagov <[email protected]> Dmitriy Rabotyagov <[email protected]> Dmitry Tantsur <[email protected]> Doug Hellmann <[email protected]> @@ -25,6 +27,7 @@ Elod Illes <[email protected]> Eoghan Glynn <[email protected]> Gary Kotton <[email protected]> +Ghanshyam <[email protected]> Ghanshyam Mann <[email protected]> Gorka Eguileor <[email protected]> Hervé Beraud <[email protected]> @@ -52,6 +55,7 @@ Mehdi Abaakouk <[email protected]> Mehdi Abaakouk <[email protected]> Mehdi Abaakouk <[email protected]> +Mitya_Eremeev <[email protected]> Monty Taylor <[email protected]> Nick Maludy <[email protected]> OpenStack Release Bot <[email protected]> @@ -64,6 +68,7 @@ Sean McGinnis <[email protected]> Sergey Lukjanov <[email protected]> Stephen Finucane <[email protected]> +Takashi Kajinami <[email protected]> Thomas Bechtold <[email protected]> Thomas Herve <[email protected]> Tobias Urdin <[email protected]> @@ -79,6 +84,7 @@ gord chung <[email protected]> gordon chung <[email protected]> howardlee <[email protected]> +jiaqi07 <[email protected]> lahoucine BENLAHMR <[email protected]> liu-sheng <[email protected]> maaoyu <[email protected]> @@ -86,9 +92,11 @@ manchandavishal <[email protected]> melissaml <[email protected]> mengalong <[email protected]> +ricolin <[email protected]> ushen <[email protected]> yangyawei <[email protected]> yenai <[email protected]> zhangguoqing <[email protected]> zhangsong <[email protected]> zhangyanxian <[email protected]> +zhen <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/ChangeLog new/tooz-4.2.0/ChangeLog --- old/tooz-2.11.1/ChangeLog 2022-05-05 11:53:30.000000000 +0200 +++ new/tooz-4.2.0/ChangeLog 2023-07-26 14:02:54.000000000 +0200 @@ -1,6 +1,45 @@ CHANGES ======= +4.2.0 +----- + +* Fix: Add timeout for mysql driver + +4.1.0 +----- + +* Revert "Moves supported python runtimes from version 3.8 to 3.10" + +4.0.0 +----- + +* Fix mysql timeout +* Moves supported python runtimes from version 3.8 to 3.10 +* tox: set allowlist\_externals +* Allow to pass ssl-related args for zookeeper +* Loosen protobuf version that's used for docs/renos +* Add grouping support in etcd to compatibility matrix + +3.2.0 +----- + + +3.1.0 +----- + +* Support etcd3gw api version +* remove unicode from code + +3.0.0 +----- + +* Cap protobuf < 4.x +* Fix inappropriate logic in memcachedlock.release() +* [etcd3gw] create new lease if expired +* Drop python3.6/3.7 support in testing runtime +* Enable watch functionality for Etcd3Driver + 2.11.1 ------ @@ -18,6 +57,7 @@ ------ * Fix docstring for get\_members() +* Add TLS support for MySQL driver 2.10.0 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/PKG-INFO new/tooz-4.2.0/PKG-INFO --- old/tooz-2.11.1/PKG-INFO 2022-05-05 11:53:30.812252500 +0200 +++ new/tooz-4.2.0/PKG-INFO 2023-07-26 14:02:55.045489000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: tooz -Version: 2.11.1 +Version: 4.2.0 Summary: Coordination library for distributed systems. Home-page: https://docs.openstack.org/tooz/latest/ Author: OpenStack @@ -41,13 +41,13 @@ Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Topic :: System :: Distributed Computing -Requires-Python: >=3.6 +Requires-Python: >=3.8 Provides-Extra: consul Provides-Extra: etcd Provides-Extra: etcd3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/doc/requirements.txt new/tooz-4.2.0/doc/requirements.txt --- old/tooz-2.11.1/doc/requirements.txt 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/doc/requirements.txt 2023-07-26 14:02:28.000000000 +0200 @@ -3,12 +3,27 @@ reno>=3.1.0 # Apache-2.0 # Install dependencies for tooz so that autodoc works. -python-consul>=0.4.7 # MIT License -sysv-ipc>=0.6.8 # BSD License +## consul +python-consul2>=0.0.16 # MIT License +## etcd +requests>=2.10.0 # Apache-2.0 +## etcd3 +etcd3>=0.12.0 # Apache-2.0 +grpcio>=1.18.0 +protobuf # BSD License (3 clause) +## etcd3gw +etcd3gw!=0.2.6,>=0.1.0 # Apache-2.0 +## zake zake>=0.1.6 # Apache-2.0 -redis>=2.10.0 # MIT +## redis +redis>=3.1.0 # MIT +## postgresql psycopg2>=2.5 # LGPL/ZPL +## mysql PyMySQL>=0.6.2 # MIT License +## zookeeper +kazoo>=2.2 # Apache-2.0 +## memcached pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License -etcd3>=0.6.2 # Apache-2.0 -etcd3gw>=0.1.0 # Apache-2.0 +## ipc +sysv-ipc>=0.6.8 # BSD License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/doc/source/conf.py new/tooz-4.2.0/doc/source/conf.py --- old/tooz-2.11.1/doc/source/conf.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/doc/source/conf.py 2023-07-26 14:02:28.000000000 +0200 @@ -57,8 +57,8 @@ master_doc = 'index' # General information about the project. -project = u'tooz' -copyright = u'%s, OpenStack Foundation' % datetime.date.today().year +project = 'tooz' +copyright = '%s, OpenStack Foundation' % datetime.date.today().year # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -88,8 +88,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'tooz', u'tooz Documentation', - u'OpenStack Foundation', 'tooz', 'One line description of project.', + ('index', 'tooz', 'tooz Documentation', + 'OpenStack Foundation', 'tooz', 'One line description of project.', 'Miscellaneous'), ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/doc/source/user/compatibility.rst new/tooz-4.2.0/doc/source/user/compatibility.rst --- old/tooz-2.11.1/doc/source/user/compatibility.rst 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/doc/source/user/compatibility.rst 2023-07-26 14:02:28.000000000 +0200 @@ -32,7 +32,7 @@ * - :py:class:`~tooz.drivers.consul.ConsulDriver` - Yes * - :py:class:`~tooz.drivers.etcd.EtcdDriver` - - No + - Yes * - :py:class:`~tooz.drivers.file.FileDriver` - Yes * - :py:class:`~tooz.drivers.ipc.IPCDriver` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/releasenotes/notes/etcd3gw_create_new_lease_if_expired_during_refresh-1d631d36c21ea28c.yaml new/tooz-4.2.0/releasenotes/notes/etcd3gw_create_new_lease_if_expired_during_refresh-1d631d36c21ea28c.yaml --- old/tooz-2.11.1/releasenotes/notes/etcd3gw_create_new_lease_if_expired_during_refresh-1d631d36c21ea28c.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-4.2.0/releasenotes/notes/etcd3gw_create_new_lease_if_expired_during_refresh-1d631d36c21ea28c.yaml 2023-07-26 14:02:28.000000000 +0200 @@ -0,0 +1,7 @@ +--- +fixes: + - | + [etcd3gw] Membership lease can be already expired to the moment of lease + refreshing. In this case heartbeat will try to refresh expired lease + forever without success. The patch checks if lease is expired and creates + new one. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/releasenotes/notes/memcached-fix-lock-release-I6fc33b8e0a88510.yaml new/tooz-4.2.0/releasenotes/notes/memcached-fix-lock-release-I6fc33b8e0a88510.yaml --- old/tooz-2.11.1/releasenotes/notes/memcached-fix-lock-release-I6fc33b8e0a88510.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-4.2.0/releasenotes/notes/memcached-fix-lock-release-I6fc33b8e0a88510.yaml 2023-07-26 14:02:28.000000000 +0200 @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fixs inappropriate logic in memcachedlock.release() \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/releasenotes/notes/mysql-tls-support-88941e2ebaf938b4.yaml new/tooz-4.2.0/releasenotes/notes/mysql-tls-support-88941e2ebaf938b4.yaml --- old/tooz-2.11.1/releasenotes/notes/mysql-tls-support-88941e2ebaf938b4.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-4.2.0/releasenotes/notes/mysql-tls-support-88941e2ebaf938b4.yaml 2023-07-26 14:02:28.000000000 +0200 @@ -0,0 +1,33 @@ +--- +features: + - | + Added TLS support for MySQL driver. + + The following TLS-related options now can be specifed in the MySQL + connection URL as query parameters + + ``ssl_ca`` + path to the CA bundle to use for verifying server certificate + + ``ssl_capath`` + path to folder with CA bundle files + + ``ssl_cert`` + path to client public key certificate file + + ``ssl_key`` + path to client private key file + + ``ssl_check_hostname`` + verify server hostname against its certificate, + accepted values are "true", "1", "yes" or "false", "0", "no" + (default is "true") + + ``ssl_verify_mode`` + whether to verify TLS connection + accepted values are "true", "1", "yes", "required" or + "false", "0", "no", "none", or + "optional" + + ``ssl_cipher`` + list of permissible ciphers for connection encryption diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/releasenotes/notes/zookeeper_tls-808355fd2ab1acae.yaml new/tooz-4.2.0/releasenotes/notes/zookeeper_tls-808355fd2ab1acae.yaml --- old/tooz-2.11.1/releasenotes/notes/zookeeper_tls-808355fd2ab1acae.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/tooz-4.2.0/releasenotes/notes/zookeeper_tls-808355fd2ab1acae.yaml 2023-07-26 14:02:28.000000000 +0200 @@ -0,0 +1,17 @@ +--- +features: + - | + Added TLS support for Zookeeper. + + TLS-related options can be defined in a connection URL as query parameters + and they will be passed to the Kazoo driver as client arguments. + + * ``ca``: SSL CA file to use for authentication + * ``certfile``: SSL certfile to use for authentication + * ``keyfile``: SSL keyfile to use for authentication + * ``keyfile_password``: keyfile password + * ``use_ssl``: controls whether SSL is used or not. Default to False. + * ``verify_certs``: when use_ssl is True you can control whether to + complete certificate validation + + This also bumps minimum kazoo version to >=2.6.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/setup.cfg new/tooz-4.2.0/setup.cfg --- old/tooz-2.11.1/setup.cfg 2022-05-05 11:53:30.812252500 +0200 +++ new/tooz-4.2.0/setup.cfg 2023-07-26 14:02:55.045489000 +0200 @@ -6,7 +6,7 @@ description_file = README.rst license = Apache-2 home_page = https://docs.openstack.org/tooz/latest/ -python_requires = >=3.6 +python_requires = >=3.8 classifier = Environment :: OpenStack Intended Audience :: Developers @@ -15,9 +15,9 @@ Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython Topic :: System :: Distributed Computing @@ -51,6 +51,7 @@ etcd3 = etcd3>=0.12.0 # Apache-2.0 grpcio>=1.18.0 + protobuf<4.0 # BSD License (3 clause) etcd3gw = etcd3gw!=0.2.6,>=0.1.0 # Apache-2.0 zake = @@ -62,7 +63,7 @@ mysql = PyMySQL>=0.6.2 # MIT License zookeeper = - kazoo>=2.2 # Apache-2.0 + kazoo>=2.6 # Apache-2.0 memcached = pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License ipc = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tools/compat-matrix.py new/tooz-4.2.0/tools/compat-matrix.py --- old/tooz-2.11.1/tools/compat-matrix.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tools/compat-matrix.py 2023-07-26 14:02:28.000000000 +0200 @@ -74,7 +74,7 @@ grouping_table = [ [ "Yes", # Consul - "No", # Etcd + "Yes", # Etcd "Yes", # File "No", # IPC "Yes", # Memcached diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz/drivers/etcd3gw.py new/tooz-4.2.0/tooz/drivers/etcd3gw.py --- old/tooz-2.11.1/tooz/drivers/etcd3gw.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tooz/drivers/etcd3gw.py 2023-07-26 14:02:28.000000000 +0200 @@ -14,6 +14,7 @@ import base64 import functools +import logging import threading import uuid @@ -27,6 +28,8 @@ from tooz import locking from tooz import utils +LOG = logging.getLogger(__name__) + def _encode(data): """Safely encode data for consumption of the gateway.""" @@ -160,7 +163,8 @@ return False -class Etcd3Driver(coordination.CoordinationDriverWithExecutor): +class Etcd3Driver(coordination.CoordinationDriverCachedRunWatchers, + coordination.CoordinationDriverWithExecutor): """An etcd based driver. This driver uses etcd provide the coordination driver semantics and @@ -177,6 +181,7 @@ ================== ======= Name Default ================== ======= + api_version v3alpha ca_cert None cert_key None cert_cert None @@ -195,6 +200,9 @@ #: Default port used if none provided (4001 or 2379 are the common ones). DEFAULT_PORT = 2379 + #: Default api version if none provided + DEFAULT_API_VERSION = "v3alpha" + GROUP_PREFIX = b"tooz/groups/" def __init__(self, member_id, parsed_url, options): @@ -207,17 +215,20 @@ cert_key = options.get('cert_key') cert_cert = options.get('cert_cert') timeout = int(options.get('timeout', self.DEFAULT_TIMEOUT)) + api_version = options.get("api_version", self.DEFAULT_API_VERSION) self.client = etcd3gw.client(host=host, port=port, protocol=protocol, ca_cert=ca_cert, cert_key=cert_key, cert_cert=cert_cert, + api_path="/" + api_version + "/", timeout=timeout) self.lock_timeout = int(options.get('lock_timeout', timeout)) self.membership_timeout = int(options.get( 'membership_timeout', timeout)) self._acquired_locks = set() + self._membership_lease = None def _start(self): super(Etcd3Driver, self)._start() @@ -227,25 +238,17 @@ return Etcd3Lock(self, name, self.lock_timeout) def heartbeat(self): + # TODO(kaifeng) use the same lease for locks? + if self._membership_lease.refresh() == -1: + expired_lease = self._membership_lease.id + self._membership_lease = self.client.lease(self.membership_timeout) + LOG.debug('Created new lease %s after previous lease %s expired.', + self._membership_lease.id, expired_lease) # NOTE(jaypipes): Copying because set can mutate during iteration for lock in self._acquired_locks.copy(): lock.heartbeat() - # TODO(kaifeng) use the same lease for locks? - self._membership_lease.refresh() return min(self.lock_timeout, self.membership_timeout) - def watch_join_group(self, group_id, callback): - raise tooz.NotImplemented - - def unwatch_join_group(self, group_id, callback): - raise tooz.NotImplemented - - def watch_leave_group(self, group_id, callback): - raise tooz.NotImplemented - - 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)) @@ -435,3 +438,11 @@ group[1]['key'][len(self.GROUP_PREFIX):-1] for group in groups] return coordination.CoordinatorResult( self._executor.submit(_get_groups)) + + @staticmethod + def watch_elected_as_leader(group_id, callback): + raise tooz.NotImplemented + + @staticmethod + def unwatch_elected_as_leader(group_id, callback): + raise tooz.NotImplemented diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz/drivers/memcached.py new/tooz-4.2.0/tooz/drivers/memcached.py --- old/tooz-2.11.1/tooz/drivers/memcached.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tooz/drivers/memcached.py 2023-07-26 14:02:28.000000000 +0200 @@ -150,11 +150,16 @@ # it being done in the client side (non-atomic). value = self.coord.client.get(self.name) if value != self.coord._member_id: + # NOTE(zhen): Although ``member_ id`` is different, self lock + # object needs to be removed from'_ acquired_locks' because it + # has the same key. + self.coord._acquired_locks.remove(self) return False else: + # NOTE(zhen): Whether 'was_deleted' was 'TRUE' or not, + # eventually we have to remove self from '_acquired_locks'. was_deleted = self.coord.client.delete(self.name, noreply=False) - if was_deleted: - self.coord._acquired_locks.remove(self) + self.coord._acquired_locks.remove(self) return was_deleted @_translate_failures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz/drivers/mysql.py new/tooz-4.2.0/tooz/drivers/mysql.py --- old/tooz-2.11.1/tooz/drivers/mysql.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tooz/drivers/mysql.py 2023-07-26 14:02:28.000000000 +0200 @@ -37,7 +37,7 @@ self.acquired = False self._conn = MySQLDriver.get_connection(parsed_url, options, True) - def acquire(self, blocking=True, shared=False): + def acquire(self, blocking=True, shared=False, timeout=0): if shared: raise tooz.NotImplemented @@ -62,7 +62,10 @@ if not self._conn.open: self._conn.connect() cur = self._conn.cursor() - cur.execute("SELECT GET_LOCK(%s, 0);", self.name) + cur.execute( + (f"SELECT GET_LOCK(%s, {timeout});"), + self.name + ) # Can return NULL on error if cur.fetchone()[0] == 1: self.acquired = True @@ -116,9 +119,23 @@ The MySQL driver connection URI should look like:: - mysql://USERNAME:PASSWORD@HOST[:PORT]/DBNAME[?unix_socket=SOCKET_PATH] + mysql://USERNAME:PASSWORD@HOST[:PORT]/DBNAME[?OPTION1=VALUE1[&OPTION2=VALUE2[&...]]] If not specified, PORT defaults to 3306. + Available options are: + + ================== ======= + Name Default + ================== ======= + ssl_ca None + ssl_capath None + ssl_cert None + ssl_key None + ssl_cipher None + ssl_verify_mode None + ssl_check_hostname True + unix_socket None + ================== ======= .. _MySQL: http://dev.mysql.com/ """ @@ -182,6 +199,26 @@ username = parsed_url.username password = parsed_url.password unix_socket = options.get("unix_socket") + ssl_opt_names = ( + "ca", + "capath", + "cert", + "key", + "cipher", + "verify_mode", + ) + ssl_args = {} + for o in ssl_opt_names: + value = options.get("ssl_" + o) + if value: + ssl_args[o] = value + check_hostname = options.get("ssl_check_hostname") + if check_hostname is not None: + check_hostname = check_hostname.lower() + if check_hostname in ("true", "1", "yes"): + ssl_args["check_hostname"] = True + elif check_hostname in ("false", "0", "no"): + ssl_args["check_hostname"] = False try: if unix_socket: @@ -190,6 +227,7 @@ user=username, passwd=password, database=dbname, + ssl=ssl_args, defer_connect=defer_connect) else: return pymysql.Connect(host=host, @@ -197,6 +235,7 @@ user=username, passwd=password, database=dbname, + ssl=ssl_args, defer_connect=defer_connect) except (pymysql.err.OperationalError, pymysql.err.InternalError) as e: utils.raise_with_cause(coordination.ToozConnectionError, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz/drivers/zookeeper.py new/tooz-4.2.0/tooz/drivers/zookeeper.py --- old/tooz-2.11.1/tooz/drivers/zookeeper.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tooz/drivers/zookeeper.py 2023-07-26 14:02:28.000000000 +0200 @@ -95,11 +95,17 @@ ================ =============================== ==================== Name Source Default ================ =============================== ==================== - hosts url netloc + 'hosts' option key localhost:2181 - timeout 'timeout' options key 10.0 (kazoo default) + ca 'ca' options key None + certfile 'certfile' options key None connection_retry 'connection_retry' options key None command_retry 'command_retry' options key None + hosts url netloc + 'hosts' option key localhost:2181 + keyfile 'keyfile' options key None + keyfile_password 'keyfile_password' options key None randomize_hosts 'randomize_hosts' options key True + timeout 'timeout' options key 10.0 (kazoo default) + use_ssl 'use_ssl' options key False + verify_certs 'verify_certs' options key True ================ =============================== ==================== .. _kazoo: http://kazoo.readthedocs.org/ @@ -472,13 +478,19 @@ hosts = ['localhost:2181'] randomize_hosts = options.get('randomize_hosts', True) client_kwargs = { - 'hosts': ",".join(hosts), - 'timeout': float(options.get('timeout', self.timeout)), + 'auth_data': auth_data, + 'ca': options.get('ca', None), + 'certfile': options.get('certfile', None), 'connection_retry': options.get('connection_retry'), 'command_retry': options.get('command_retry'), - 'randomize_hosts': strutils.bool_from_string(randomize_hosts), - 'auth_data': auth_data, 'default_acl': default_acl, + 'hosts': ",".join(hosts), + 'keyfile': options.get('keyfile', None), + 'keyfile_password': options.get('keyfile_password', None), + 'randomize_hosts': strutils.bool_from_string(randomize_hosts), + 'timeout': float(options.get('timeout', self.timeout)), + 'use_ssl': bool(options.get('use_ssl', False)), + 'verify_certs': bool(options.get('verify_certs', True)), } handler_kind = options.get('handler') if handler_kind: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz/tests/drivers/test_etcd3gw.py new/tooz-4.2.0/tooz/tests/drivers/test_etcd3gw.py --- old/tooz-2.11.1/tooz/tests/drivers/test_etcd3gw.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tooz/tests/drivers/test_etcd3gw.py 2023-07-26 14:02:28.000000000 +0200 @@ -34,16 +34,19 @@ 'ca_cert': None, 'cert_key': None, 'cert_cert': None, + 'api_path': ( + "/" + etcd3gw_driver.Etcd3Driver.DEFAULT_API_VERSION + "/"), 'timeout': etcd3gw_driver.Etcd3Driver.DEFAULT_TIMEOUT}, {'coord_url': ('etcd3+https://my_host:666?ca_cert=/my/ca_cert&' 'cert_key=/my/cert_key&cert_cert=/my/cert_cert&' - 'timeout=42'), + 'timeout=42&api_version=v3'), 'protocol': 'https', 'host': 'my_host', 'port': 666, 'ca_cert': '/my/ca_cert', 'cert_key': '/my/cert_key', 'cert_cert': '/my/cert_cert', + 'api_path': '/v3/', 'timeout': 42}) @ddt.unpack @mock.patch('etcd3gw.client') @@ -56,6 +59,7 @@ ca_cert, cert_key, cert_cert, + api_path, timeout): tooz.coordination.get_coordinator(coord_url, self.FAKE_MEMBER_ID) mock_etcd3gw_client.assert_called_with(host=host, @@ -64,4 +68,5 @@ ca_cert=ca_cert, cert_key=cert_key, cert_cert=cert_cert, + api_path=api_path, timeout=timeout) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz/tests/test_mysql.py new/tooz-4.2.0/tooz/tests/test_mysql.py --- old/tooz-2.11.1/tooz/tests/test_mysql.py 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tooz/tests/test_mysql.py 2023-07-26 14:02:28.000000000 +0200 @@ -14,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. +from unittest import mock from oslo_utils import encodeutils from testtools import testcase @@ -52,3 +53,62 @@ def test_connect_failure_invalid_hostname_and_port_provided(self): c = self._create_coordinator("mysql://invalidhost:54/test") self.assertRaises(coordination.ToozConnectionError, c.start) + + @mock.patch("pymysql.Connect") + def test_parsing_tls_settings(self, sql_mock): + c = self._create_coordinator( + "mysql://invalidhost:54/test" + "?ssl_ca=/ca/not/there" + "&ssl_capath=/capath/not/there" + "&ssl_check_hostname=False" + "&ssl_verify_mode=yes" + "&ssl_cert=/cert/not/there" + "&ssl_key=/key/not/there" + "&ssl_cipher=spam,ham" + ) + c.start() + sql_mock.assert_called_once_with( + host="invalidhost", + port=54, + user=None, + passwd=None, + database="test", + defer_connect=False, + ssl=dict( + ca="/ca/not/there", + capath="/capath/not/there", + check_hostname=False, + verify_mode="yes", + cert="/cert/not/there", + key="/key/not/there", + cipher="spam,ham" + ) + + ) + + @mock.patch("pymysql.Connect") + def test_parsing_timeout_settings(self, sql_mock): + c = self._create_coordinator("mysql://localhost:3306/test") + c.start() + + name = tests.get_random_uuid() + blocking_value = False + timeout = 10.1 + lock = c.get_lock(name) + with mock.patch.object(lock, 'acquire', wraps=True, autospec=True) as \ + mock_acquire: + with lock(blocking_value, timeout): + mock_acquire.assert_called_once_with(blocking_value, timeout) + + @mock.patch("pymysql.Connect") + def test_parsing_blocking_settings(self, sql_mock): + c = self._create_coordinator("mysql://localhost:3306/test") + c.start() + + name = tests.get_random_uuid() + blocking_value = True + lock = c.get_lock(name) + with mock.patch.object(lock, 'acquire', wraps=True, autospec=True) as \ + mock_acquire: + with lock(blocking_value): + mock_acquire.assert_called_once_with(blocking_value) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz.egg-info/PKG-INFO new/tooz-4.2.0/tooz.egg-info/PKG-INFO --- old/tooz-2.11.1/tooz.egg-info/PKG-INFO 2022-05-05 11:53:30.000000000 +0200 +++ new/tooz-4.2.0/tooz.egg-info/PKG-INFO 2023-07-26 14:02:54.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: tooz -Version: 2.11.1 +Version: 4.2.0 Summary: Coordination library for distributed systems. Home-page: https://docs.openstack.org/tooz/latest/ Author: OpenStack @@ -41,13 +41,13 @@ Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Topic :: System :: Distributed Computing -Requires-Python: >=3.6 +Requires-Python: >=3.8 Provides-Extra: consul Provides-Extra: etcd Provides-Extra: etcd3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz.egg-info/SOURCES.txt new/tooz-4.2.0/tooz.egg-info/SOURCES.txt --- old/tooz-2.11.1/tooz.egg-info/SOURCES.txt 2022-05-05 11:53:30.000000000 +0200 +++ new/tooz-4.2.0/tooz.egg-info/SOURCES.txt 2023-07-26 14:02:55.000000000 +0200 @@ -50,12 +50,16 @@ releasenotes/notes/etcd3-etcd3gw-tls-support-618ab207706e67af.yaml releasenotes/notes/etcd3-group-support-b039cf19f4a268a3.yaml releasenotes/notes/etcd3gw-group-support-598832a8764a8aa6.yaml +releasenotes/notes/etcd3gw_create_new_lease_if_expired_during_refresh-1d631d36c21ea28c.yaml releasenotes/notes/hashring-0470f9119ef63d49.yaml releasenotes/notes/hashring-algo-8a279397b8ff8a6a.yaml releasenotes/notes/join_group_create-5095ec02e20c7242.yaml +releasenotes/notes/memcached-fix-lock-release-I6fc33b8e0a88510.yaml releasenotes/notes/mysql-0.10.0-7660f75a1c57a920.yaml +releasenotes/notes/mysql-tls-support-88941e2ebaf938b4.yaml releasenotes/notes/partitioner-4005767d287dc7c9.yaml releasenotes/notes/redis-connect-retries-c9adfc81eb06a4ab.yaml +releasenotes/notes/zookeeper_tls-808355fd2ab1acae.yaml releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/ocata.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz.egg-info/pbr.json new/tooz-4.2.0/tooz.egg-info/pbr.json --- old/tooz-2.11.1/tooz.egg-info/pbr.json 2022-05-05 11:53:30.000000000 +0200 +++ new/tooz-4.2.0/tooz.egg-info/pbr.json 2023-07-26 14:02:54.000000000 +0200 @@ -1 +1 @@ -{"git_version": "96f91b9", "is_release": true} \ No newline at end of file +{"git_version": "bed303e", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tooz.egg-info/requires.txt new/tooz-4.2.0/tooz.egg-info/requires.txt --- old/tooz-2.11.1/tooz.egg-info/requires.txt 2022-05-05 11:53:30.000000000 +0200 +++ new/tooz-4.2.0/tooz.egg-info/requires.txt 2023-07-26 14:02:54.000000000 +0200 @@ -17,6 +17,7 @@ [etcd3] etcd3>=0.12.0 grpcio>=1.18.0 +protobuf<4.0 [etcd3gw] etcd3gw!=0.2.6,>=0.1.0 @@ -51,4 +52,4 @@ zake>=0.1.6 [zookeeper] -kazoo>=2.2 +kazoo>=2.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tooz-2.11.1/tox.ini new/tooz-4.2.0/tox.ini --- old/tooz-2.11.1/tox.ini 2022-05-05 11:52:58.000000000 +0200 +++ new/tooz-4.2.0/tox.ini 2023-07-26 14:02:28.000000000 +0200 @@ -33,6 +33,9 @@ etcd3gw: TOOZ_TEST_DRIVERS = etcd etcd3gw: TOOZ_TEST_ETCD3GW = 1 consul: TOOZ_TEST_DRIVERS = consul +allowlist_externals = + {toxinidir}/run-tests.sh + {toxinidir}/run-examples.sh # NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt commands = {toxinidir}/run-tests.sh stestr run "{posargs}" @@ -55,6 +58,8 @@ coverage xml -o cover/coverage.xml [testenv:docs] +setenv = {[testenv]setenv} + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html
