From 126d60ba18cce1e476c2d79706739d34ae7bfee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Mon, 3 Apr 2023 13:08:12 +0200 Subject: [PATCH] Backport patch to make package build with Python 3.12 --- 802196b.patch | 33 +++++++++++++++++++++++++++++++++ python-tornado.spec | 3 +++ 2 files changed, 36 insertions(+) create mode 100644 802196b.patch diff --git a/802196b.patch b/802196b.patch new file mode 100644 index 0000000..34f8afc --- /dev/null +++ b/802196b.patch @@ -0,0 +1,33 @@ +From 802196bddbc83ed2723f819decc91f6628b65f2c Mon Sep 17 00:00:00 2001 +From: Ben Darnell +Date: Sat, 26 Nov 2022 22:29:59 -0500 +Subject: [PATCH] test: Skip undecorated coroutine test in py312 + +The standard library now has its own check for this, rendering ours redundant +(and breaking our test) +--- + tornado/test/testing_test.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py +index d75079bd4a..ef47e97c2b 100644 +--- a/tornado/test/testing_test.py ++++ b/tornado/test/testing_test.py +@@ -10,6 +10,7 @@ + import gc + import os + import platform ++import sys + import traceback + import unittest + import warnings +@@ -134,6 +135,9 @@ def test_gen(self): + platform.python_implementation() == "PyPy", + "pypy destructor warnings cannot be silenced", + ) ++ @unittest.skipIf( ++ sys.version_info >= (3, 12), "py312 has its own check for test case returns" ++ ) + def test_undecorated_coroutine(self): + class Test(AsyncTestCase): + async def test_coro(self): diff --git a/python-tornado.spec b/python-tornado.spec index 6093968..afaa0c7 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -22,6 +22,9 @@ Source0: https://github.com/tornadoweb/tornado/archive/v%{version}/%{srcn # fixes FTBFS with Python 3.8 Patch1: Do-not-turn-DeprecationWarning-into-Exception.patch +# Skip undecorated coroutine test in py312 +Patch: https://github.com/tornadoweb/tornado/commit/802196b.patch + BuildRequires: gcc BuildRequires: python3-devel