diff --git a/0001-fix-for-python-3.7-deprecation-warning-about-importi.patch b/0001-fix-for-python-3.7-deprecation-warning-about-importi.patch new file mode 100644 index 0000000..62cb247 --- /dev/null +++ b/0001-fix-for-python-3.7-deprecation-warning-about-importi.patch @@ -0,0 +1,36 @@ +From 30a861bc5a4f53a9ba73923c9048a3632a0f9d18 Mon Sep 17 00:00:00 2001 +From: Irmen de Jong +Date: Tue, 3 Apr 2018 18:15:39 +0200 +Subject: [PATCH] fix for python 3.7 deprecation warning about importing + certain types from collections vs collections.abc + +--- + more_itertools/more.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/more_itertools/more.py b/more_itertools/more.py +index c4b08ae..4dc9f15 100644 +--- a/more_itertools/more.py ++++ b/more_itertools/more.py +@@ -1,6 +1,6 @@ + from __future__ import print_function + +-from collections import Counter, defaultdict, deque, Sequence ++from collections import Counter, defaultdict, deque + from functools import partial, wraps + from heapq import merge + from itertools import ( +@@ -17,6 +17,10 @@ from itertools import ( + ) + from operator import itemgetter, lt, gt, sub + from sys import maxsize, version_info ++if version_info < (3, 3): ++ from collections import Sequence ++else: ++ from collections.abc import Sequence + + from six import binary_type, string_types, text_type + from six.moves import filter, map, range, zip, zip_longest +-- +2.39.0.windows.2 + diff --git a/python-more-itertools.spec b/python-more-itertools.spec index 264a1de..4accc9d 100644 --- a/python-more-itertools.spec +++ b/python-more-itertools.spec @@ -1,12 +1,13 @@ Name: python-more-itertools Version: 4.1.0 -Release: 5 +Release: 6 Summary: An opensource python library wrapping around itertools License: MIT URL: https://github.com/erikrose/more-itertools Source0: https://pypi.io/packages/source/m/more-itertools/more-itertools-%{version}.tar.gz BuildArch: noarch Patch0000: python37.patch +Patch0001: 0001-fix-for-python-3.7-deprecation-warning-about-importi.patch %description This is a python library for efficient use of itertools utility, which also \ @@ -61,5 +62,8 @@ See https://pythonhosted.org/more-itertools/index.html for more information. %{python3_sitelib}/more_itertools-%{version}-py%{python3_version}.egg-info %changelog +* Thu Nov 16 2023 zhangliangpengkun - 4.1.0-6 +- fix for python 3.7 deprecation warning about importing certain types from collections vs collections.abc + * Fri Nov 15 2019 sunguoshuai - 4.1.0-5 - Package init