From patchwork Wed Nov 9 18:57:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6105 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4N6vPr2bWHz3whc for ; Wed, 9 Nov 2022 18:58:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4N6vPQ2bMVz2vM; Wed, 9 Nov 2022 18:58:18 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4N6vPQ1jLhz309b; Wed, 9 Nov 2022 18:58:18 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4N6vPN00Ygz2yvq for ; Wed, 9 Nov 2022 18:58:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4N6vPK6y5Qz2jW; Wed, 9 Nov 2022 18:58:13 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1668020294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+mKqAgCR1/qo4gwMD2mDMhq1dw5Q7ruPrihrU+SEnxw=; b=XO809mCzhUnzkLe33kBbAU1zr3Le3EZ7u7KNTcsg3TmsVPFewW4eFPycizfVBwQ9ZoM8+B AzPBZjRCjFVNr3BQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1668020294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+mKqAgCR1/qo4gwMD2mDMhq1dw5Q7ruPrihrU+SEnxw=; b=GqNVXbRibQrWIX41veeLocBV5+ZNAkh1nM67IiXWpBpPVntefnIiByFG8N3vpy7mF/K85A zA1d44YznYiTeaMMIDmi0aLRXHqmnu/7ks9huQ7o+fts358LgXvi1IGo2TQKQZxgzzH3f2 j/xrMBzLA5swkm7suAdXBeNnn539fJtEGKYrA4Xgx06JrREU9yL7eM3spMViT8kT6SXqAY nILQfmOJYLDwI1iqUJar364V1DXyvCJEEKwoZECg5UD6T7Gkt+dQ55c5f6cQqfY3lxvWvy 23lfGYrhGSsreAVYqU7+sh9jkQBBfa1jziJHjU3CtpKkYIBdwY8w79gHPGh+AA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 27/48] python3-circuitbreaker:Update to version 1.4.0 and to work with python-3.10.8 Date: Wed, 9 Nov 2022 19:57:13 +0100 Message-Id: <20221109185734.3920-27-adolf.belka@ipfire.org> In-Reply-To: <20221109185734.3920-1-adolf.belka@ipfire.org> References: <20221109185734.3920-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Updated from version 1.3.2 to 1.4.0 - Update of rootfile - Changelog 1.4.0 Latest The circuitbreaker project has been classified as "Critical Project" on PyPI, meaning it belongs to the top 1% of all projects on PyPI based on the downloads over the last 6 months. We're working an important peace here 🙂 Fallback Function By default, the circuit breaker will raise a CircuitBreaker exception when the circuit is opened. You can instead specify a function to be called when the circuit is opened. This function can be specified with the fallback_function parameter and will be called with the same parameters as the decorated function would be. Custom callable for handling exceptions The logic for handling thrown exceptions as failures can now be customized by passing a callable. The callable will be passed the exception type and value, and should return True if the exception should be treated as a failure. Monotonic clock Using the wall clock to measure durations is vulnerable to changes in the system clock causing misbehavior - a clock accidentally set far in the future and later reset could result in the circuit breaker remaining open for a great deal longer than expected. To solve this, a monotonic clock is now used for timing open states. Circuitbreaker default name The circuitbreaker default names are now taken from __qualname__ if available for more precise default naming. Fixes and tooling the project is now built on Github Action instead of Travis CI building for python 3.10 applied smaller flake8 fixes Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/rootfiles/packages/python3-circuitbreaker | 14 +++++++------- lfs/python3-circuitbreaker | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/rootfiles/packages/python3-circuitbreaker b/config/rootfiles/packages/python3-circuitbreaker index 7c6d0f387..321e91d1c 100644 --- a/config/rootfiles/packages/python3-circuitbreaker +++ b/config/rootfiles/packages/python3-circuitbreaker @@ -1,8 +1,8 @@ -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info/PKG-INFO -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info/SOURCES.txt -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info/dependency_links.txt -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info/not-zip-safe -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info/requires.txt -#usr/lib/python3.10/site-packages/circuitbreaker-1.3.2-py3.10.egg-info/top_level.txt +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info/PKG-INFO +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info/SOURCES.txt +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info/dependency_links.txt +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info/not-zip-safe +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info/requires.txt +#usr/lib/python3.10/site-packages/circuitbreaker-1.4.0-py3.10.egg-info/top_level.txt usr/lib/python3.10/site-packages/circuitbreaker.py diff --git a/lfs/python3-circuitbreaker b/lfs/python3-circuitbreaker index b3a5e3c24..9c13e7bd2 100644 --- a/lfs/python3-circuitbreaker +++ b/lfs/python3-circuitbreaker @@ -24,7 +24,7 @@ include Config -VER = 1.3.2 +VER = 1.4.0 THISAPP = circuitbreaker-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = python3-circuitbreaker -PAK_VER = 1 +PAK_VER = 2 ############################################################################### # Top-level Rules @@ -42,7 +42,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = f4283afbde8451a2b5e8286abbc8c8a1752fcc8236bdbdea9425d1a6503fd7ccffef57f51e189a465f38b8be96135edf0bf9c697215508251c78db2e766e1394 +$(DL_FILE)_BLAKE2 = 86e9b00ba2736c565efac0a932bc8625a332393634970d90942fe391750d15f890fad805aa95cd59a097312e7e927b909169776a4ba740998c5032b938f19d7f install : $(TARGET)