From 4225669cdc4164533cf3df430ba95b4c2021905c9fe0eb1dbc351b4b4fb6fe6e Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 11 Aug 2025 02:24:53 +0000 Subject: [PATCH] - Add BuildRequires on pytest-asyncio. - Add patch set-pytest-asyncio-mode.patch: * Set asyncio-mode to auto. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-makefun?expand=0&rev=18 --- python-makefun.changes | 7 +++++++ python-makefun.spec | 8 +++++--- set-pytest-asyncio-mode.patch | 22 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 set-pytest-asyncio-mode.patch diff --git a/python-makefun.changes b/python-makefun.changes index 13d94da..7b57e5b 100644 --- a/python-makefun.changes +++ b/python-makefun.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 11 02:24:39 UTC 2025 - Steve Kowalik + +- Add BuildRequires on pytest-asyncio. +- Add patch set-pytest-asyncio-mode.patch: + * Set asyncio-mode to auto. + ------------------------------------------------------------------- Thu Jun 12 15:53:22 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-makefun.spec b/python-makefun.spec index a7859cf..ba57afb 100644 --- a/python-makefun.spec +++ b/python-makefun.spec @@ -1,7 +1,7 @@ # # spec file for package python-makefun # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,8 +23,9 @@ Release: 0 License: BSD-3-Clause Summary: Small library to dynamically create python functions URL: https://github.com/smarie/python-makefun -Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/m/makefun/makefun-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Based on gh#smarie/python-makefun#119 +Patch0: set-pytest-asyncio-mode.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} @@ -32,6 +33,7 @@ BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest-asyncio} # /SECTION BuildRequires: fdupes Suggests: python-funcsigs @@ -43,7 +45,7 @@ BuildArch: noarch Small library to dynamically create python functions. %prep -%setup -q -n makefun-%{version} +%autosetup -p1 -n makefun-%{version} sed -i '/pytest-runner/d' setup.cfg %build diff --git a/set-pytest-asyncio-mode.patch b/set-pytest-asyncio-mode.patch new file mode 100644 index 0000000..9a5a9e7 --- /dev/null +++ b/set-pytest-asyncio-mode.patch @@ -0,0 +1,22 @@ +From 3d256ef2531828f131008796f68268d4c23fc2c1 Mon Sep 17 00:00:00 2001 +From: Andy Hawkins +Date: Sun, 11 May 2025 17:43:13 +0100 +Subject: [PATCH] Specify pytest asyncio mode (there is no default in later + versions) + +--- + setup.cfg | 1 + + 1 file changed, 1 insertion(+) + +Index: makefun-1.16.0/setup.cfg +=================================================================== +--- makefun-1.16.0.orig/setup.cfg ++++ makefun-1.16.0/setup.cfg +@@ -59,6 +59,7 @@ addopts = + --verbose + --doctest-modules + --ignore-glob='**/_*.py' ++ --asyncio-mode=auto + filterwarnings = + always +