Skip to content

Commit

Permalink
[script.module.future] 0.17.1
Browse files Browse the repository at this point in the history
Based on future-0.17.1.tar.gz from PyPI:
https://pypi.org/project/future/#files

Archive included an executable file that had their executable bit
removed with `chmod -R -x+X *`.

Directory layout changed as per the 0.16.0.4 PR:
#761

Removed `__init__.py` and `tkinter` as they’re not relevant for Kodi
(and weren’t included in Kodi’s 0.16.x add‐ons either).
  • Loading branch information
Freso committed Apr 26, 2019
1 parent 6d4956f commit 6b6b414
Show file tree
Hide file tree
Showing 86 changed files with 361 additions and 267 deletions.
2 changes: 1 addition & 1 deletion script.module.future/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.module.future"
name="future"
version="0.16.0.4"
version="0.17.1"
provider-name="Ed Schofield">
<requires>
<import addon="xbmc.python" version="2.14.0" />
Expand Down
8 changes: 4 additions & 4 deletions script.module.future/libs/future/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@
Licensing
---------
Copyright 2013-2016 Python Charmers Pty Ltd, Australia.
Copyright 2013-2018 Python Charmers Pty Ltd, Australia.
The software is distributed under an MIT licence. See LICENSE.txt.
"""

__title__ = 'future'
__author__ = 'Ed Schofield'
__license__ = 'MIT'
__copyright__ = 'Copyright 2013-2016 Python Charmers Pty Ltd'
__copyright__ = 'Copyright 2013-2018 Python Charmers Pty Ltd'
__ver_major__ = 0
__ver_minor__ = 16
__ver_patch__ = 0
__ver_minor__ = 17
__ver_patch__ = 1
__ver_sub__ = ''
__version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__,
__ver_patch__, __ver_sub__)
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ def escape(s, quote=True):
if quote:
return s.translate(_escape_map_full)
return s.translate(_escape_map)

Original file line number Diff line number Diff line change
Expand Up @@ -2512,4 +2512,3 @@
entitydefs[name] = chr(codepoint)

del name, codepoint

1 change: 0 additions & 1 deletion script.module.future/libs/future/backports/html/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,4 +534,3 @@ def replaceEntities(s):

return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+;|\w{1,32};?))",
replaceEntities, s)

6 changes: 3 additions & 3 deletions script.module.future/libs/future/backports/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def __bool__(self):

# Py2 compatibility:
__nonzero__ = __bool__

@recursive_repr()
def __repr__(self):
return '{0.__class__.__name__}({1})'.format(
Expand Down Expand Up @@ -817,7 +817,7 @@ def __delitem__(self, key):
try:
del self.maps[0][key]
except KeyError:
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
raise KeyError('Key not found in the first mapping: {0!r}'.format(key))

def popitem(self):
'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
Expand All @@ -831,7 +831,7 @@ def pop(self, key, *args):
try:
return self.maps[0].pop(key, *args)
except KeyError:
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
raise KeyError('Key not found in the first mapping: {0!r}'.format(key))

def clear(self):
'Clear maps[0], leaving maps[1:] intact.'
Expand Down
22 changes: 11 additions & 11 deletions script.module.future/libs/future/backports/test/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def _is_ipv6_enabled():
# # First try printable and common characters to have a readable filename.
# # For each character, the encoding list are just example of encodings able
# # to encode the character (the list is not exhaustive).
#
#
# # U+00E6 (Latin Small Letter Ae): cp1252, iso-8859-1
# '\u00E6',
# # U+0130 (Latin Capital Letter I With Dot Above): cp1254, iso8859_3
Expand All @@ -685,11 +685,11 @@ def _is_ipv6_enabled():
# '\u062A',
# # U+0E01 (Thai Character Ko Kai): cp874
# '\u0E01',
#
#
# # Then try more "special" characters. "special" because they may be
# # interpreted or displayed differently depending on the exact locale
# # encoding and the font.
#
#
# # U+00A0 (No-Break Space)
# '\u00A0',
# # U+20AC (Euro Sign)
Expand All @@ -702,7 +702,7 @@ def _is_ipv6_enabled():
# else:
# FS_NONASCII = character
# break
#
#
# # TESTFN_UNICODE is a non-ascii filename
# TESTFN_UNICODE = TESTFN + "-\xe0\xf2\u0258\u0141\u011f"
# if sys.platform == 'darwin':
Expand All @@ -712,7 +712,7 @@ def _is_ipv6_enabled():
# import unicodedata
# TESTFN_UNICODE = unicodedata.normalize('NFD', TESTFN_UNICODE)
# TESTFN_ENCODING = sys.getfilesystemencoding()
#
#
# # TESTFN_UNENCODABLE is a filename (str type) that should *not* be able to be
# # encoded by the filesystem encoding (in strict mode). It can be None if we
# # cannot generate such filename.
Expand Down Expand Up @@ -745,7 +745,7 @@ def _is_ipv6_enabled():
# # File system encoding (eg. ISO-8859-* encodings) can encode
# # the byte 0xff. Skip some unicode filename tests.
# pass
#
#
# # TESTFN_UNDECODABLE is a filename (bytes type) that should *not* be able to be
# # decoded from the filesystem encoding (in strict mode). It can be None if we
# # cannot generate such filename (ex: the latin1 encoding can decode any byte
Expand Down Expand Up @@ -775,7 +775,7 @@ def _is_ipv6_enabled():
# except UnicodeDecodeError:
# TESTFN_UNDECODABLE = os.fsencode(TESTFN) + name
# break
#
#
# if FS_NONASCII:
# TESTFN_NONASCII = TESTFN + '-' + FS_NONASCII
# else:
Expand Down Expand Up @@ -1667,15 +1667,15 @@ def case_pred(test):
# We don't have sysconfig on Py2.6:
# #=======================================================================
# # Check for the presence of docstrings.
#
#
# HAVE_DOCSTRINGS = (check_impl_detail(cpython=False) or
# sys.platform == 'win32' or
# sysconfig.get_config_var('WITH_DOC_STRINGS'))
#
#
# requires_docstrings = unittest.skipUnless(HAVE_DOCSTRINGS,
# "test requires docstrings")
#
#
#
#
# #=======================================================================
# doctest driver.

Expand Down
4 changes: 2 additions & 2 deletions script.module.future/libs/future/backports/urllib/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,14 +727,14 @@ def quote_from_bytes(bs, safe='/'):
return str('')
### For Python-Future:
bs = bytes(bs)
###
###
if isinstance(safe, str):
# Normalize 'safe' by converting to bytes and removing non-ASCII chars
safe = str(safe).encode('ascii', 'ignore')
else:
### For Python-Future:
safe = bytes(safe)
###
###
safe = bytes([c for c in safe if c < 128])
if not bs.rstrip(_ALWAYS_SAFE_BYTES + safe):
return bs.decode()
Expand Down
4 changes: 2 additions & 2 deletions script.module.future/libs/future/builtins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
if not utils.PY3:
# We only import names that shadow the builtins on Py2. No other namespace
# pollution on Py2.

# Only shadow builtins on Py2; no new names
__all__ = ['filter', 'map', 'zip',
__all__ = ['filter', 'map', 'zip',
'ascii', 'chr', 'hex', 'input', 'next', 'oct', 'open', 'pow',
'round', 'super',
'bytes', 'dict', 'int', 'list', 'object', 'range', 'str',
Expand Down
3 changes: 1 addition & 2 deletions script.module.future/libs/future/builtins/iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
for i in range(10**15):
pass
for (a, b) in zip(range(10**15), range(-10**15, 0)):
pass
Expand Down Expand Up @@ -50,4 +50,3 @@
range = builtins.range
zip = builtins.zip
__all__ = []

3 changes: 1 addition & 2 deletions script.module.future/libs/future/builtins/newnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
def newnext(iterator, default=_SENTINEL):
"""
next(iterator[, default])
Return the next item from the iterator. If default is given and the iterator
is exhausted, it is returned instead of raising StopIteration.
"""
Expand All @@ -68,4 +68,3 @@ def newnext(iterator, default=_SENTINEL):


__all__ = ['newnext']

12 changes: 6 additions & 6 deletions script.module.future/libs/future/builtins/newround.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
``python-future``: pure Python implementation of Python 3 round().
"""

from future.utils import PYPY, PY26, bind_method

# Use the decimal module for simplicity of implementation (and
Expand All @@ -12,13 +12,13 @@
def newround(number, ndigits=None):
"""
See Python 3 documentation: uses Banker's Rounding.
Delegates to the __round__ method if for some reason this exists.
If not, rounds a number to a given precision in decimal digits (default
0 digits). This returns an int when called with one argument,
otherwise the same type as the number. ndigits may be negative.
See the test_round method in future/tests/test_builtins.py for
examples.
"""
Expand All @@ -28,7 +28,7 @@ def newround(number, ndigits=None):
ndigits = 0
if hasattr(number, '__round__'):
return number.__round__(ndigits)

if ndigits < 0:
raise NotImplementedError('negative ndigits not supported yet')
exponent = Decimal('10') ** (-ndigits)
Expand All @@ -48,7 +48,7 @@ def newround(number, ndigits=None):
return int(d)
else:
return float(d)


### From Python 2.7's decimal.py. Only needed to support Py2.6:

Expand Down
15 changes: 7 additions & 8 deletions script.module.future/libs/future/builtins/newsuper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def append(self, item):
"Of course, you can still explicitly pass in the arguments if you want
to do something strange. Sometimes you really do want that, e.g. to
skip over some classes in the method resolution order.
"How does it work? By inspecting the calling frame to determine the
function object being executed and the object on which it's being
called, and then walking the object's __mro__ chain to find out where
Expand All @@ -51,14 +51,14 @@ def newsuper(typ=_SENTINEL, type_or_obj=_SENTINEL, framedepth=1):
# Infer the correct call if used without arguments.
if typ is _SENTINEL:
# We'll need to do some frame hacking.
f = sys._getframe(framedepth)
f = sys._getframe(framedepth)

try:
# Get the function's first positional argument.
type_or_obj = f.f_locals[f.f_code.co_varnames[0]]
except (IndexError, KeyError,):
raise RuntimeError('super() used in a function with no args')

try:
# Get the MRO so we can crawl it.
mro = type_or_obj.__mro__
Expand All @@ -67,9 +67,9 @@ def newsuper(typ=_SENTINEL, type_or_obj=_SENTINEL, framedepth=1):
mro = type_or_obj.__class__.__mro__
except AttributeError:
raise RuntimeError('super() used with a non-newstyle class')

# A ``for...else`` block? Yes! It's odd, but useful.
# If unfamiliar with for...else, see:
# If unfamiliar with for...else, see:
#
# http://psung.blogspot.com/2007/12/for-else-in-python.html
for typ in mro:
Expand All @@ -88,7 +88,7 @@ def newsuper(typ=_SENTINEL, type_or_obj=_SENTINEL, framedepth=1):
try:
meth = meth.__func__
except AttributeError:
meth = meth.__get__(type_or_obj)
meth = meth.__get__(type_or_obj, typ)
except (AttributeError, TypeError):
continue
if meth.func_code is f.f_code:
Expand All @@ -98,7 +98,7 @@ def newsuper(typ=_SENTINEL, type_or_obj=_SENTINEL, framedepth=1):
break # Found! Break out of the search loop.
else:
raise RuntimeError('super() called outside a method')

# Dispatch to builtin super().
if type_or_obj is not _SENTINEL:
return _builtin_super(typ, type_or_obj)
Expand All @@ -112,4 +112,3 @@ def superm(*args, **kwds):


__all__ = ['newsuper']

1 change: 0 additions & 1 deletion script.module.future/libs/future/moves/test/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
__future_module__ = True
with suspend_hooks():
from test.test_support import *

22 changes: 19 additions & 3 deletions script.module.future/libs/future/moves/tkinter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@

if not PY3:
from Tkinter import *
from Tkinter import (_cnfmerge, _default_root, _flatten, _join, _setit,
_splitdict, _stringify, _support_default_root, _test,
_tkinter)
from Tkinter import (_cnfmerge, _default_root, _flatten,
_support_default_root, _test,
_tkinter, _setit)

try: # >= 2.7.4
from Tkinter import (_join)
except ImportError:
pass

try: # >= 2.7.4
from Tkinter import (_stringify)
except ImportError:
pass

try: # >= 2.7.9
from Tkinter import (_splitdict)
except ImportError:
pass

else:
from tkinter import *
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The tkColorChooser module is missing. Does your Py2 '
'installation include tkinter?')

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The tkCommonDialog module is missing. Does your Py2 '
'installation include tkinter?')

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The Tkconstants module is missing. Does your Py2 '
'installation include tkinter?')

1 change: 0 additions & 1 deletion script.module.future/libs/future/moves/tkinter/dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The Dialog module is missing. Does your Py2 '
'installation include tkinter?')

1 change: 0 additions & 1 deletion script.module.future/libs/future/moves/tkinter/dnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The Tkdnd module is missing. Does your Py2 '
'installation include tkinter?')

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The FileDialog module is missing. Does your Py2 '
'installation include tkinter?')

1 change: 0 additions & 1 deletion script.module.future/libs/future/moves/tkinter/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The tkFont module is missing. Does your Py2 '
'installation include tkinter?')

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The tkMessageBox module is missing. Does your Py2 '
'installation include tkinter?')

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The ScrolledText module is missing. Does your Py2 '
'installation include tkinter?')

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
except ImportError:
raise ImportError('The SimpleDialog module is missing. Does your Py2 '
'installation include tkinter?')

0 comments on commit 6b6b414

Please sign in to comment.