Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-kubernetes for 
openSUSE:Factory checked in at 2025-06-11 16:19:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-kubernetes (Old)
 and      /work/SRC/openSUSE:Factory/.python-kubernetes.new.19631 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-kubernetes"

Wed Jun 11 16:19:52 2025 rev:31 rq:1284759 version:33.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-kubernetes/python-kubernetes.changes      
2025-02-05 12:40:03.139625223 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-kubernetes.new.19631/python-kubernetes.changes
   2025-06-11 16:20:22.985098316 +0200
@@ -1,0 +2,22 @@
+Wed Jun 11 09:26:29 UTC 2025 - Priyanka Saggu <priyanka.sa...@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.sa...@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
+
+-------------------------------------------------------------------

Old:
----
  kubernetes-31.0.0.tar.gz

New:
----
  fix-exec-provider-test-sle-15-sp4.patch
  kubernetes-33.1.0.tar.gz

BETA DEBUG BEGIN:
  New:
- 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)
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-kubernetes.spec ++++++
--- /var/tmp/diff_new_pack.PJ0k2E/_old  2025-06-11 16:20:23.789131827 +0200
+++ /var/tmp/diff_new_pack.PJ0k2E/_new  2025-06-11 16:20:23.789131827 +0200
@@ -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 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 @@
 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 @@
 # 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}

++++++ fix-exec-provider-test-sle-15-sp4.patch ++++++
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__':

++++++ kubernetes-31.0.0.tar.gz -> kubernetes-33.1.0.tar.gz ++++++
++++ 80967 lines of diff (skipped)

Reply via email to