Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(143)

Issue 6300093: Better handling of streams of unknown size. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by jcgregorio_google
Modified:
12 years, 2 months ago
CC:
google-api-python-client_googlegroups.com
Visibility:
Public.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Add comment on non-blocking streams. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -6 lines) Patch
M apiclient/http.py View 1 4 chunks +12 lines, -3 lines 1 comment Download
M tests/test_discovery.py View 1 1 chunk +23 lines, -3 lines 0 comments Download

Messages

Total messages: 11
jcgregorio_google
12 years, 2 months ago (2012-06-14 14:00:46 UTC) #1
yovadia
I made one suggestion about making newly computed file sizes available to read after an ...
12 years, 2 months ago (2012-06-14 15:14:46 UTC) #2
jcgregorio_google
http://codereview.appspot.com/6300093/diff/1/apiclient/http.py File apiclient/http.py (right): http://codereview.appspot.com/6300093/diff/1/apiclient/http.py#newcode626 apiclient/http.py:626: size = str(self.resumable_progress + len(data)) I thought about that, ...
12 years, 2 months ago (2012-06-14 15:41:35 UTC) #3
yovadia
In that case, maybe it should happen in MediaIoBaseUpload.getbytes() ? On Thu, Jun 14, 2012 ...
12 years, 2 months ago (2012-06-14 15:49:50 UTC) #4
jcgregorio_google
On 2012/06/14 15:49:50, yovadia wrote: > In that case, maybe it should happen in MediaIoBaseUpload.getbytes() ...
12 years, 2 months ago (2012-06-14 18:56:15 UTC) #5
nherring
http://codereview.appspot.com/6300093/diff/1/apiclient/http.py File apiclient/http.py (left): http://codereview.appspot.com/6300093/diff/1/apiclient/http.py#oldcode618 apiclient/http.py:618: self.resumable_progress, self.resumable.chunksize()) I don't see how MediaIoBaseUpload deals with ...
12 years, 2 months ago (2012-06-14 19:54:53 UTC) #6
jcgregorio_google
There are bigger problems if the stream is non-blocking, dribbling out what could be very ...
12 years, 2 months ago (2012-06-14 20:09:39 UTC) #7
nherring
As things stand, I think you're right. I'd love to see HttpLib2 have real support ...
12 years, 2 months ago (2012-06-14 20:15:29 UTC) #8
jcgregorio_google
http://codereview.appspot.com/6300093/diff/1004/apiclient/http.py File apiclient/http.py (right): http://codereview.appspot.com/6300093/diff/1004/apiclient/http.py#newcode307 apiclient/http.py:307: opened in blocking mode, do not use streams opened ...
12 years, 2 months ago (2012-06-14 20:31:41 UTC) #9
nherring
LGTM
12 years, 2 months ago (2012-06-14 21:45:21 UTC) #10
jcgregorio_google
12 years, 2 months ago (2012-06-15 12:40:21 UTC) #11
On 2012/06/14 21:45:21, nherring wrote:
> LGTM

Committed in
http://code.google.com/p/google-api-python-client/source/detail?r=3ba72a5faf1...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b