{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/3471","repository_url":"https://api.github.com/repos/kennethreitz/requests","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/3471/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/3471/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/3471/events","html_url":"https://github.com/kennethreitz/requests/issues/3471","id":169337922,"number":3471,"title":"OverflowError: requested number of bytes is more than a Python string can hold","user":{"login":"mopuru-murali","id":985461,"avatar_url":"https://avatars.githubusercontent.com/u/985461?v=3","gravatar_id":"","url":"https://api.github.com/users/mopuru-murali","html_url":"https://github.com/mopuru-murali","followers_url":"https://api.github.com/users/mopuru-murali/followers","following_url":"https://api.github.com/users/mopuru-murali/following{/other_user}","gists_url":"https://api.github.com/users/mopuru-murali/gists{/gist_id}","starred_url":"https://api.github.com/users/mopuru-murali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mopuru-murali/subscriptions","organizations_url":"https://api.github.com/users/mopuru-murali/orgs","repos_url":"https://api.github.com/users/mopuru-murali/repos","events_url":"https://api.github.com/users/mopuru-murali/events{/privacy}","received_events_url":"https://api.github.com/users/mopuru-murali/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-04T10:02:49Z","updated_at":"2016-08-04T10:35:15Z","closed_at":"2016-08-04T10:07:20Z","body":"\r\n\t\r\n\r\nI'm facing some weird problem.\r\n\r\nI'm not able to post ~3GB (more than 2GB) file using requests > 0.7.4 module because of getting following err.\r\n\r\nFile \"/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/api.py\", line 83, in post\r\n  return request('post', url, data=data, **kwargs)\r\nFile \"/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/api.py\", line 38, in request\r\n  return s.request(method=method, url=url, **kwargs)\r\nFile \"/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/sessions.py\", line 200, in request\r\n  r.send(prefetch=prefetch)\r\nFile \"/build/toolchain/noarch/requests-2.5.3/lib/python2.6/site-packages/requests/models.py\", line 387, in send\r\n  fields.update({k: (fn, fp.read())})\r\nOverflowError: requested number of bytes is more than a Python string can hold\r\n\r\nBut, with requests<=0.7.4 its working fine. No problem of OverflowError.\r\n\r\nSo, I was wondering why it started throwing OverflowError in latest version of requests module (or from requests > 0.7.4)?\r\n\r\nI tested this with python2.6 and python2.7.\r\n\r\nPS: I know that instead of posting huge file at once, we can post same file via file chunks. But, I do not want chucks way.\r\n"},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/237516730","html_url":"https://github.com/kennethreitz/requests/issues/3471#issuecomment-237516730","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/3471","id":237516730,"user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T10:35:15Z","updated_at":"2016-08-04T10:35:15Z","body":"> May I know is it save using requests<=0.7.4 for file uploads?\r\n\r\nIt is extremely *unsafe* to use such an old version of Requests, for any purpose."}}
{"actor":{"display_login":"Lukasa"}}