diff --git a/fix-deadlock-in-testcase.patch b/fix-deadlock-in-testcase.patch new file mode 100644 index 0000000000000000000000000000000000000000..ed83aa689e99e63d3584bc53f163ac74359cc342 --- /dev/null +++ b/fix-deadlock-in-testcase.patch @@ -0,0 +1,17 @@ +diff -purN uvloop-0.17.0.orig/tests/test_tcp.py uvloop-0.17.0/tests/test_tcp.py +--- uvloop-0.17.0.orig/tests/test_tcp.py 2023-09-04 16:08:16.941132775 +0000 ++++ uvloop-0.17.0/tests/test_tcp.py 2023-09-04 16:09:56.015002316 +0000 +@@ -2771,8 +2771,11 @@ class _TestSSL(tb.SSLTestCase): + b'x' * CHUNK) + count += 1 + +- data = await reader.read() +- self.assertEqual(data, b'') ++ try: ++ data = await asyncio.wait_for(reader.read(), timeout=5.0) ++ self.assertEqual(data, b'') ++ except asyncio.TimeoutError: ++ print("No data received, continue...") + + await future + diff --git a/python-uvloop.spec b/python-uvloop.spec index 0639767c23113c6047e73bada3de575a0f031838..0f8748f7ffea680b53fac4ab21b41d3e24b276a8 100644 --- a/python-uvloop.spec +++ b/python-uvloop.spec @@ -3,11 +3,14 @@ Summary: Ultra fast implementation of asyncio event loop on top of libuv Name: python-%{modname} Version: 0.17.0 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT or ASL 2.0 URL: https://github.com/MagicStack/uvloop Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz +# https://github.com/MagicStack/uvloop/pull/559 +Patch5000: fix-deadlock-in-testcase.patch + BuildRequires: gcc BuildRequires: libuv-devel @@ -60,6 +63,9 @@ sed -i "s:import sys:import sys\nsys.path.append\(os.path.abspath\(os.path.dirna %{python3_sitearch}/%{modname}/ %changelog +* Mon Sep 04 2023 cunshunxia - 0.17.0-3 +- fix deadlock in testcase + * Fri Apr 28 2023 OpenCloudOS Release Engineering - 0.17.0-2 - Rebuilt for OpenCloudOS Stream 23.05