diff --git a/bsc1221260-test_asyncio-ResourceWarning.patch b/bsc1221260-test_asyncio-ResourceWarning.patch new file mode 100644 index 0000000..3235193 --- /dev/null +++ b/bsc1221260-test_asyncio-ResourceWarning.patch @@ -0,0 +1,23 @@ +From a3052035485bd2836e40f5284657ca105382cbfd Mon Sep 17 00:00:00 2001 +From: sobolevn +Date: Tue, 5 Mar 2024 20:24:16 +0300 +Subject: [PATCH] gh-116112: Fix `ResourceWarning` in + `test_asyncio.test_stream` + +Co-authored-by: @CendioOssman +--- + Lib/test/test_asyncio/test_streams.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py +index bf123ebf9bd158..2cf48538d5d30d 100644 +--- a/Lib/test/test_asyncio/test_streams.py ++++ b/Lib/test/test_asyncio/test_streams.py +@@ -1188,6 +1188,7 @@ async def handle_echo(reader, writer): + + def test_unhandled_cancel(self): + async def handle_echo(reader, writer): ++ writer.close() + asyncio.current_task().cancel() + messages = self._basetest_unhandled_exceptions(handle_echo) + self.assertEqual(messages, []) diff --git a/python311.changes b/python311.changes index ae54db5..a91f290 100644 --- a/python311.changes +++ b/python311.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 12 08:13:34 UTC 2024 - Matej Cepl + +- bsc#1221260 add bsc1221260-test_asyncio-ResourceWarning.patch + to eliminate ResourceWarning which broke the test suite in + test_asyncio. + ------------------------------------------------------------------- Wed Mar 6 14:13:58 UTC 2024 - Pedro Monreal diff --git a/python311.spec b/python311.spec index 1b31f16..004b92c 100644 --- a/python311.spec +++ b/python311.spec @@ -171,6 +171,9 @@ Patch41: libexpat260.patch # PATCH-FIX-UPSTREAM CVE-2023-6597-TempDir-cleaning-symlink.patch bsc#1219666 mcepl@suse.com # tempfile.TemporaryDirectory: fix symlink bug in cleanup (from gh#python/cpython!99930) Patch42: CVE-2023-6597-TempDir-cleaning-symlink.patch +# PATCH-FIX-UPSTREAM bsc1221260-test_asyncio-ResourceWarning.patch bsc#1221260 mcepl@suse.com +# prevent ResourceWarning in test_asyncio tests +Patch43: bsc1221260-test_asyncio-ResourceWarning.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -433,6 +436,7 @@ other applications. %patch -P 40 -p1 %patch -P 41 -p1 %patch -P 42 -p1 +%patch -P 43 -p1 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac