| Index: tools/telemetry/third_party/gsutilz/third_party/boto/boto/vendored/six.py
|
| diff --git a/tools/telemetry/third_party/gsutilz/third_party/six/six.py b/tools/telemetry/third_party/gsutilz/third_party/boto/boto/vendored/six.py
|
| similarity index 95%
|
| copy from tools/telemetry/third_party/gsutilz/third_party/six/six.py
|
| copy to tools/telemetry/third_party/gsutilz/third_party/boto/boto/vendored/six.py
|
| index 21b0e8032f6e77289a54275bc9ea7d5660b153e9..55f5c3bfe39cae68006a3304d910de040d89316e 100644
|
| --- a/tools/telemetry/third_party/gsutilz/third_party/six/six.py
|
| +++ b/tools/telemetry/third_party/gsutilz/third_party/boto/boto/vendored/six.py
|
| @@ -20,15 +20,13 @@
|
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| # SOFTWARE.
|
|
|
| -from __future__ import absolute_import
|
| -
|
| import functools
|
| import operator
|
| import sys
|
| import types
|
|
|
| __author__ = "Benjamin Peterson <benjamin@python.org>"
|
| -__version__ = "1.8.0"
|
| +__version__ = "1.7.2"
|
|
|
|
|
| # Useful for very coarse version differentiation.
|
| @@ -227,12 +225,10 @@ _moved_attributes = [
|
| MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
|
| MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
|
| MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
|
| - MovedAttribute("intern", "__builtin__", "sys"),
|
| MovedAttribute("map", "itertools", "builtins", "imap", "map"),
|
| MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
|
| MovedAttribute("reload_module", "__builtin__", "imp", "reload"),
|
| MovedAttribute("reduce", "__builtin__", "functools"),
|
| - MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
|
| MovedAttribute("StringIO", "StringIO", "io"),
|
| MovedAttribute("UserDict", "UserDict", "collections"),
|
| MovedAttribute("UserList", "UserList", "collections"),
|
| @@ -252,7 +248,6 @@ _moved_attributes = [
|
| MovedModule("html_parser", "HTMLParser", "html.parser"),
|
| MovedModule("http_client", "httplib", "http.client"),
|
| MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
|
| - MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
|
| MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
|
| MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
|
| MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
|
| @@ -286,7 +281,7 @@ _moved_attributes = [
|
| MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
|
| MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
|
| MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
|
| - MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
|
| + MovedModule("xmlrpc_server", "xmlrpclib", "xmlrpc.server"),
|
| MovedModule("winreg", "_winreg"),
|
| ]
|
| for attr in _moved_attributes:
|
| @@ -322,13 +317,6 @@ _urllib_parse_moved_attributes = [
|
| MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
|
| MovedAttribute("urlencode", "urllib", "urllib.parse"),
|
| MovedAttribute("splitquery", "urllib", "urllib.parse"),
|
| - MovedAttribute("splittag", "urllib", "urllib.parse"),
|
| - MovedAttribute("splituser", "urllib", "urllib.parse"),
|
| - MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
|
| - MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
|
| - MovedAttribute("uses_params", "urlparse", "urllib.parse"),
|
| - MovedAttribute("uses_query", "urlparse", "urllib.parse"),
|
| - MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
|
| ]
|
| for attr in _urllib_parse_moved_attributes:
|
| setattr(Module_six_moves_urllib_parse, attr.name, attr)
|
| @@ -618,8 +606,6 @@ if PY3:
|
|
|
|
|
| def reraise(tp, value, tb=None):
|
| - if value is None:
|
| - value = tp()
|
| if value.__traceback__ is not tb:
|
| raise value.with_traceback(tb)
|
| raise value
|
| @@ -701,8 +687,7 @@ if print_ is None:
|
| _add_doc(reraise, """Reraise an exception.""")
|
|
|
| if sys.version_info[0:2] < (3, 4):
|
| - def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
|
| - updated=functools.WRAPPER_UPDATES):
|
| + def wraps(wrapped):
|
| def wrapper(f):
|
| f = functools.wraps(wrapped)(f)
|
| f.__wrapped__ = wrapped
|
| @@ -713,27 +698,34 @@ else:
|
|
|
| def with_metaclass(meta, *bases):
|
| """Create a base class with a metaclass."""
|
| - # This requires a bit of explanation: the basic idea is to make a dummy
|
| - # metaclass for one level of class instantiation that replaces itself with
|
| - # the actual metaclass.
|
| + # This requires a bit of explanation: the basic idea is to make a
|
| + # dummy metaclass for one level of class instantiation that replaces
|
| + # itself with the actual metaclass. Because of internal type checks
|
| + # we also need to make sure that we downgrade the custom metaclass
|
| + # for one level to something closer to type (that's why __call__ and
|
| + # __init__ comes back from type etc.).
|
| class metaclass(meta):
|
| + __call__ = type.__call__
|
| + __init__ = type.__init__
|
| def __new__(cls, name, this_bases, d):
|
| + if this_bases is None:
|
| + return type.__new__(cls, name, (), d)
|
| return meta(name, bases, d)
|
| - return type.__new__(metaclass, 'temporary_class', (), {})
|
| + return metaclass('temporary_class', None, {})
|
|
|
|
|
| def add_metaclass(metaclass):
|
| """Class decorator for creating a class with a metaclass."""
|
| def wrapper(cls):
|
| orig_vars = cls.__dict__.copy()
|
| + orig_vars.pop('__dict__', None)
|
| + orig_vars.pop('__weakref__', None)
|
| slots = orig_vars.get('__slots__')
|
| if slots is not None:
|
| if isinstance(slots, str):
|
| slots = [slots]
|
| for slots_var in slots:
|
| orig_vars.pop(slots_var)
|
| - orig_vars.pop('__dict__', None)
|
| - orig_vars.pop('__weakref__', None)
|
| return metaclass(cls.__name__, cls.__bases__, orig_vars)
|
| return wrapper
|
|
|
| @@ -742,8 +734,10 @@ def add_metaclass(metaclass):
|
| # Turn this module into a package.
|
| __path__ = [] # required for PEP 302 and PEP 451
|
| __package__ = __name__ # see PEP 366 @ReservedAssignment
|
| -if globals().get("__spec__") is not None:
|
| +try:
|
| __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable
|
| +except NameError:
|
| + pass
|
| # Remove other six meta path importers, since they cause problems. This can
|
| # happen if six is removed from sys.modules and then reloaded. (Setuptools does
|
| # this for some reason.)
|
|
|