Update to the latest version of six (#6787)
This commit is contained in:
parent
cab34d7d3b
commit
2f0dd02c10
1 changed files with 8 additions and 3 deletions
11
lib/spack/external/six.py
vendored
11
lib/spack/external/six.py
vendored
|
@ -29,7 +29,7 @@
|
||||||
import types
|
import types
|
||||||
|
|
||||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||||
__version__ = "1.10.0"
|
__version__ = "1.11.0"
|
||||||
|
|
||||||
|
|
||||||
# Useful for very coarse version differentiation.
|
# Useful for very coarse version differentiation.
|
||||||
|
@ -241,7 +241,6 @@ class _MovedItems(_LazyModule):
|
||||||
MovedAttribute("map", "itertools", "builtins", "imap", "map"),
|
MovedAttribute("map", "itertools", "builtins", "imap", "map"),
|
||||||
MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
|
MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
|
||||||
MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
|
MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
|
||||||
MovedAttribute("getstatusoutput", "commands", "subprocess"),
|
|
||||||
MovedAttribute("getoutput", "commands", "subprocess"),
|
MovedAttribute("getoutput", "commands", "subprocess"),
|
||||||
MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
|
MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
|
||||||
MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"),
|
MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"),
|
||||||
|
@ -421,6 +420,8 @@ class Module_six_moves_urllib_request(_LazyModule):
|
||||||
MovedAttribute("URLopener", "urllib", "urllib.request"),
|
MovedAttribute("URLopener", "urllib", "urllib.request"),
|
||||||
MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
|
MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
|
||||||
MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
|
MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
|
||||||
|
MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
|
||||||
|
MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
|
||||||
]
|
]
|
||||||
for attr in _urllib_request_moved_attributes:
|
for attr in _urllib_request_moved_attributes:
|
||||||
setattr(Module_six_moves_urllib_request, attr.name, attr)
|
setattr(Module_six_moves_urllib_request, attr.name, attr)
|
||||||
|
@ -820,10 +821,14 @@ def with_metaclass(meta, *bases):
|
||||||
# This requires a bit of explanation: the basic idea is to make a dummy
|
# 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
|
# metaclass for one level of class instantiation that replaces itself with
|
||||||
# the actual metaclass.
|
# the actual metaclass.
|
||||||
class metaclass(meta):
|
class metaclass(type):
|
||||||
|
|
||||||
def __new__(cls, name, this_bases, d):
|
def __new__(cls, name, this_bases, d):
|
||||||
return meta(name, bases, d)
|
return meta(name, bases, d)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __prepare__(cls, name, this_bases):
|
||||||
|
return meta.__prepare__(name, bases)
|
||||||
return type.__new__(metaclass, 'temporary_class', (), {})
|
return type.__new__(metaclass, 'temporary_class', (), {})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue