From f8f0d89aabea55e5badb054459c3d08f75f039cf Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Thu, 27 Apr 2017 21:08:50 -0500 Subject: [PATCH 1/2] fix for #187 failure when using RFC 6902 json-patch operation --- kubernetes/client/rest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/client/rest.py b/kubernetes/client/rest.py index 826d4467b..8b3a5dabd 100644 --- a/kubernetes/client/rest.py +++ b/kubernetes/client/rest.py @@ -154,8 +154,8 @@ def request(self, method, url, query_params=None, headers=None, if query_params: url += '?' + urlencode(query_params) if headers['Content-Type'] == 'application/json-patch+json': - headers[ - 'Content-Type'] = 'application/strategic-merge-patch+json' + if not isinstance(body, list): + headers['Content-Type'] = 'application/strategic-merge-patch+json' request_body = None if body: request_body = json.dumps(body) From e4c5cc7a92c2cb4e0b51929742de0611be200009 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Sun, 30 Apr 2017 21:16:31 -0500 Subject: [PATCH 2/2] changelog update for #187 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c0076924..8e78bd4a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v2.0.0b2 +- Bugfix: support RFC6902 'json-patch' operations #187 + # v1.0.1 - Bugfix: urllib3 1.21 fails tests, Excluding version 1.21 from dependencies #197