# Buggy code
def post(self, url, data, timeout=None):
    """Request an URL.

    Args:
        url (:obj:`str`): The web location we want to retrieve.
        data (dict[str, str|int]): A dict of key/value pairs. Note: On py2.7 value is unicode.
        timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
            timeout from the server (instead of the one specified during creation of the
            connection pool).

    Returns:
      A JSON object.

    """
    urlopen_kwargs = {}

    if timeout is not None:
        urlopen_kwargs["timeout"] = Timeout(read=timeout, connect=self._connect_timeout)

    # Are we uploading files?
    files = False

    for key, val in data.copy().items():
        if isinstance(val, InputFile):
            # Convert the InputFile to urllib3 field format
            data[key] = val.field_tuple
            files = True
        elif isinstance(val, (float, int)):
            # Urllib3 doesn't like floats it seems
            data[key] = str(val)
        elif key == "media":
            # One media or multiple
            if isinstance(val, InputMedia):
                # Attach and set val to attached name
                data[key] = val.to_json()
                if isinstance(val.media, InputFile):
                    data[val.media.attach] = val.media.field_tuple
            else:
                # Attach and set val to attached name for all
                media = []
                for m in val:
                    media.append(m.to_dict())
                    if isinstance(m.media, InputFile):
                        data[m.media.attach] = m.media.field_tuple
                data[key] = json.dumps(media)
            files = True

    # Use multipart upload if we're uploading files, otherwise use JSON
    if files:
        result = self._request_wrapper("POST", url, fields=data, **urlopen_kwargs)
    else:
        result = self._request_wrapper(
            "POST",
            url,
            body=json.dumps(data).encode("utf-8"),
            headers={"Content-Type": "application/json"},
        )

    return self._parse(result)


# Traceback (telegram.vendor.ptb_urllib3.urllib3.exceptions.ReadTimeoutError)
Traceback (most recent call last):
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 402, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 398, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1198, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 576, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.5/ssl.py", line 937, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.5/ssl.py", line 799, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.5/ssl.py", line 583, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/z10/lib/python3.5/site-packages/telegram/utils/request.py", line 203, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 70, in request
**urlopen_kw)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 666, in urlopen
_stacktrace=sys.exc_info()[2])
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/util/retry.py", line 347, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/packages/six.py", line 686, in reraise
raise value
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 405, in _make_request
exc_cls=ReadTimeoutError)
File "/tmp/z10/lib/python3.5/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 321, in _raise_timeout
raise exc_cls(*args)
telegram.vendor.ptb_urllib3.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test.py", line 4, in <module>
bot.get_chat_administrators(-1001071177546, timeout=60)
File "/tmp/z10/lib/python3.5/site-packages/telegram/bot.py", line 65, in decorator
result = func(self, *args, **kwargs)
File "/tmp/z10/lib/python3.5/site-packages/telegram/bot.py", line 2187, in get_chat_administrators
result = self._request.post(url, data, timeout=timeout)
File "/tmp/z10/lib/python3.5/site-packages/telegram/utils/request.py", line 309, in post
headers={'Content-Type': 'application/json'})
File "/tmp/z10/lib/python3.5/site-packages/telegram/utils/request.py", line 205, in _request_wrapper
raise TimedOut()
telegram.error.TimedOut: Timed out

# Fixed code
def post(self, url, data, timeout=None):
    """Request an URL.

    Args:
        url (:obj:`str`): The web location we want to retrieve.
        data (dict[str, str|int]): A dict of key/value pairs. Note: On py2.7 value is unicode.
        timeout (:obj:`int` | :obj:`float`): If this value is specified, use it as the read
            timeout from the server (instead of the one specified during creation of the
            connection pool).

    Returns:
      A JSON object.

    """
    urlopen_kwargs = {}

    if timeout is not None:
        urlopen_kwargs["timeout"] = Timeout(read=timeout, connect=self._connect_timeout)

    # Are we uploading files?
    files = False

    for key, val in data.copy().items():
        if isinstance(val, InputFile):
            # Convert the InputFile to urllib3 field format
            data[key] = val.field_tuple
            files = True
        elif isinstance(val, (float, int)):
            # Urllib3 doesn't like floats it seems
            data[key] = str(val)
        elif key == "media":
            # One media or multiple
            if isinstance(val, InputMedia):
                # Attach and set val to attached name
                data[key] = val.to_json()
                if isinstance(val.media, InputFile):
                    data[val.media.attach] = val.media.field_tuple
            else:
                # Attach and set val to attached name for all
                media = []
                for m in val:
                    media.append(m.to_dict())
                    if isinstance(m.media, InputFile):
                        data[m.media.attach] = m.media.field_tuple
                data[key] = json.dumps(media)
            files = True

    # Use multipart upload if we're uploading files, otherwise use JSON
    if files:
        result = self._request_wrapper("POST", url, fields=data, **urlopen_kwargs)
    else:
        result = self._request_wrapper(
            "POST",
            url,
            body=json.dumps(data).encode("utf-8"),
            headers={"Content-Type": "application/json"},
            **urlopen_kwargs,
        )

    return self._parse(result)