From 3e8124cf4f2c3e34a08c594a138c910a08105800 Mon Sep 17 00:00:00 2001 From: tzing_t Date: Fri, 11 Aug 2023 11:35:22 +0800 Subject: [PATCH] fix conflict with opnetracing for python3.11.4 --- opentracing.patch | 30 ++++++++++++++++++++++++++++++ python-opentracing.spec | 8 ++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 opentracing.patch diff --git a/opentracing.patch b/opentracing.patch new file mode 100644 index 0000000..60edde6 --- /dev/null +++ b/opentracing.patch @@ -0,0 +1,30 @@ +diff --git a/tests/scope_managers/test_asyncio.py b/tests/scope_managers/test_asyncio.py +index 14079c4..450260b 100644 +--- a/tests/scope_managers/test_asyncio.py ++++ b/tests/scope_managers/test_asyncio.py +@@ -35,8 +35,8 @@ class AsyncioCompabilityCheck(TestCase, ScopeCompatibilityCheckMixin): + return AsyncioScopeManager() + + def run_test(self, test_fn): +- @asyncio.coroutine +- def async_test_fn(): ++ ++ async def async_test_fn(): + test_fn() + asyncio.get_event_loop().run_until_complete(async_test_fn()) + +diff --git a/tests/scope_managers/test_contextvars.py b/tests/scope_managers/test_contextvars.py +index dd1820f..be7587f 100644 +--- a/tests/scope_managers/test_contextvars.py ++++ b/tests/scope_managers/test_contextvars.py +@@ -36,8 +36,8 @@ class AsyncioContextVarsCompabilityCheck( + return ContextVarsScopeManager() + + def run_test(self, test_fn): +- @asyncio.coroutine +- def async_test_fn(): ++ ++ async def async_test_fn(): + test_fn() + asyncio.get_event_loop().run_until_complete(async_test_fn()) + diff --git a/python-opentracing.spec b/python-opentracing.spec index d6848bb..35ec1a0 100644 --- a/python-opentracing.spec +++ b/python-opentracing.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-opentracing Version: 2.4.0 -Release: 2 +Release: 3 Summary: OpenTracing API for Python. See documentation at http://opentracing.io License: Apache-2.0 URL: https://github.com/opentracing/opentracing-python Source0: https://files.pythonhosted.org/packages/51/28/2dba4e3efb64cc59d4311081a5ddad1dde20a19b69cd0f677cdb2f2c29a6/opentracing-2.4.0.tar.gz +Patch001: opentracing.patch BuildArch: noarch %description This library is a Python platform API for OpenTracing. @@ -34,7 +35,7 @@ Provides: python3-opentracing-doc This library is a Python platform API for OpenTracing. %prep -%autosetup -n opentracing-2.4.0 +%autosetup -n opentracing-2.4.0 -p1 %build %py3_build @@ -79,6 +80,9 @@ pytest %{_docdir}/* %changelog +* Fri Aug 11 2023 zhengting - 2.4.0-3 +- DESC: fix conflict with opnetracing + * Fri Jun 17 2022 tanyulong - 2.4.0-2 - delete -S git from %autosetup