{"action":"created","issue":{"url":"https://api.github.com/repos/osiell/odoorpc/issues/24","labels_url":"https://api.github.com/repos/osiell/odoorpc/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/osiell/odoorpc/issues/24/comments","events_url":"https://api.github.com/repos/osiell/odoorpc/issues/24/events","html_url":"https://github.com/osiell/odoorpc/pull/24","id":120994143,"number":24,"title":"[IMP] Remove timeout int check.","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-08T12:10:53Z","updated_at":"2015-12-08T13:16:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/osiell/odoorpc/pulls/24","html_url":"https://github.com/osiell/odoorpc/pull/24","diff_url":"https://github.com/osiell/odoorpc/pull/24.diff","patch_url":"https://github.com/osiell/odoorpc/pull/24.patch"},"body":"floats and `None` also work as parameters to `sock.settimeout`. If someone passes\r\nan invalid value, this is already handled by `socket.py`:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/florian/proj/odoorpc/odoorpc/odoo.py\", line 90, in __init__\r\n    self._host, self._port, timeout, version)\r\n  File \"/home/florian/proj/odoorpc/odoorpc/rpc/__init__.py\", line 171, in __init__\r\n    self._proxy_json, self._proxy_http = self._get_proxies()\r\n  File \"/home/florian/proj/odoorpc/odoorpc/rpc/__init__.py\", line 186, in _get_proxies\r\n    result = proxy_json.web.webclient.version_info()['result']\r\n  File \"/home/florian/proj/odoorpc/odoorpc/rpc/jsonrpclib.py\", line 135, in __call__\r\n    return self._rpc(self._url, kwargs)\r\n  File \"/home/florian/proj/odoorpc/odoorpc/rpc/jsonrpclib.py\", line 91, in __call__\r\n    response = self._opener.open(request, timeout=self._timeout)\r\n  File \"/usr/lib/python3.4/urllib/request.py\", line 455, in open\r\n    response = self._open(req, data)\r\n  File \"/usr/lib/python3.4/urllib/request.py\", line 473, in _open\r\n    '_open', req)\r\n  File \"/usr/lib/python3.4/urllib/request.py\", line 433, in _call_chain\r\n    result = func(*args)\r\n  File \"/usr/lib/python3.4/urllib/request.py\", line 1202, in http_open\r\n    return self.do_open(http.client.HTTPConnection, req)\r\n  File \"/usr/lib/python3.4/urllib/request.py\", line 1174, in do_open\r\n    h.request(req.get_method(), req.selector, req.data, headers)\r\n  File \"/usr/lib/python3.4/http/client.py\", line 1090, in request\r\n    self._send_request(method, url, body, headers)\r\n  File \"/usr/lib/python3.4/http/client.py\", line 1128, in _send_request\r\n    self.endheaders(body)\r\n  File \"/usr/lib/python3.4/http/client.py\", line 1086, in endheaders\r\n    self._send_output(message_body)\r\n  File \"/usr/lib/python3.4/http/client.py\", line 924, in _send_output\r\n    self.send(msg)\r\n  File \"/usr/lib/python3.4/http/client.py\", line 859, in send\r\n    self.connect()\r\n  File \"/usr/lib/python3.4/http/client.py\", line 836, in connect\r\n    self.timeout, self.source_address)\r\n  File \"/usr/lib/python3.4/socket.py\", line 497, in create_connection\r\n    sock.settimeout(timeout)\r\nTypeError: a float is required\r\n```"},"comment":{"url":"https://api.github.com/repos/osiell/odoorpc/issues/comments/162876262","html_url":"https://github.com/osiell/odoorpc/pull/24#issuecomment-162876262","issue_url":"https://api.github.com/repos/osiell/odoorpc/issues/24","id":162876262,"user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T13:16:10Z","updated_at":"2015-12-08T13:16:10Z","body":"I see, I'll add the `int()` there then. Yup, I'll update the docstring. I think both Python 2 and 3 behave the same here.\r\n\r\nAnd yeah, `None` is an infinite timeout. I needed it for a big data import where the server took around 1.5h to reply :wink:"}}