Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Oct 29, 2015

Uses #1208 as a base.

  • Trim / normailze / document imports.
  • Rename functions / methods to match PEP 8.
  • Make constants / methods used outside their modules public.
  • Make functions / methods not imported outside their modules explicitly private.
  • Drop unused exceptions.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 29, 2015
@dhermes
Copy link
Contributor

dhermes commented Oct 29, 2015

Ping me when this is rebased after the other commits get merged.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 16, 2015

@dhermes rebased after #1208 merged.

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

Just want to double check that 11 commits is intended after the rebase and we didn't confuse git?

@tseaver
Copy link
Contributor Author

tseaver commented Nov 16, 2015

This is the correct set of commits: I can squash some down, if you think it will help review better.

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

No more commits is almost certainly a good thing (easier to review).

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

Unfortunately GitHub thinks there are too many changes to gcloud/streaming/test_transfer.py to display.

There are a couple places where you dropped with _Monkey(MUT, http_wrapper=_Dummy()):. Why?

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

Also

_Monkey( Request=lambda url, http_method, body: _Request(url, http_method, body) ) 

seems like it could be done with

_Monkey(Request=_Request) 

What am I missing?

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

Yay for "Give 'streaming.util' functions PEP8 names."!

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Nov 16, 2015

Other than getting at the code GitHub won't show me, I've reviewed them all and made my comments.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 17, 2015

There are a couple places where you dropped with _Monkey(MUT, http_wrapper=_Dummy()):. Why?

In that same commit, transfer begins importing names directly, rather than via http_wrapper.<name>.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 17, 2015

But http_wrapper=_Dummy() wasn't actually replacing anything. So why was it there and why was it safe to remove the monkey patch?

Originally, the _Dummy() had the names which transfer expected to find on http_wrapper: over the course (and after I started importing them directly), it "withered away" like the Communist state.

@dhermes
Copy link
Contributor

dhermes commented Nov 17, 2015

Ha. OK

@dhermes
Copy link
Contributor

dhermes commented Nov 18, 2015

Seems like adding __doc__ to the named tuple and then me reviewing test_transfer.py is what remains. Am I missing anything else?

@tseaver
Copy link
Contributor Author

tseaver commented Nov 18, 2015

(I think) to review the bigger diff:

$ git remote add tseaver https://github.com/tseaver/gcloud-python $ git fetch --all tseaver $ git diff master..tseaver/streaming-strip_unused_features gcloud/streaming/test_transfer.py
@tseaver
Copy link
Contributor Author

tseaver commented Nov 18, 2015

Rebased to fix conflict on gcloud/storage/test_blob.py (from #1222).

@dhermes
Copy link
Contributor

dhermes commented Nov 18, 2015

OK the test_transfer.py diff looks fine (I don't know why GitHub wouldn't show it, it was mostly renames)

@dhermes
Copy link
Contributor

dhermes commented Nov 18, 2015

Do we have everything else squared away?

@tseaver
Copy link
Contributor Author

tseaver commented Nov 19, 2015

Do we have everything else squared away?

I think so.

@dhermes
Copy link
Contributor

dhermes commented Nov 19, 2015

OK. LGTM

tseaver added a commit that referenced this pull request Nov 19, 2015
@tseaver tseaver merged commit 509564d into googleapis:master Nov 19, 2015
@tseaver tseaver deleted the streaming-strip_unused_features branch November 19, 2015 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: core cla: yes This human has signed the Contributor License Agreement.

3 participants