From af363e14f7549a4f56a83415e65078275bdb5bfc Mon Sep 17 00:00:00 2001 From: psaggu <> Date: Jun 11 2025 14:52:36 +0000 Subject: Update python-kubernetes to version 33.1.0 / rev 31 via SR 1284759 https://build.opensuse.org/request/show/1284759 by user psaggu + anag_factory - version update to 33.1.0 * please refer to the changelog at https://github.com/kubernetes-client/python/blob/v33.1.0/CHANGELOG.md#v3310 - add patch: fix-exec-provider-test-sle-15-sp4.patch * Patch file to fix failing kubernetes.config.exec_provider_test.ExecProviderTest during package build against SLE-15 SP4 (w/ Python 3.6.15, pytest-5.4.3, py-1.10.0, pluggy-0.13.1) --- diff --git a/.files b/.files index 4dcc3ed..c1689a2 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index a692bb8..e0fa2c5 100644 --- a/.rev +++ b/.rev @@ -312,4 +312,16 @@ gh#kubernetes-client/python#2178 - merged upstream and released. * please refer to the changelog at https://github.com/kubernetes-client/python/blob/v31.0.0/CHANGELOG.md#v3100 </comment> <requestid>1243096</requestid> </revision> + <revision rev="31" vrev="1"> + <srcmd5>7ac5323d39ec1065107f23b18b76d22d</srcmd5> + <version>33.1.0</version> + <time>1749651592</time> + <user>anag_factory</user> + <comment>- version update to 33.1.0 +* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v33.1.0/CHANGELOG.md#v3310 + +- add patch: fix-exec-provider-test-sle-15-sp4.patch +* Patch file to fix failing kubernetes.config.exec_provider_test.ExecProviderTest during package build against SLE-15 SP4 (w/ Python 3.6.15, pytest-5.4.3, py-1.10.0, pluggy-0.13.1)</comment> + <requestid>1284759</requestid> + </revision> </revisionlist> diff --git a/fix-exec-provider-test-sle-15-sp4.patch b/fix-exec-provider-test-sle-15-sp4.patch new file mode 100644 index 0000000..a6104ab --- /dev/null +++ b/fix-exec-provider-test-sle-15-sp4.patch @@ -0,0 +1,51 @@ +Index: kubernetes-33.1.0/kubernetes/config/exec_provider.py +=================================================================== +--- kubernetes-33.1.0.orig/kubernetes/config/exec_provider.py ++++ kubernetes-33.1.0/kubernetes/config/exec_provider.py +@@ -58,15 +58,6 @@ class ExecProvider(object): + else: + self.cluster = None + self.cwd = cwd or None +- +- @property +- def shell(self): +- # for windows systems `shell` should be `True` +- # for other systems like linux or darwin `shell` should be `False` +- # referenes: +- # https://github.com/kubernetes-client/python/pull/2289 +- # https://docs.python.org/3/library/sys.html#sys.platform +- return sys.platform in ("win32", "cygwin") + + def run(self, previous_response=None): + is_interactive = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty() +@@ -91,7 +82,7 @@ class ExecProvider(object): + cwd=self.cwd, + env=self.env, + universal_newlines=True, +- shell=self.shell) ++ shell=True) + (stdout, stderr) = process.communicate() + exit_code = process.wait() + if exit_code != 0: +Index: kubernetes-33.1.0/kubernetes/config/exec_provider_test.py +=================================================================== +--- kubernetes-33.1.0.orig/kubernetes/config/exec_provider_test.py ++++ kubernetes-33.1.0/kubernetes/config/exec_provider_test.py +@@ -180,8 +180,15 @@ class ExecProviderTest(unittest.TestCase + self.assertTrue(isinstance(result, dict)) + self.assertTrue('token' in result) + +- obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO']) +- self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com') ++ #obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO']) ++ #self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com') ++ # Check the KUBERNETES_EXEC_INFO env var ++ args, kwargs = mock.call_args ++ env = kwargs['env'] ++ exec_info = json.loads(env['KUBERNETES_EXEC_INFO']) ++ ++ self.assertIn('cluster', exec_info['spec']) ++ self.assertEqual(exec_info['spec']['cluster']['server'], 'name.company.com') + + + if __name__ == '__main__': diff --git a/kubernetes-31.0.0.tar.gz b/kubernetes-31.0.0.tar.gz deleted file mode 120000 index 2216409..0000000 --- a/kubernetes-31.0.0.tar.gz +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeidprtafxbwbbblosbjc5gvodt5vx6vqnb4qrmq7j3loefbcqj25ay \ No newline at end of file diff --git a/kubernetes-33.1.0.tar.gz b/kubernetes-33.1.0.tar.gz new file mode 120000 index 0000000..6d2b148 --- /dev/null +++ b/kubernetes-33.1.0.tar.gz @@ -0,0 +1 @@ +/ipfs/bafybeiay72o4esqitptxxbzjoroq5ndp6c6jdlysjid6v2tu3f5enrvtgq \ No newline at end of file diff --git a/python-kubernetes.changes b/python-kubernetes.changes index 9cac4d1..a0c42c7 100644 --- a/python-kubernetes.changes +++ b/python-kubernetes.changes @@ -1,4 +1,26 @@ ------------------------------------------------------------------- +Wed Jun 11 09:26:29 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com> + +- add patch: fix-exec-provider-test-sle-15-sp4.patch + * Patch file to fix failing kubernetes.config.exec_provider_test.ExecProviderTest during package build against SLE-15 SP4 (w/ Python 3.6.15, pytest-5.4.3, py-1.10.0, pluggy-0.13.1) + * Patch fixes the following error: + ``` + > obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO']) + E TypeError: tuple indices must be integers or slices, not str + ``` + + +------------------------------------------------------------------- +Wed Jun 11 05:38:52 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com> + +- version update to 33.1.0 + * please refer to the changelog at https://github.com/kubernetes-client/python/blob/v33.1.0/CHANGELOG.md#v3310 + +- update build requirements: + `BuildConflicts: %{python_module websocket-client = 0.40.0}` + * please refer: https://github.com/kubernetes-client/python/blob/v33.1.0/requirements.txt#L7 + +------------------------------------------------------------------- Tue Feb 4 11:10:26 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com> - version update to 31.0.0 diff --git a/python-kubernetes.spec b/python-kubernetes.spec index fc8ec92..647b28c 100644 --- a/python-kubernetes.spec +++ b/python-kubernetes.spec @@ -18,13 +18,16 @@ %{?sle15_python_module_pythons} Name: python-kubernetes -Version: 31.0.0 +Version: 33.1.0 Release: 0 Summary: Kubernetes python client License: Apache-2.0 URL: https://github.com/kubernetes-client/python # Source tar - https://pypi.org/project/kubernetes/#files Source: https://files.pythonhosted.org/packages/source/k/kubernetes/kubernetes-%{version}.tar.gz +# Patch file to fix failing kubernetes.config.exec_provider_test.ExecProviderTest +# in SLE-15 SP4 (Python 3.6.15, pytest-5.4.3, py-1.10.0, pluggy-0.13.1) +Patch1: fix-exec-provider-test-sle-15-sp4.patch BuildRequires: %{python_module PyYAML >= 5.4.1} BuildRequires: %{python_module certifi >= 14.05.14} BuildRequires: %{python_module durationpy >= 0.7} @@ -37,6 +40,7 @@ BuildRequires: %{python_module setuptools >= 21.0.0} BuildRequires: %{python_module six >= 1.9.0} BuildRequires: %{python_module urllib3 >= 1.24.2} BuildRequires: %{python_module websocket-client >= 0.32.0} +BuildConflicts: %{python_module websocket-client = 0.40.0} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -68,7 +72,10 @@ BuildArch: noarch Python client for kubernetes http://kubernetes.io/ %prep -%autosetup -p1 -n kubernetes-%{version} +%setup -q -n kubernetes-%{version} +%if 0%{?sle_version} && 0%{?sle_version} == 150400 +%patch -P 1 -p1 +%endif %build %if 0%{?sle_version} && 0%{?sle_version} >= 150500 @@ -96,6 +103,7 @@ Python client for kubernetes http://kubernetes.io/ # 2. [End to end tests](kubernetes/e2e_test): these are tests that can only be verified with a live kubernetes server. rm kubernetes/dynamic/test_client.py rm kubernetes/dynamic/test_discovery.py +cat kubernetes/config/exec_provider_test.py %pytest %files %{python_files}