1
0

11 Commits

Author SHA256 Message Date
7d6160be35 Accepting request 1309762 from devel:kubic
- version update to 34.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v34.1.0/CHANGELOG.md#v3410

- updated patch: fix-exec-provider-test-sle-15-sp4.patch
- remove pinneded verion dependency from python-oauthlib module

OBS-URL: https://build.opensuse.org/request/show/1309762
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-kubernetes?expand=0&rev=32
2025-10-09 12:59:52 +00:00
Priyanka Saggu
91f7b5e2c9 - version update to 34.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v34.1.0/CHANGELOG.md#v3410

- updated patch: fix-exec-provider-test-sle-15-sp4.patch
- remove pinneded verion dependency from python-oauthlib module

OBS-URL: https://build.opensuse.org/package/show/devel:kubic/python-kubernetes?expand=0&rev=32
2025-10-08 08:02:39 +00:00
734555e3c5 Accepting request 1284759 from devel:kubic
- 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)

OBS-URL: https://build.opensuse.org/request/show/1284759
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-kubernetes?expand=0&rev=31
2025-06-11 14:19:52 +00:00
Priyanka Saggu
f65cd11f72 - 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)

OBS-URL: https://build.opensuse.org/package/show/devel:kubic/python-kubernetes?expand=0&rev=30
2025-06-11 10:14:59 +00:00
ec46b49a6f Accepting request 1243096 from devel:kubic
- version update to 31.0.0
  * please refer to the changelog at https://github.com/kubernetes-client/python/blob/v31.0.0/CHANGELOG.md#v3100

OBS-URL: https://build.opensuse.org/request/show/1243096
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-kubernetes?expand=0&rev=30
2025-02-05 11:39:51 +00:00
Priyanka Saggu
46ba5619b7 - version update to 31.0.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v31.0.0/CHANGELOG.md#v3100 
- update build requirements:
  `BuildRequires:  %{python_module durationpy >= 0.7}`
  `Requires:       python-durationpy >= 0.7`

OBS-URL: https://build.opensuse.org/package/show/devel:kubic/python-kubernetes?expand=0&rev=28
2025-02-04 12:04:20 +00:00
6ca1c8cb72 Accepting request 1221322 from devel:kubic
- version update to 30.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v30.1.0/CHANGELOG.md#v3010

- remove patch: - kubernetes-client-python-pr2178-assertEqual-py312.patch
gh#kubernetes-client/python#2178 - merged upstream and released.

- Fix formatting of if/else conditional blocks for build/install section

OBS-URL: https://build.opensuse.org/request/show/1221322
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-kubernetes?expand=0&rev=29
2024-11-05 14:40:42 +00:00
Priyanka Saggu
53e5790039 - version update to 30.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v30.1.0/CHANGELOG.md#v3010

- remove patch: - kubernetes-client-python-pr2178-assertEqual-py312.patch
  gh#kubernetes-client/python#2178 - merged upstream and released.

- Fix formatting of if/else conditional blocks for build/install section

OBS-URL: https://build.opensuse.org/package/show/devel:kubic/python-kubernetes?expand=0&rev=26
2024-11-05 07:10:34 +00:00
Priyanka Saggu
2263b9e67a - version update to 30.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v30.1.0/CHANGELOG.md#v3010

- remove patch: - kubernetes-client-python-pr2178-assertEqual-py312.patch
  gh#kubernetes-client/python#2178 - merged upstream and released.

OBS-URL: https://build.opensuse.org/package/show/devel:kubic/python-kubernetes?expand=0&rev=25
2024-11-04 04:48:09 +00:00
5b5e941ae4 Accepting request 1218812 from devel:kubic
OBS-URL: https://build.opensuse.org/request/show/1218812
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-kubernetes?expand=0&rev=28
2024-10-29 13:32:14 +00:00
Priyanka Saggu
dbb0a6970f add %{?sle15_python_module_pythons} to spec
OBS-URL: https://build.opensuse.org/package/show/devel:kubic/python-kubernetes?expand=0&rev=23
2024-10-28 12:33:44 +00:00
6 changed files with 160 additions and 33 deletions

View File

@@ -0,0 +1,64 @@
Index: kubernetes-34.1.0/kubernetes/config/exec_provider.py
===================================================================
--- kubernetes-34.1.0.orig/kubernetes/config/exec_provider.py
+++ kubernetes-34.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()
@@ -96,7 +87,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-34.1.0/kubernetes/config/exec_provider_test.py
===================================================================
--- kubernetes-34.1.0.orig/kubernetes/config/exec_provider_test.py
+++ kubernetes-34.1.0/kubernetes/config/exec_provider_test.py
@@ -180,7 +180,14 @@ 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'])
+ #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']
+ obj = json.loads(env['KUBERNETES_EXEC_INFO'])
+
+ self.assertIn('cluster', obj['spec'])
self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com')
@mock.patch("subprocess.Popen")
@@ -211,7 +218,13 @@ 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"])
+ #obj = json.loads(mock.call_args.kwargs["env"]["KUBERNETES_EXEC_INFO"])
+ # Check the KUBERNETES_EXEC_INFO env var
+ args, kwargs = mock.call_args
+ env = kwargs['env']
+ obj = json.loads(env['KUBERNETES_EXEC_INFO'])
+
+ self.assertIn('cluster', obj['spec'])
self.assertEqual(obj["spec"]["cluster"]["server"], "name.company.com")
self.assertEqual(obj["spec"]["cluster"]["config"]["namespace"], "myproject")
self.assertEqual(obj["spec"]["cluster"]["config"]["name"], "mycluster")

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1468069a573430fb1cb5ad22876868f57977930f80a6749405da31cd6086a7e9
size 817854

