diff --git a/0001-filter-out-DeprecationWarnings.patch b/0001-filter-out-DeprecationWarnings.patch new file mode 100644 index 0000000..60c0f88 --- /dev/null +++ b/0001-filter-out-DeprecationWarnings.patch @@ -0,0 +1,31 @@ +From 1a4a106bf202fbd90371087260af2bbc0ef097c3 Mon Sep 17 00:00:00 2001 +From: Tomas Hrnciar +Date: Thu, 3 Jun 2021 15:20:04 +0200 +Subject: [PATCH] filter out DeprecationWarnings + +--- + alembic/testing/warnings.py | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/alembic/testing/warnings.py b/alembic/testing/warnings.py +index d809dfe..ae8bcec 100644 +--- a/alembic/testing/warnings.py ++++ b/alembic/testing/warnings.py +@@ -30,3 +30,14 @@ def setup_filters(): + warnings.filterwarnings( + "once", category=pytest.PytestDeprecationWarning + ) ++ warnings.filterwarnings( ++ "ignore", ++ category=DeprecationWarning, ++ message="SelectableGroups dict interface is deprecated. Use select.", ++ ) ++ warnings.filterwarnings( ++ "ignore", ++ category=DeprecationWarning, ++ message="The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives", ++ ) ++ +-- +2.31.1 + diff --git a/python-alembic.spec b/python-alembic.spec index 48260b0..6c6998f 100644 --- a/python-alembic.spec +++ b/python-alembic.spec @@ -9,6 +9,10 @@ License: MIT URL: https://pypi.io/project/alembic Source0: %pypi_source alembic +# Alembic fails with Python 3.10.0b2 due to DeprecationWarnings treated as an error. +# Downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=1958159 +Patch1: 0001-filter-out-DeprecationWarnings.patch + BuildArch: noarch BuildRequires: help2man