From 736bc3df7dc2792ee50ecec9e3e12fc50acc36c31258620f301cd2b23df95e42 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 3 Feb 2022 01:39:35 +0000 Subject: [PATCH] - Add patch support-python-310.patch: * Support Python 3.10. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dictknife?expand=0&rev=5 --- python-dictknife.changes | 6 ++++++ python-dictknife.spec | 10 +++++----- support-python-310.patch | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 support-python-310.patch diff --git a/python-dictknife.changes b/python-dictknife.changes index f2d1c39..aa3d50c 100644 --- a/python-dictknife.changes +++ b/python-dictknife.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 3 01:38:47 UTC 2022 - Steve Kowalik + +- Add patch support-python-310.patch: + * Support Python 3.10. + ------------------------------------------------------------------- Mon Dec 13 13:55:39 UTC 2021 - Guillaume GARDET diff --git a/python-dictknife.spec b/python-dictknife.spec index b1d5c76..e899db9 100644 --- a/python-dictknife.spec +++ b/python-dictknife.spec @@ -1,7 +1,7 @@ # # spec file for package python-dictknife # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,9 +16,8 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -%define skip_python36 1 Name: python-dictknife Version: 0.13.0 Release: 0 @@ -26,6 +25,7 @@ Summary: Army knife of handling data License: MIT URL: https://github.com/podhmo/dictknife Source: https://github.com/podhmo/dictknife/archive/%{version}.tar.gz#/dictknife-%{version}.tar.gz +Patch0: support-python-310.patch BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module google-api-python-client} BuildRequires: %{python_module jsonpatch} @@ -38,7 +38,7 @@ BuildRequires: %{python_module toml} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives Suggests: python-PyYAML Suggests: python-google-api-python-client Suggests: python-jsonpatch @@ -57,7 +57,7 @@ Includes jsonknife for splitting files and dereferencing JSON using JSON pointer syntax. %prep -%setup -q -n dictknife-%{version} +%autosetup -p1 -n dictknife-%{version} %build %python_build diff --git a/support-python-310.patch b/support-python-310.patch new file mode 100644 index 0000000..dfea071 --- /dev/null +++ b/support-python-310.patch @@ -0,0 +1,33 @@ +Index: dictknife-0.13.0/dictknife/tests/cliutils/test_extraarguments.py +=================================================================== +--- dictknife-0.13.0.orig/dictknife/tests/cliutils/test_extraarguments.py ++++ dictknife-0.13.0/dictknife/tests/cliutils/test_extraarguments.py +@@ -1,3 +1,4 @@ ++import sys + import textwrap + import unittest + +@@ -22,18 +23,21 @@ class Tests(unittest.TestCase): + return target + + def test_help_message(self): ++ ending = "al arguments" ++ if sys.version_info >= (3, 10): ++ ending ="s" + target = self._makeOne() + expected = textwrap.dedent( + """ + usage: cmd [-h] + +- optional arguments: ++ option%s: + -h, --help show this help message and exit + + extra arguments: (with --extra