diff --git a/kubernetes/client/rest.py b/kubernetes/client/rest.py index a28e12387c..2f99deaa31 100644 --- a/kubernetes/client/rest.py +++ b/kubernetes/client/rest.py @@ -17,6 +17,7 @@ import logging import re import ssl +import warnings import certifi # python 2 and python 3 compatibility library @@ -145,6 +146,11 @@ def request(self, method, url, query_params=None, headers=None, len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) + else: + warnings.warn( + "_request_timeout ignored because it is neither an " + "integer, nor a 2-tuple. This will become an exception " + "in the future.", DeprecationWarning) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json'