Backport patch to make package build with Python 3.12

This commit is contained in:
Tomáš Hrnčiar 2023-04-03 13:08:12 +02:00
parent 2e53924a0f
commit 126d60ba18
2 changed files with 36 additions and 0 deletions

33
802196b.patch Normal file
View File

@ -0,0 +1,33 @@
From 802196bddbc83ed2723f819decc91f6628b65f2c Mon Sep 17 00:00:00 2001
From: Ben Darnell <ben@bendarnell.com>
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):

View File

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