From d86d4ef0986fabdfc2fdd02519609798dbc06b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 1 Jun 2022 12:06:19 +0200 Subject: [PATCH] Python 3.11 compatibility --- 0001-Python-3.11-ignore-ResourceWarning.patch | 24 +++++++++++++++++++ python-werkzeug.spec | 5 ++++ 2 files changed, 29 insertions(+) create mode 100644 0001-Python-3.11-ignore-ResourceWarning.patch diff --git a/0001-Python-3.11-ignore-ResourceWarning.patch b/0001-Python-3.11-ignore-ResourceWarning.patch new file mode 100644 index 0000000..670eb6a --- /dev/null +++ b/0001-Python-3.11-ignore-ResourceWarning.patch @@ -0,0 +1,24 @@ +From 660318fc363dc008f9911065dc3477de7152e264 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Tue, 31 May 2022 15:05:22 +0200 +Subject: [PATCH] Python 3.11 ignore ResourceWarning + +--- + setup.cfg | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.cfg b/setup.cfg +index 6596935..29c751d 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -44,6 +44,7 @@ where = src + testpaths = tests + filterwarnings = + error ++ ignore:.*Unclosed file.*:ResourceWarning + + [coverage:run] + branch = True +-- +2.36.1 + diff --git a/python-werkzeug.spec b/python-werkzeug.spec index d3636eb..842fbb7 100644 --- a/python-werkzeug.spec +++ b/python-werkzeug.spec @@ -14,6 +14,11 @@ Source0: %{pypi_source} # Upstream: https://github.com/pallets/werkzeug/pull/2172 Patch0: preserve-any-existing-PYTHONPATH-in-tests.patch +# Werkzeug throws ResourceWarning with Python 3.11 +# Upstream is not concerned about it so this patch will ignore it until it is fixed +# Upstream report: https://github.com/pallets/werkzeug/issues/2421 +Patch1: 0001-Python-3.11-ignore-ResourceWarning.patch + BuildArch: noarch %global _description %{expand: