mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Merge pull request #880 from JackDandy/feature/UpdateSix
Update Six compatibility library 1.10.0 (r405) to 1.10.0 (r433).
This commit is contained in:
commit
0087fec380
2 changed files with 28 additions and 12 deletions
|
@ -21,6 +21,7 @@
|
||||||
* Update rarfile to 3.0 (3e54b22)
|
* Update rarfile to 3.0 (3e54b22)
|
||||||
* Update Requests library 2.9.1 (a1c9b84) to 2.13.0 (fc54869)
|
* Update Requests library 2.9.1 (a1c9b84) to 2.13.0 (fc54869)
|
||||||
* Update SimpleJSON library 3.8.1 (6022794) to 3.10.0 (c52efea)
|
* Update SimpleJSON library 3.8.1 (6022794) to 3.10.0 (c52efea)
|
||||||
|
* Update Six compatibility library 1.10.0 (r405) to 1.10.0 (r433)
|
||||||
|
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
|
|
39
lib/six.py
39
lib/six.py
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2010-2015 Benjamin Peterson
|
# Copyright (c) 2010-2017 Benjamin Peterson
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -262,10 +262,11 @@ _moved_attributes = [
|
||||||
MovedModule("html_entities", "htmlentitydefs", "html.entities"),
|
MovedModule("html_entities", "htmlentitydefs", "html.entities"),
|
||||||
MovedModule("html_parser", "HTMLParser", "html.parser"),
|
MovedModule("html_parser", "HTMLParser", "html.parser"),
|
||||||
MovedModule("http_client", "httplib", "http.client"),
|
MovedModule("http_client", "httplib", "http.client"),
|
||||||
|
MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
|
||||||
|
MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
|
||||||
MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
|
MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
|
||||||
MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
|
MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
|
||||||
MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
|
MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
|
||||||
MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
|
|
||||||
MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
|
MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
|
||||||
MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
|
MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
|
||||||
MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
|
MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
|
||||||
|
@ -341,6 +342,7 @@ _urllib_parse_moved_attributes = [
|
||||||
MovedAttribute("splitquery", "urllib", "urllib.parse"),
|
MovedAttribute("splitquery", "urllib", "urllib.parse"),
|
||||||
MovedAttribute("splittag", "urllib", "urllib.parse"),
|
MovedAttribute("splittag", "urllib", "urllib.parse"),
|
||||||
MovedAttribute("splituser", "urllib", "urllib.parse"),
|
MovedAttribute("splituser", "urllib", "urllib.parse"),
|
||||||
|
MovedAttribute("splitvalue", "urllib", "urllib.parse"),
|
||||||
MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
|
MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
|
||||||
MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
|
MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
|
||||||
MovedAttribute("uses_params", "urlparse", "urllib.parse"),
|
MovedAttribute("uses_params", "urlparse", "urllib.parse"),
|
||||||
|
@ -679,11 +681,15 @@ if PY3:
|
||||||
exec_ = getattr(moves.builtins, "exec")
|
exec_ = getattr(moves.builtins, "exec")
|
||||||
|
|
||||||
def reraise(tp, value, tb=None):
|
def reraise(tp, value, tb=None):
|
||||||
if value is None:
|
try:
|
||||||
value = tp()
|
if value is None:
|
||||||
if value.__traceback__ is not tb:
|
value = tp()
|
||||||
raise value.with_traceback(tb)
|
if value.__traceback__ is not tb:
|
||||||
raise value
|
raise value.with_traceback(tb)
|
||||||
|
raise value
|
||||||
|
finally:
|
||||||
|
value = None
|
||||||
|
tb = None
|
||||||
|
|
||||||
else:
|
else:
|
||||||
def exec_(_code_, _globs_=None, _locs_=None):
|
def exec_(_code_, _globs_=None, _locs_=None):
|
||||||
|
@ -699,19 +705,28 @@ else:
|
||||||
exec("""exec _code_ in _globs_, _locs_""")
|
exec("""exec _code_ in _globs_, _locs_""")
|
||||||
|
|
||||||
exec_("""def reraise(tp, value, tb=None):
|
exec_("""def reraise(tp, value, tb=None):
|
||||||
raise tp, value, tb
|
try:
|
||||||
|
raise tp, value, tb
|
||||||
|
finally:
|
||||||
|
tb = None
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info[:2] == (3, 2):
|
if sys.version_info[:2] == (3, 2):
|
||||||
exec_("""def raise_from(value, from_value):
|
exec_("""def raise_from(value, from_value):
|
||||||
if from_value is None:
|
try:
|
||||||
raise value
|
if from_value is None:
|
||||||
raise value from from_value
|
raise value
|
||||||
|
raise value from from_value
|
||||||
|
finally:
|
||||||
|
value = None
|
||||||
""")
|
""")
|
||||||
elif sys.version_info[:2] > (3, 2):
|
elif sys.version_info[:2] > (3, 2):
|
||||||
exec_("""def raise_from(value, from_value):
|
exec_("""def raise_from(value, from_value):
|
||||||
raise value from from_value
|
try:
|
||||||
|
raise value from from_value
|
||||||
|
finally:
|
||||||
|
value = None
|
||||||
""")
|
""")
|
||||||
else:
|
else:
|
||||||
def raise_from(value, from_value):
|
def raise_from(value, from_value):
|
||||||
|
|
Loading…
Reference in a new issue