From f4f40f2a666e8c413793e6af1966235d948e5891 Mon Sep 17 00:00:00 2001
From: mcepl <>
Date: May 05 2022 21:12:31 +0000
Subject: Update python-kubernetes to version 23.3.0 / rev 15 via SR 974767


https://build.opensuse.org/request/show/974767
by user mcepl + dimstar_suse
- version update to 23.3.0
  too many changes, see CHANGELOG.md in documentation or at
  https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md
- Add python-kubernetes-no-mock.patch to allow building and use
  without external mock package dependency.

---

diff --git a/.files b/.files
index bb17777..7d3fdfd 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index f89624a..823feaa 100644
--- a/.rev
+++ b/.rev
@@ -164,4 +164,17 @@
     - `spec.additionalPrinterColumns` is removed in v1; use `spec.versions[*].additionalPrinterColumns` instead</comment>
     <requestid>857126</requestid>
   </revision>
+  <revision rev="15" vrev="1">
+    <srcmd5>3c8b221da0031ef4c530803137002b08</srcmd5>
+    <version>23.3.0</version>
+    <time>1651784676</time>
+    <user>dimstar_suse</user>
+    <comment>- version update to 23.3.0
+  too many changes, see CHANGELOG.md in documentation or at
+  https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md
+- Add python-kubernetes-no-mock.patch to allow building and use
+  without external mock package dependency.
+</comment>
+    <requestid>974767</requestid>
+  </revision>
 </revisionlist>
diff --git a/kubernetes-12.0.1.tar.gz b/kubernetes-12.0.1.tar.gz
deleted file mode 120000
index e3ed39f..0000000
--- a/kubernetes-12.0.1.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-/ipfs/bafybeidofj5hsr4uvo6ogyocbsjirdalhkprdvonmtjgt5zwt22qdj45rq
\ No newline at end of file
diff --git a/kubernetes-23.3.0.tar.gz b/kubernetes-23.3.0.tar.gz
new file mode 120000
index 0000000..abd7a90
--- /dev/null
+++ b/kubernetes-23.3.0.tar.gz
@@ -0,0 +1 @@
+/ipfs/bafybeif46ij3ybr6yd6woazkczhlfp4hjrkekmylfarjnpy3cqudxjw5uq
\ No newline at end of file
diff --git a/python-kubernetes-no-mock.patch b/python-kubernetes-no-mock.patch
new file mode 100644
index 0000000..51d01a3
--- /dev/null
+++ b/python-kubernetes-no-mock.patch
@@ -0,0 +1,39 @@
+Index: kubernetes-23.3.0/kubernetes/config/exec_provider_test.py
+===================================================================
+--- kubernetes-23.3.0.orig/kubernetes/config/exec_provider_test.py
++++ kubernetes-23.3.0/kubernetes/config/exec_provider_test.py
+@@ -15,7 +15,7 @@
+ import os
+ import unittest
+ 
+-import mock
++from unittest import mock
+ 
+ from .config_exception import ConfigException
+ from .exec_provider import ExecProvider
+Index: kubernetes-23.3.0/kubernetes/config/kube_config_test.py
+===================================================================
+--- kubernetes-23.3.0.orig/kubernetes/config/kube_config_test.py
++++ kubernetes-23.3.0/kubernetes/config/kube_config_test.py
+@@ -22,7 +22,7 @@ import tempfile
+ import unittest
+ from collections import namedtuple
+ 
+-import mock
++from unittest import mock
+ import yaml
+ from six import PY3, next
+ 
+Index: kubernetes-23.3.0/kubernetes/watch/watch_test.py
+===================================================================
+--- kubernetes-23.3.0.orig/kubernetes/watch/watch_test.py
++++ kubernetes-23.3.0/kubernetes/watch/watch_test.py
+@@ -14,7 +14,7 @@
+ 
+ import unittest
+ 
+-from mock import Mock, call
++from unittest.mock import Mock, call
+ 
+ from kubernetes import client
+ 
diff --git a/python-kubernetes.changes b/python-kubernetes.changes
index 75fe505..cf249a1 100644
--- a/python-kubernetes.changes
+++ b/python-kubernetes.changes
@@ -1,4 +1,13 @@
 -------------------------------------------------------------------
+Tue May  3 06:28:36 UTC 2022 - pgajdos@suse.com
+
+- version update to 23.3.0
+  too many changes, see CHANGELOG.md in documentation or at
+  https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md
+- Add python-kubernetes-no-mock.patch to allow building and use
+  without external mock package dependency.
+
+-------------------------------------------------------------------
 Sun Dec 20 10:06:34 UTC 2020 - Dirk Müller <dmueller@suse.com>
 
 - update to 12.0.1:
diff --git a/python-kubernetes.spec b/python-kubernetes.spec
index d171e38..94ef158 100644
--- a/python-kubernetes.spec
+++ b/python-kubernetes.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package python-kubernetes
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,18 +17,19 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without python2
+%define skip_python2 1
 Name:           python-kubernetes
-Version:        12.0.1
+Version:        23.3.0
 Release:        0
 Summary:        Kubernetes python client
 License:        Apache-2.0
 URL:            https://github.com/kubernetes-incubator/client-python
 Source:         https://files.pythonhosted.org/packages/source/k/kubernetes/kubernetes-%{version}.tar.gz
-BuildRequires:  %{python_module PyYAML >= 3.12}
+# https://github.com/kubernetes-client/python/issues/1790
+Patch0:         python-kubernetes-no-mock.patch
+BuildRequires:  %{python_module PyYAML >= 5.4.1}
 BuildRequires:  %{python_module certifi >= 14.05.14}
 BuildRequires:  %{python_module google-auth >= 1.0.1}
-BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pluggy}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module python-dateutil >= 2.5.3}
@@ -41,7 +42,7 @@ BuildRequires:  %{python_module urllib3 >= 1.23}
 BuildRequires:  %{python_module websocket-client >= 0.32.0}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-PyYAML >= 3.12
+Requires:       python-PyYAML >= 5.4.1
 Requires:       python-certifi >= 14.05.14
 Requires:       python-google-auth >= 1.0.1
 Requires:       python-python-dateutil >= 2.5.3
@@ -52,19 +53,13 @@ Requires:       python-six >= 1.9.0
 Requires:       python-urllib3 >= 1.24.2
 Requires:       python-websocket-client >= 0.32.0
 BuildArch:      noarch
-%if %{with python2}
-BuildRequires:  python-ipaddress >= 1.0.17
-%endif
-%ifpython2
-Requires:       python-ipaddress >= 1.0.17
-%endif
 %python_subpackages
 
 %description
 Python client for kubernetes http://kubernetes.io/
 
 %prep
-%setup -q -n kubernetes-%{version}
+%autosetup -p1 -n kubernetes-%{version}
 
 %build
 %python_build
@@ -77,6 +72,7 @@ Python client for kubernetes http://kubernetes.io/
 # quote CONTRIBUTING.md:
 # 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
 %pytest
 
 %files %{python_files}