Last active
August 29, 2015 14:10
-
-
Save dhermes/0ba88c5dab4be4e60b9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From a966cfb54442605980e89c4c411472a617877092 Mon Sep 17 00:00:00 2001 | |
| From: Danny Hermes <daniel.j.hermes@gmail.com> | |
| Date: Tue, 25 Nov 2014 18:17:42 -0800 | |
| Subject: [PATCH] Patch for gcloud-python. | |
| --- | |
| apitools/__init__.py | 8 ++++---- | |
| apitools/base/__init__.py | 5 +---- | |
| apitools/base/py/__init__.py | 16 +--------------- | |
| apitools/base/py/http_wrapper.py | 4 ++-- | |
| apitools/base/py/transfer.py | 6 +++--- | |
| apitools/base/py/util.py | 2 +- | |
| 6 files changed, 12 insertions(+), 29 deletions(-) | |
| diff --git a/apitools/__init__.py b/apitools/__init__.py | |
| index 54fa3d5..cefc559 100644 | |
| --- a/apitools/__init__.py | |
| +++ b/apitools/__init__.py | |
| @@ -1,5 +1,5 @@ | |
| -#!/usr/bin/env python | |
| -"""Shared __init__.py for apitools.""" | |
| +"""Stub, *non*-namespace package initializer. | |
| -from pkgutil import extend_path | |
| -__path__ = extend_path(__path__, __name__) | |
| +We do not do the 'namespace' dance here, as we will not be imported at | |
| +all if ``apitools`` can be imported directly. | |
| +""" | |
| diff --git a/apitools/base/__init__.py b/apitools/base/__init__.py | |
| index 54fa3d5..eddc773 100644 | |
| --- a/apitools/base/__init__.py | |
| +++ b/apitools/base/__init__.py | |
| @@ -1,5 +1,2 @@ | |
| -#!/usr/bin/env python | |
| -"""Shared __init__.py for apitools.""" | |
| +"""Stub, package initializer.""" | |
| -from pkgutil import extend_path | |
| -__path__ = extend_path(__path__, __name__) | |
| diff --git a/apitools/base/py/__init__.py b/apitools/base/py/__init__.py | |
| index cbf7f86..168bd55 100644 | |
| --- a/apitools/base/py/__init__.py | |
| +++ b/apitools/base/py/__init__.py | |
| @@ -1,15 +1 @@ | |
| -#!/usr/bin/env python | |
| -"""Top-level imports for apitools base files.""" | |
| - | |
| -# pylint:disable=wildcard-import | |
| -from apitools.base.py.base_api import * | |
| -from apitools.base.py.batch import * | |
| -from apitools.base.py.credentials_lib import * | |
| -from apitools.base.py.encoding import * | |
| -from apitools.base.py.exceptions import * | |
| -from apitools.base.py.extra_types import * | |
| -from apitools.base.py.http_wrapper import * | |
| -from apitools.base.py.list_pager import * | |
| -from apitools.base.py.transfer import * | |
| -from apitools.base.py.util import * | |
| - | |
| +"""Stub, package initializer.""" | |
| diff --git a/apitools/base/py/http_wrapper.py b/apitools/base/py/http_wrapper.py | |
| index 8c3ee28..95bd48d 100644 | |
| --- a/apitools/base/py/http_wrapper.py | |
| +++ b/apitools/base/py/http_wrapper.py | |
| @@ -14,8 +14,8 @@ import urlparse | |
| import httplib2 | |
| -from apitools.base.py import exceptions | |
| -from apitools.base.py import util | |
| +from . import exceptions | |
| +from . import util | |
| __all__ = [ | |
| 'GetHttp', | |
| diff --git a/apitools/base/py/transfer.py b/apitools/base/py/transfer.py | |
| index 610ef2d..4060039 100644 | |
| --- a/apitools/base/py/transfer.py | |
| +++ b/apitools/base/py/transfer.py | |
| @@ -12,9 +12,9 @@ import os | |
| import StringIO | |
| import threading | |
| -from apitools.base.py import exceptions | |
| -from apitools.base.py import http_wrapper | |
| -from apitools.base.py import util | |
| +from . import exceptions | |
| +from . import http_wrapper | |
| +from . import util | |
| __all__ = [ | |
| 'Download', | |
| diff --git a/apitools/base/py/util.py b/apitools/base/py/util.py | |
| index cd882a7..0cca373 100644 | |
| --- a/apitools/base/py/util.py | |
| +++ b/apitools/base/py/util.py | |
| @@ -9,7 +9,7 @@ import types | |
| import urllib | |
| import urllib2 | |
| -from apitools.base.py import exceptions | |
| +from . import exceptions | |
| __all__ = [ | |
| 'DetectGae', | |
| -- | |
| 1.9.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git format-patch e5a5c36e24926310712d20b93b4cdd02424a81f5 --stdout > apitools.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment