Date: Sunday, April 23, 2023 @ 15:36:18
Author: jelle
Revision: 1448400
upgpkg: python-tenacity 8.2.2-3: python 3.11 rebuild
Added:
python-tenacity/trunk/fix-tests-for-typeguard-3.patch
Modified:
python-tenacity/trunk/PKGBUILD
---------------------------------+
PKGBUILD | 12 +++++++---
fix-tests-for-typeguard-3.patch | 43 ++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-04-23 14:54:16 UTC (rev 1448399)
+++ PKGBUILD 2023-04-23 15:36:18 UTC (rev 1448400)
@@ -3,7 +3,7 @@
pkgname=python-tenacity
pkgver=8.2.2
_commit=548c5d490187af6f339cbffdd0add38aecc3ecb0
-pkgrel=2
+pkgrel=3
pkgdesc='Retry code until it succeeeds'
arch=('any')
license=('Apache')
@@ -12,9 +12,15 @@
optdepends=('python-tornado: for Tornado coroutines support')
makedepends=('git' 'python-setuptools-scm')
checkdepends=('python-pytest' 'python-tornado' 'python-typeguard')
-source=("git+https://github.com/jd/tenacity.git#commit=$_commit")
-sha512sums=('SKIP')
+source=("git+https://github.com/jd/tenacity.git#commit=$_commit"
"fix-tests-for-typeguard-3.patch")
+sha512sums=('SKIP'
+
'a57faa9ddc1dd5a78d67691f5023b723fdd3fd643c3c3389f446244962f8c410e7f1a7d34b705e1488a4ea443f7cc6b716eff5bc354a7c1ac449fc65c6c869f0')
+prepare() {
+ cd tenacity
+ patch -Np1 -i ${srcdir}/fix-tests-for-typeguard-3.patch
+}
+
build() {
cd tenacity
python setup.py build
Added: fix-tests-for-typeguard-3.patch
===================================================================
--- fix-tests-for-typeguard-3.patch (rev 0)
+++ fix-tests-for-typeguard-3.patch 2023-04-23 15:36:18 UTC (rev 1448400)
@@ -0,0 +1,43 @@
+From 433324956abb028f6d993195d31e4dd8308115c3 Mon Sep 17 00:00:00 2001
+From: Felix Yan <[email protected]>
+Date: Mon, 20 Mar 2023 22:32:03 +0800
+Subject: [PATCH] Fix tests for typeguard 3.x (#394)
+
+typeguard 3.x introduced an incompatible change to `check_type()`'s
+signature.
+
+Co-authored-by: Julien Danjou <[email protected]>
+---
+ .../Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml | 3 +++
+ tests/test_tenacity.py | 8 ++++----
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+ create mode 100644
releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
+
+diff --git
a/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
b/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
+new file mode 100644
+index 00000000..9688c3d4
+--- /dev/null
++++ b/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
+@@ -0,0 +1,3 @@
++---
++fixes:
++ - "Fixes test failures with typeguard 3.x"
+diff --git a/tests/test_tenacity.py b/tests/test_tenacity.py
+index 82806a69..b646e23c 100644
+--- a/tests/test_tenacity.py
++++ b/tests/test_tenacity.py
+@@ -1542,10 +1542,10 @@ def num_to_str(number):
+ with_constructor_result = with_raw(1)
+
+ # These raise TypeError exceptions if they fail
+- check_type("with_raw", with_raw, typing.Callable[[int], str])
+- check_type("with_raw_result", with_raw_result, str)
+- check_type("with_constructor", with_constructor,
typing.Callable[[int], str])
+- check_type("with_constructor_result", with_constructor_result, str)
++ check_type(with_raw, typing.Callable[[int], str])
++ check_type(with_raw_result, str)
++ check_type(with_constructor, typing.Callable[[int], str])
++ check_type(with_constructor_result, str)
+
+
+ @contextmanager