summaryrefslogtreecommitdiff
path: root/dev-python/python-cinderclient
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-12 15:32:09 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-12 15:32:09 +0000
commitd1edfd3a57afc1db57e14cc58d3f28eea8eefd64 (patch)
treed5315c32caabd5ea57f0557a1b17681a6e12a435 /dev-python/python-cinderclient
parent983485e93d76602266889d23c963609073b75e51 (diff)
gentoo auto-resync : 12:11:2022 - 15:32:08
Diffstat (limited to 'dev-python/python-cinderclient')
-rw-r--r--dev-python/python-cinderclient/Manifest4
-rw-r--r--dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-argparse.patch54
-rw-r--r--dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-crashes.patch53
-rw-r--r--dev-python/python-cinderclient/python-cinderclient-9.1.0.ebuild7
4 files changed, 116 insertions, 2 deletions
diff --git a/dev-python/python-cinderclient/Manifest b/dev-python/python-cinderclient/Manifest
index 94fc3566b043..55d91b620cdb 100644
--- a/dev-python/python-cinderclient/Manifest
+++ b/dev-python/python-cinderclient/Manifest
@@ -1,3 +1,5 @@
+AUX python-cinderclient-9.1.0-fix-py3.11-argparse.patch 2529 BLAKE2B 28cc877b2e77ae034df5fcdfdbf12b9478eed4d952e547be76925cdc5d3932788f637fd2d043a1f7432f62cd3cffbe8a887279fe05956cf5ecfff645b94a7d55 SHA512 3b2f427a1d80ed9f5d0318cd738a6f3e3c0e1929febf8a872b1636843109cf3f4b44a81b371a35ce658562cf2563dac103fae8632bf06e856283b56a933dd507
+AUX python-cinderclient-9.1.0-fix-py3.11-crashes.patch 2148 BLAKE2B f7e8a4512e48689d1ce17d13c01ac9dd6c0b875b0ff67307e35d2f9d4e85b13d97ba660f8b53452eebe55a6919a4f52a18ca4b20f57529eae3ae64e187f75c31 SHA512 79fe4a908609994550067f96454f4a4c12268fdebb9c8fccf2dd09d239d208adbfacd5f5591a1d5dd29bdf711c6b38a4800b97826a373f10a8cad472a30ef87f
DIST python-cinderclient-9.1.0.tar.gz 234608 BLAKE2B 9ff63454e8162d731517ce2d98b6ea0c3cf04ef5a885e30afaa67444eb7f814c1ac205a0a216c7a3b92311be5687b9e2561aa02936e87b91ca61c8ea663e069f SHA512 2aa55331d5f372cccb946a4be2e25d4cc6a1d9d9676f1f32b9b51f141d107f74bcb1d0d7a5ef94b931fc5a5ccacb43f639db635217a7833d7738296734938f8b
-EBUILD python-cinderclient-9.1.0.ebuild 1334 BLAKE2B 72fb8eb502514f503789447f803d2ee1538519c9e129182b3100935afe215da17ab173a4e1e0d0310b4261b5ee603b72154e20ee70b5d3db82e8d63ea9537837 SHA512 2cafca3b9ba10e5b9f2084c38cf066a41f5923ea92e00c66c82a62f440b30541f2f0ef187bb421eb06064995cfcf8535a75e005b67414e945680d9ee00f18b9d
+EBUILD python-cinderclient-9.1.0.ebuild 1438 BLAKE2B 211ea96837679e08810eda0a1350f81d69299dfdc2cc803aba2a6320869c7e093f623c713a6f254231607dd74d259cf2b9fa1164a18fb9f850b217606d5277e7 SHA512 92165ff3605dbe60692b3bd2213a68487493fe5b4a5a6ab058b945127d8900225163a89e2dc39543424807b861ee3e20e9930c9f6700895801931380b8914863
MISC metadata.xml 727 BLAKE2B 0017cc08edf25f27b8a2816bc3ce1374148a17522bf2c5ea643ad10cde9f5779b1b6bf1e3c91627db76d2f77b8dcbfc87a29fb2cdd8064b3140fb14d1e6e00a1 SHA512 e30e64371f7a5f5fa506396f2edbbc7f862a585c7fe9af4f6fe63e99d4bbe9f9bf3a1f002a62c40ab9d75bd90ab99446bb80bf7f2fedf5b37287eeb54e5dacbe
diff --git a/dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-argparse.patch b/dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-argparse.patch
new file mode 100644
index 000000000000..863e4d93b298
--- /dev/null
+++ b/dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-argparse.patch
@@ -0,0 +1,54 @@
+https://review.opendev.org/c/openstack/python-cinderclient/+/851467
+From: Cyril Roelandt <cyril@redhat.com>
+Date: Thu, 28 Jul 2022 20:48:58 +0200
+Subject: [PATCH] Python3.11: Fix argparse-related test failures
+
+Closes-Bug: #1983054
+Change-Id: I2d4cb81a394f3c10e5f01945d894746a904fb5df
+--- a/cinderclient/tests/unit/test_shell.py
++++ b/cinderclient/tests/unit/test_shell.py
+@@ -376,7 +376,7 @@
+
+ self.mock_completion()
+
+- def test_load_versioned_actions(self):
++ def test_load_versioned_actions_v3_0(self):
+ parser = cinderclient.shell.CinderClientArgumentParser()
+ subparsers = parser.add_subparsers(metavar='<subcommand>')
+ shell = cinderclient.shell.OpenStackCinderShell()
+@@ -388,6 +388,10 @@
+ "fake_action 3.0 to 3.1",
+ shell.subcommands['fake-action'].get_default('func')())
+
++ def test_load_versioned_actions_v3_2(self):
++ parser = cinderclient.shell.CinderClientArgumentParser()
++ subparsers = parser.add_subparsers(metavar='<subcommand>')
++ shell = cinderclient.shell.OpenStackCinderShell()
+ shell.subcommands = {}
+ shell._find_actions(subparsers, fake_actions_module,
+ api_versions.APIVersion("3.2"), False, [])
+@@ -521,7 +525,7 @@
+
+ @mock.patch.object(cinderclient.shell.CinderClientArgumentParser,
+ 'add_argument')
+- def test_load_actions_with_versioned_args(self, mock_add_arg):
++ def test_load_actions_with_versioned_args_v36(self, mock_add_arg):
+ parser = cinderclient.shell.CinderClientArgumentParser(add_help=False)
+ subparsers = parser.add_subparsers(metavar='<subcommand>')
+ shell = cinderclient.shell.OpenStackCinderShell()
+@@ -533,8 +537,13 @@
+ self.assertNotIn(mock.call('--foo', help="second foo"),
+ mock_add_arg.call_args_list)
+
+- mock_add_arg.reset_mock()
+-
++ @mock.patch.object(cinderclient.shell.CinderClientArgumentParser,
++ 'add_argument')
++ def test_load_actions_with_versioned_args_v39(self, mock_add_arg):
++ parser = cinderclient.shell.CinderClientArgumentParser(add_help=False)
++ subparsers = parser.add_subparsers(metavar='<subcommand>')
++ shell = cinderclient.shell.OpenStackCinderShell()
++ shell.subcommands = {}
+ shell._find_actions(subparsers, fake_actions_module,
+ api_versions.APIVersion("3.9"), False, [])
+ self.assertNotIn(mock.call('--foo', help="first foo"),
diff --git a/dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-crashes.patch b/dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-crashes.patch
new file mode 100644
index 000000000000..3f86c3a50ade
--- /dev/null
+++ b/dev-python/python-cinderclient/files/python-cinderclient-9.1.0-fix-py3.11-crashes.patch
@@ -0,0 +1,53 @@
+https://review.opendev.org/c/openstack/python-cinderclient/+/851446
+From: Cyril Roelandt <cyril@redhat.com>
+Date: Thu, 28 Jul 2022 20:14:36 +0200
+Subject: [PATCH] Python3.11: fix crashes in ShellTest
+
+Closes-Bug: #1983047
+Change-Id: If20abef109ddd7107c83b5886beb666a6550a640
+--- a/cinderclient/tests/unit/test_shell.py
++++ b/cinderclient/tests/unit/test_shell.py
+@@ -120,9 +120,9 @@
+ # Some expected help output, including microversioned commands
+ required = [
+ r'.*?^usage: ',
+- r'.*?(?m)^\s+create\s+Creates a volume.',
+- r'.*?(?m)^\s+summary\s+Get volumes summary.',
+- r'.*?(?m)^Run "cinder help SUBCOMMAND" for help on a subcommand.',
++ r'.*?^\s+create\s+Creates a volume.',
++ r'.*?^\s+summary\s+Get volumes summary.',
++ r'.*?^Run "cinder help SUBCOMMAND" for help on a subcommand.',
+ ]
+ help_text = self.shell('help')
+ for r in required:
+@@ -132,7 +132,7 @@
+ def test_help_on_subcommand(self):
+ required = [
+ r'.*?^usage: cinder list',
+- r'.*?(?m)^Lists all volumes.',
++ r'.*?^Lists all volumes.',
+ ]
+ help_text = self.shell('help list')
+ for r in required:
+@@ -142,7 +142,7 @@
+ def test_help_on_subcommand_mv(self):
+ required = [
+ r'.*?^usage: cinder summary',
+- r'.*?(?m)^Get volumes summary.',
++ r'.*?^Get volumes summary.',
+ ]
+ help_text = self.shell('help summary')
+ for r in required:
+@@ -152,9 +152,9 @@
+ def test_help_arg_no_subcommand(self):
+ required = [
+ r'.*?^usage: ',
+- r'.*?(?m)^\s+create\s+Creates a volume.',
+- r'.*?(?m)^\s+summary\s+Get volumes summary.',
+- r'.*?(?m)^Run "cinder help SUBCOMMAND" for help on a subcommand.',
++ r'.*?^\s+create\s+Creates a volume.',
++ r'.*?^\s+summary\s+Get volumes summary.',
++ r'.*?^Run "cinder help SUBCOMMAND" for help on a subcommand.',
+ ]
+ help_text = self.shell('--os-volume-api-version 3.40')
+ for r in required:
diff --git a/dev-python/python-cinderclient/python-cinderclient-9.1.0.ebuild b/dev-python/python-cinderclient/python-cinderclient-9.1.0.ebuild
index 6aa69f0ac442..1195ce14c1c5 100644
--- a/dev-python/python-cinderclient/python-cinderclient-9.1.0.ebuild
+++ b/dev-python/python-cinderclient/python-cinderclient-9.1.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
@@ -39,6 +39,11 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-py3.11-argparse.patch"
+ "${FILESDIR}/${P}-fix-py3.11-crashes.patch"
+)
+
distutils_enable_tests unittest
python_test() {