From e9e42a181cb7936600b3c7ce171ec5db86df6bf6 Mon Sep 17 00:00:00 2001 From: dgarcia <> Date: Wed, 18 Jan 2023 12:08:31 +0000 Subject: [PATCH] Update python-pytest-benchmark to version 4.0.0 / rev 10 via SR 1059005 https://build.opensuse.org/request/show/1059005 by user dgarcia + dimstar_suse - Modify the py311.patch to fix the test_abort_broken test, instead of disabling. - Add py311.patch to make it compatible with python 3.11, gh#ionelmc/pytest-benchmark#232 - Disable broken test_abort_broken, this test is broken because the output of the tests is a bit different with python 3.11 so we can disable until it's fixed. --- packages/p/python-pytest-benchmark/.files | Bin 270 -> 319 bytes packages/p/python-pytest-benchmark/.rev | 15 ++++++ .../p/python-pytest-benchmark/py311.patch | 45 ++++++++++++++++++ .../python-pytest-benchmark.changes | 15 ++++++ .../python-pytest-benchmark.spec | 4 +- 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 packages/p/python-pytest-benchmark/py311.patch diff --git a/packages/p/python-pytest-benchmark/.files b/packages/p/python-pytest-benchmark/.files index 72f991f16109d384b0df711ea3139d89c15c9f0e..2300681bba73f946594183653fe57d2edb1136b8 100644 GIT binary patch delta 141 zcmWN}!41MN3;@8YsGqV#B;G}F5-0T*FoNwk;u(p4_%H%eCt@RJp#Rf-#_zcF=jNyR zGz`NuI}F*9&k!PMl90rRwL&h!QPtM{=l0wC-cU&ogDfknR3Jh`(CP~%Lp`!{e?@?6 d=S?58Yl7M0$^_;!Ld94P+Vfb%EipUz`(+#kd$bWYMf$VWNDsgo| 1039055 + + fa04fdaa9cf3bda88f1db9a99d762c6c + 4.0.0 + + dimstar_suse + - Modify the py311.patch to fix the test_abort_broken test, instead of + disabling. +- Add py311.patch to make it compatible with python 3.11, + gh#ionelmc/pytest-benchmark#232 +- Disable broken test_abort_broken, this test is broken because the output of + the tests is a bit different with python 3.11 so we can disable until it's + fixed. + + 1059005 + diff --git a/packages/p/python-pytest-benchmark/py311.patch b/packages/p/python-pytest-benchmark/py311.patch new file mode 100644 index 00000000000..f397ecbde06 --- /dev/null +++ b/packages/p/python-pytest-benchmark/py311.patch @@ -0,0 +1,45 @@ +diff --git a/src/pytest_benchmark/compat.py b/src/pytest_benchmark/compat.py +index 63d01bd..9afecf2 100644 +--- a/src/pytest_benchmark/compat.py ++++ b/src/pytest_benchmark/compat.py +@@ -1,3 +1,4 @@ + import sys + + PY38 = sys.version_info[0] == 3 and sys.version_info[1] >= 8 ++PY311 = sys.version_info[0] == 3 and sys.version_info[1] >= 11 +diff --git a/src/pytest_benchmark/utils.py b/src/pytest_benchmark/utils.py +index c80352a..e28c04e 100644 +--- a/src/pytest_benchmark/utils.py ++++ b/src/pytest_benchmark/utils.py +@@ -26,7 +26,7 @@ + + import genericpath + +-from .compat import PY38 ++from .compat import PY38, PY311 + + # This is here (in the utils module) because it might be used by + # various other modules. +@@ -521,6 +521,10 @@ def clonefunc(f): + co.co_firstlineno, co.co_lnotab, co.co_freevars, co.co_cellvars] + if PY38: + args.insert(1, co.co_posonlyargcount) ++ ++ if PY311: ++ args.insert(12, co.co_qualname) ++ args.insert(15, co.co_exceptiontable) + co2 = types.CodeType(*args) + # + # then, we clone the function itself, using the new co2 +diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py +index 280ce24..964787f 100644 +--- a/tests/test_benchmark.py ++++ b/tests/test_benchmark.py +@@ -952,7 +952,6 @@ def result(): + + " def test_bad(benchmark):", + "? @benchmark", +- "? def result():", + + "test_abort_broken.py:*", + "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*", diff --git a/packages/p/python-pytest-benchmark/python-pytest-benchmark.changes b/packages/p/python-pytest-benchmark/python-pytest-benchmark.changes index 6618a356c09..30aa1c6d44a 100644 --- a/packages/p/python-pytest-benchmark/python-pytest-benchmark.changes +++ b/packages/p/python-pytest-benchmark/python-pytest-benchmark.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Jan 17 13:03:29 UTC 2023 - Daniel Garcia + +- Modify the py311.patch to fix the test_abort_broken test, instead of + disabling. + +------------------------------------------------------------------- +Tue Jan 17 12:44:25 UTC 2023 - Daniel Garcia + +- Add py311.patch to make it compatible with python 3.11, + gh#ionelmc/pytest-benchmark#232 +- Disable broken test_abort_broken, this test is broken because the output of + the tests is a bit different with python 3.11 so we can disable until it's + fixed. + ------------------------------------------------------------------- Wed Nov 30 07:44:51 UTC 2022 - Daniel Garcia diff --git a/packages/p/python-pytest-benchmark/python-pytest-benchmark.spec b/packages/p/python-pytest-benchmark/python-pytest-benchmark.spec index 6208806c640..82736f92357 100644 --- a/packages/p/python-pytest-benchmark/python-pytest-benchmark.spec +++ b/packages/p/python-pytest-benchmark/python-pytest-benchmark.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-benchmark # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ License: BSD-2-Clause URL: https://github.com/ionelmc/pytest-benchmark Source: https://files.pythonhosted.org/packages/source/p/pytest-benchmark/pytest-benchmark-%{version}.tar.gz Patch0: fix-test-fast.patch +# PATCH-FIX-OPENSUSE py311.patch gh#ionelmc/pytest-benchmark#232 +Patch1: py311.patch BuildRequires: %{python_module aspectlib} BuildRequires: %{python_module elasticsearch} BuildRequires: %{python_module freezegun}