From f1247b43c769eb491d0fd702a61f7982ddde004b Mon Sep 17 00:00:00 2001 From: tzing_t Date: Fri, 31 May 2024 08:53:08 +0000 Subject: [PATCH] Replace deprecated import ABCs from collections (cherry picked from commit 63e9e93f2da227bfa599bcdaaa600a5ed9acdf62) --- ...recated_import_ABCs_from_collections.patch | 22 +++++++++++++++++++ python-taskflow.spec | 8 +++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Replace_deprecated_import_ABCs_from_collections.patch diff --git a/Replace_deprecated_import_ABCs_from_collections.patch b/Replace_deprecated_import_ABCs_from_collections.patch new file mode 100644 index 0000000..921f9bc --- /dev/null +++ b/Replace_deprecated_import_ABCs_from_collections.patch @@ -0,0 +1,22 @@ +diff --git a/taskflow/utils/misc.py b/taskflow/utils/misc.py +index 421449d..65a93e2 100644 +--- a/taskflow/utils/misc.py ++++ b/taskflow/utils/misc.py +@@ -15,7 +15,7 @@ + # License for the specific language governing permissions and limitations + # under the License. + +-import collections ++import collections.abc + import contextlib + import datetime + import inspect +@@ -525,7 +525,7 @@ def is_iterable(obj): + :return: True if object is iterable and is not a string + """ + return (not isinstance(obj, six.string_types) and +- isinstance(obj, collections.Iterable)) ++ isinstance(obj, collections.abc.Iterable)) + + + def safe_copy_dict(obj): diff --git a/python-taskflow.spec b/python-taskflow.spec index 171cfa7..945dc7a 100644 --- a/python-taskflow.spec +++ b/python-taskflow.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-taskflow Version: 4.6.0 -Release: 1 +Release: 2 Summary: Taskflow structured state management library. License: Apache-2.0 URL: https://docs.openstack.org/taskflow/latest/ Source0: https://files.pythonhosted.org/packages/77/02/5cf0d578ba17c2b68aeed41165a0dac5929bad78385108a4c42e349351cd/taskflow-4.6.0.tar.gz +Patch01: Replace_deprecated_import_ABCs_from_collections.patch BuildArch: noarch %description A library to do [jobs, tasks, flows] in a highly available, easy to understand @@ -80,7 +81,7 @@ A library to do [jobs, tasks, flows] in a highly available, easy to understand and declarative manner (and more!) to be used with OpenStack and other projects. %prep -%autosetup -n taskflow-%{version} +%autosetup -n taskflow-%{version} -p1 %build %py3_build @@ -121,6 +122,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Sat May 25 2024 tzing_t - 4.6.0-2 +- Replace deprecated import ABCs from collections + * Mon Aug 09 2021 OpenStack_SIG - 4.6.0-1 - Package Spec generate -- Gitee