Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'gcloud/_apitools' -> 'gcloud/streaming' #1208

Merged
merged 2 commits into from
Nov 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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