15
0

- 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
This commit is contained in:
2022-02-03 01:39:35 +00:00
committed by Git OBS Bridge
parent 032b8ace45
commit 736bc3df7d
3 changed files with 44 additions and 5 deletions

33
support-python-310.patch Normal file
View File

@@ -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<option>)
for --format=json:
--sort-keys sort keys
- """
+ """ % (ending,)
).strip()
actual = target.parser.format_help().strip()