Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions kubernetes/client/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import logging
import re
import ssl
import warnings

import certifi
# python 2 and python 3 compatibility library
Expand Down Expand Up @@ -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'
Expand Down