Skip to content

Commit

Permalink
Merge pull request #1208 from tseaver/rename-_apitools-streaming
Browse files Browse the repository at this point in the history
Rename  'gcloud/_apitools' -> 'gcloud/streaming'
  • Loading branch information
tseaver committed Nov 16, 2015
2 parents e2fad76 + 1378947 commit 8073196
Show file tree
Hide file tree
Showing 17 changed files with 235 additions and 237 deletions.
2 changes: 0 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ omit =
*/demo/*
*/demo.py
*/_generated/*.py
# Exclude the forked code until tests are complete.
*/_apitools/*.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
4 changes: 2 additions & 2 deletions gcloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import six
from six.moves.urllib.parse import quote # pylint: disable=F0401

from gcloud._apitools import http_wrapper
from gcloud._apitools import transfer
from gcloud.streaming import http_wrapper
from gcloud.streaming import transfer

from gcloud._helpers import _RFC3339_MICROS
from gcloud._helpers import UTC
Expand Down
12 changes: 6 additions & 6 deletions gcloud/storage/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ def test_upload_from_file_resumable(self):
from six.moves.urllib.parse import urlsplit
from tempfile import NamedTemporaryFile
from gcloud._testing import _Monkey
from gcloud._apitools import http_wrapper
from gcloud._apitools import transfer
from gcloud.streaming import http_wrapper
from gcloud.streaming import transfer
BLOB_NAME = 'blob-name'
UPLOAD_URL = 'http://example.com/upload/name/key'
DATA = b'ABCDEF'
Expand Down Expand Up @@ -470,7 +470,7 @@ def test_upload_from_file_w_slash_in_name(self):
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from tempfile import NamedTemporaryFile
from gcloud._apitools import http_wrapper
from gcloud.streaming import http_wrapper
BLOB_NAME = 'parent/child'
UPLOAD_URL = 'http://example.com/upload/name/parent%2Fchild'
DATA = b'ABCDEF'
Expand Down Expand Up @@ -518,7 +518,7 @@ def _upload_from_filename_test_helper(self, properties=None,
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from tempfile import NamedTemporaryFile
from gcloud._apitools import http_wrapper
from gcloud.streaming import http_wrapper
BLOB_NAME = 'blob-name'
UPLOAD_URL = 'http://example.com/upload/name/key'
DATA = b'ABCDEF'
Expand Down Expand Up @@ -584,7 +584,7 @@ def test_upload_from_string_w_bytes(self):
from six.moves.http_client import OK
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from gcloud._apitools import http_wrapper
from gcloud.streaming import http_wrapper
BLOB_NAME = 'blob-name'
UPLOAD_URL = 'http://example.com/upload/name/key'
DATA = b'ABCDEF'
Expand Down Expand Up @@ -623,7 +623,7 @@ def test_upload_from_string_w_text(self):
from six.moves.http_client import OK
from six.moves.urllib.parse import parse_qsl
from six.moves.urllib.parse import urlsplit
from gcloud._apitools import http_wrapper
from gcloud.streaming import http_wrapper
BLOB_NAME = 'blob-name'
UPLOAD_URL = 'http://example.com/upload/name/key'
DATA = u'ABCDEF\u1234'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This class reads ahead to detect if we are at the end of the stream.
"""

from gcloud._apitools import exceptions
from gcloud.streaming import exceptions


# TODO(user): Consider replacing this with a StringIO.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from six.moves import http_client
from six.moves.urllib import parse

from gcloud._apitools import exceptions
from gcloud._apitools import util
from gcloud.streaming import exceptions
from gcloud.streaming import util

__all__ = [
'CheckResponse',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylint: skip-file
"""Small helper class to provide a small slice of a stream."""

from gcloud._apitools import exceptions
from gcloud.streaming import exceptions


class StreamSlice(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Test_BufferedStream(unittest2.TestCase):

def _getTargetClass(self):
from gcloud._apitools.buffered_stream import BufferedStream
from gcloud.streaming.buffered_stream import BufferedStream
return BufferedStream

def _makeOne(self, *args, **kw):
Expand Down Expand Up @@ -63,7 +63,7 @@ def test__bytes_remaining_start_zero_shorter_than_buffer(self):

def test_read_w_none(self):
from io import BytesIO
from gcloud._apitools.exceptions import NotYetImplementedError
from gcloud.streaming.exceptions import NotYetImplementedError
CONTENT = b'CONTENT GOES HERE'
START = 0
BUFSIZE = 4
Expand All @@ -74,7 +74,7 @@ def test_read_w_none(self):

def test_read_w_negative_size(self):
from io import BytesIO
from gcloud._apitools.exceptions import NotYetImplementedError
from gcloud.streaming.exceptions import NotYetImplementedError
CONTENT = b'CONTENT GOES HERE'
START = 0
BUFSIZE = 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Test_HttpError(unittest2.TestCase):

def _getTargetClass(self):
from gcloud._apitools.exceptions import HttpError
from gcloud.streaming.exceptions import HttpError
return HttpError

def _makeOne(self, *args, **kw):
Expand Down Expand Up @@ -46,7 +46,7 @@ class _Response(object):
class Test_RetryAfterError(unittest2.TestCase):

def _getTargetClass(self):
from gcloud._apitools.exceptions import RetryAfterError
from gcloud.streaming.exceptions import RetryAfterError
return RetryAfterError

def _makeOne(self, *args, **kw):
Expand Down
Loading

0 comments on commit 8073196

Please sign in to comment.