3
kubernetes-34.1.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8fe8edb0b5d290a2f3ac06596b23f87c658977d46b5f8df9d0f4ea83d0003912
size 1083771

View File

@@ -1,22 +0,0 @@
From 346e28acab1877906d0d1c817ee16ac6a11a4f8a Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Sat, 13 Jan 2024 22:25:26 +0100
Subject: [PATCH] Replace deprecated assertEquals call
---
kubernetes/base/config/kube_config_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kubernetes/base/config/kube_config_test.py b/kubernetes/base/config/kube_config_test.py
index b415492032..1c8bbbe64d 100644
--- a/kubernetes/config/kube_config_test.py
+++ b/kubernetes/config/kube_config_test.py
@@ -1615,7 +1615,7 @@ def test__get_kube_config_loader_file_persist(self):
actual = _get_kube_config_loader(filename=config_file,
persist_config=True)
self.assertTrue(callable(actual._config_persister))
- self.assertEquals(actual._config_persister.__name__, "save_changes")
+ self.assertEqual(actual._config_persister.__name__, "save_changes")
def test__get_kube_config_loader_dict_no_persist(self):
expected = FakeConfig(host=TEST_HOST,

View File

@@ -1,3 +1,65 @@
-------------------------------------------------------------------
Wed Oct 8 07:19:11 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com>
- version update to 34.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v34.1.0/CHANGELOG.md#v3410
- updated patch: fix-exec-provider-test-sle-15-sp4.patch
- remove pinneded verion dependency from python-oauthlib module
-------------------------------------------------------------------
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
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v31.0.0/CHANGELOG.md#v3100
- update build requirements:
`BuildRequires: %{python_module durationpy >= 0.7}`
`Requires: python-durationpy >= 0.7`
-------------------------------------------------------------------
Mon Nov 4 04:42:43 UTC 2024 - Priyanka Saggu <priyanka.saggu@suse.com>
- version update to 30.1.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v30.1.0/CHANGELOG.md#v3010
- remove patch: - kubernetes-client-python-pr2178-assertEqual-py312.patch
gh#kubernetes-client/python#2178 - merged upstream and released.
-------------------------------------------------------------------
Mon Oct 28 13:05:22 UTC 2024 - Priyanka Saggu <priyanka.saggu@suse.com>
- version update to 29.0.0
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v29.0.0/CHANGELOG.md#v2900
-------------------------------------------------------------------
Thu Sep 26 21:17:01 UTC 2024 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Fixed %{?sle15_python_module_pythons}, jsc#PED-8481
-------------------------------------------------------------------
Thu Jan 18 19:52:07 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-kubernetes
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,22 @@
#
%{?sle15_python_module_pythons}
Name: python-kubernetes
Version: 28.1.0
Version: 34.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-FIX-UPSTREAM kubernetes-client-python-pr2178-assertEqual-py312.patch gh#kubernetes-client/python#2178
Patch0: kubernetes-client-python-pr2178-assertEqual-py312.patch
# 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}
BuildRequires: %{python_module google-auth >= 1.0.1}
BuildRequires: %{python_module oauthlib >= 3.2.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module python-dateutil >= 2.5.3}
BuildRequires: %{python_module requests-oauthlib}
@@ -38,19 +40,22 @@ 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
# SECTION test requirements
BuildRequires: %{python_module Sphinx >= 1.4}
BuildRequires: %{python_module oauthlib}
BuildRequires: %{python_module pluggy >= 0.3.1}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module recommonmark}
# /SECTION
Requires: python-oauthlib
Requires: python-PyYAML >= 5.4.1
Requires: python-certifi >= 14.05.14
Requires: python-durationpy >= 0.7
Requires: python-google-auth >= 1.0.1
Requires: python-oauthlib >= 3.2.2
Requires: python-python-dateutil >= 2.5.3
Requires: python-requests
Requires: python-requests-oauthlib
@@ -64,13 +69,30 @@ 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
%bcond_without pyproject
%else
%bcond_with pyproject
%endif
%if %{with pyproject}
%pyproject_wheel
%else
%python_build
%endif
%install
%if %{with pyproject}
%pyproject_install
%else
%python_install
%endif
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -78,12 +100,13 @@ 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}
%license LICENSE
%doc README.md CHANGELOG.md
%{python_sitelib}/kubernetes
%{python_sitelib}/kubernetes-%{version}.dist-info
%{python_sitelib}/kubernetes-%{version}*-info
%changelog