fix conflict with opnetracing for python3.11.4

This commit is contained in:
tzing_t 2023-08-11 11:35:22 +08:00
parent 408aa7777b
commit 3e8124cf4f
2 changed files with 36 additions and 2 deletions

30
opentracing.patch Normal file
View File

@ -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())

View File

@ -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 <zhengting13@huawei.com> - 2.4.0-3
- DESC: fix conflict with opnetracing
* Fri Jun 17 2022 tanyulong <tanyulong@kylinos.cn> - 2.4.0-2
- delete -S git from %autosetup