From 5f1ccba0fbf93a2b43d0bd2559186f2f1c65c601 Mon Sep 17 00:00:00 2001 From: cherry530 Date: Thu, 31 Mar 2022 11:32:46 +0800 Subject: [PATCH] Fix Python 3.7 collections.abc DeprecationWarning Signed-off-by: cherry530 --- ...7-collections.abc-DeprecationWarning.patch | 29 +++++++++++++++++++ python-bottle.spec | 8 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Fix-Python-3.7-collections.abc-DeprecationWarning.patch diff --git a/Fix-Python-3.7-collections.abc-DeprecationWarning.patch b/Fix-Python-3.7-collections.abc-DeprecationWarning.patch new file mode 100644 index 0000000..a93b903 --- /dev/null +++ b/Fix-Python-3.7-collections.abc-DeprecationWarning.patch @@ -0,0 +1,29 @@ +From eff4960d941b51629f8378b1bd9498ed2aec92c7 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 8 May 2019 16:48:24 +0100 +Subject: [PATCH] Fix Python 3.7 collections.abc DeprecationWarning + +Should fix this + +``` +/.../bin/bottle.py:87: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it wil +l stop working + from collections import MutableMapping as DictMixin +``` +--- + bottle.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bottle.py b/bottle.py +index 3a51b38..f8398f1 100644 +--- a/bottle.py ++++ b/bottle.py +@@ -84,7 +84,7 @@ if py3k: + from urllib.parse import urlencode, quote as urlquote, unquote as urlunquote + urlunquote = functools.partial(urlunquote, encoding='latin1') + from http.cookies import SimpleCookie +- from collections import MutableMapping as DictMixin ++ from collections.abc import MutableMapping as DictMixin + import pickle + from io import BytesIO + from configparser import ConfigParser diff --git a/python-bottle.spec b/python-bottle.spec index df64ab0..cdcf0bf 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -1,11 +1,14 @@ Name: python-bottle Version: 0.12.13 -Release: 9 +Release: 10 Summary: WSGI micro web-framework for Python. License: MIT URL: https://github.com/bottlepy/bottle Source0: https://github.com/bottlepy/bottle/archive/%{version}/bottle-%{version}.tar.gz Patch0000: CVE-2020-28473.patch +#https://github.com/bottlepy/bottle/commit/eff4960d941b51629f8378b1bd9498ed2aec92c7 +Patch0001: Fix-Python-3.7-collections.abc-DeprecationWarning.patch + BuildArch: noarch BuildRequires: python3-devel python3-setuptools @@ -43,6 +46,9 @@ sed -i '/^#!/d' bottle.py %exclude %{_bindir}/bottle.py %changelog +* Thu Mar 31 2022 xu_ping - 0.12.13-10 +- Fix Python 3.7 collections.abc DeprecationWarning + * Fri Feb 19 2021 zhanghua - 0.12.13-9 - fix CVE-2020-28473 -- Gitee