From 9bb6b7e145ffdef4dc746299a0842677f92cedde869c14824650b5092fd52901 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 27 Sep 2021 12:44:49 +0000 Subject: [PATCH] - Add py39-ignore-loop-deprecation.patch to fix failing tests (gh#encode/starlette#1293). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-starlette?expand=0&rev=4 --- py39-ignore-loop-deprecation.patch | 22 ++++++++++++++++++++++ python-starlette.changes | 6 ++++++ python-starlette.spec | 5 ++++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 py39-ignore-loop-deprecation.patch diff --git a/py39-ignore-loop-deprecation.patch b/py39-ignore-loop-deprecation.patch new file mode 100644 index 0000000..d46526b --- /dev/null +++ b/py39-ignore-loop-deprecation.patch @@ -0,0 +1,22 @@ +From 0c9ea3c00cc0a267b3ef9dd7a0c0874f466e9cf6 Mon Sep 17 00:00:00 2001 +From: Marcelo Trylesinski +Date: Thu, 16 Sep 2021 13:48:07 +0200 +Subject: [PATCH] Update setup.cfg + +--- + setup.cfg | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/setup.cfg b/setup.cfg +index f59a7202..1266d95c 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -29,6 +29,8 @@ filterwarnings= + ignore: Using or importing the ABCs from 'collections' instead of from 'collections\.abc' is deprecated.*:DeprecationWarning + ignore: The 'context' alias has been deprecated. Please use 'context_value' instead\.:DeprecationWarning + ignore: The 'variables' alias has been deprecated. Please use 'variable_values' instead\.:DeprecationWarning ++ # Workaround for Python 3.9.7 (see https://bugs.python.org/issue45097) ++ ignore:The loop argument is deprecated since Python 3\.8, and scheduled for removal in Python 3\.10\.:DeprecationWarning:asyncio + + [coverage:run] + source_pkgs = starlette, tests diff --git a/python-starlette.changes b/python-starlette.changes index c6c428d..0d26348 100644 --- a/python-starlette.changes +++ b/python-starlette.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 27 12:44:18 UTC 2021 - Matej Cepl + +- Add py39-ignore-loop-deprecation.patch to fix failing tests + (gh#encode/starlette#1293). + ------------------------------------------------------------------- Thu Jul 22 09:53:25 UTC 2021 - Matej Cepl diff --git a/python-starlette.spec b/python-starlette.spec index 66bfc57..b7a72b9 100644 --- a/python-starlette.spec +++ b/python-starlette.spec @@ -26,6 +26,9 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/encode/starlette Source: https://github.com/encode/starlette/archive/refs/tags/%{version}.tar.gz#/starlette-%{version}.tar.gz +# PATCH-FIX-UPSTREAM py39-ignore-loop-deprecation.patch gh#encode/starlette#1293 mcepl@suse.com +# Ignore loop deprecation warnings originating inside asyncio; bpo#45097 +Patch0: py39-ignore-loop-deprecation.patch BuildRequires: %{python_module Jinja2} BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module aiofiles} @@ -65,7 +68,7 @@ building high performance asyncio services. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# Deprecate built-in GraphQL support #1135 +# Deprecate built-in GraphQL support gh#encode/starlette#1135 rm tests/test_graphql.py # Remove unrecognized arguments: --strict-config --strict-markers sed -i "s|--strict-config||" setup.cfg