Hello community, here is the log from the commit of package python-future for openSUSE:Factory checked in at 2019-12-11 12:09:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-future (Old) and /work/SRC/openSUSE:Factory/.python-future.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-future" Wed Dec 11 12:09:33 2019 rev:11 rq:754444 version:0.18.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-future/python-future.changes 2019-11-04 17:05:27.488200344 +0100 +++ /work/SRC/openSUSE:Factory/.python-future.new.4691/python-future.changes 2019-12-11 12:10:33.352603291 +0100 @@ -1,0 +2,16 @@ +Thu Dec 5 15:02:01 CET 2019 - Matej Cepl <[email protected]> + +- Update to 0.18.2: + - Fix min/max functions with generators, and 'None' default (PR #514) + - Use BaseException in raise_() (PR #515) + - Fix builtins.round() for Decimals (Issue #501) + - Fix raise_from() to prevent failures with immutable classes (PR #518) + - Make FixInput idempotent (Issue #427) + - Fix type in newround (PR #521) + - Support mimetype guessing in urllib2 for Py3.8+ (Issue #508) + - fix for raise_() when passed an exception that's not an + Exception (e.g. BaseException subclasses) +- Rebase future-correct-mimetype.patch to revert incorrect fix in + gh#PythonCharmers/python-future#508 + +------------------------------------------------------------------- Old: ---- future-0.18.0.tar.gz New: ---- future-0.18.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-future.spec ++++++ --- /var/tmp/diff_new_pack.Xhpkoc/_old 2019-12-11 12:10:43.076599201 +0100 +++ /var/tmp/diff_new_pack.Xhpkoc/_new 2019-12-11 12:10:43.076599201 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-future # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,23 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-future -Version: 0.18.0 +Version: 0.18.2 Release: 0 Summary: Single-source support for Python 3 and 2 -License: MIT AND Python-2.0 # See https://github.com/PythonCharmers/python-future/issues/242 for PSF licensing -Url: https://python-future.org +License: MIT AND Python-2.0 +URL: https://python-future.org Source0: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz Source100: python-future-rpmlintrc # PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 [email protected] Patch0: python38-pow.patch -# UPSTREAM ISSUE https://github.com/PythonCharmers/python-future/issues/508 +# UPSTREAM ISSUE gh#PythonCharmers/python-future#508 Patch1: future-correct-mimetype.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} ++++++ future-0.18.0.tar.gz -> future-0.18.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/PKG-INFO new/future-0.18.2/PKG-INFO --- old/future-0.18.0/PKG-INFO 2019-10-10 02:16:51.000000000 +0200 +++ new/future-0.18.2/PKG-INFO 2019-10-31 01:57:06.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.2 Name: future -Version: 0.18.0 +Version: 0.18.2 Summary: Clean single-source support for Python 3 and 2 Home-page: https://python-future.org Author: Ed Schofield Author-email: [email protected] License: MIT +Description-Content-Type: UNKNOWN Description: future: Easy, safe support for Python 2/3 compatibility ======================================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/docs/credits.rst new/future-0.18.2/docs/credits.rst --- old/future-0.18.0/docs/credits.rst 2019-10-10 02:03:55.000000000 +0200 +++ new/future-0.18.2/docs/credits.rst 2019-10-31 01:56:12.000000000 +0100 @@ -48,6 +48,7 @@ Python-Future is largely written by Ed Schofield <[email protected]> with the help of various contributors: - Jordan Adler +- Jeroen Akkerman - Kyle Altendorf - Grant Bakker - Jacob Beck @@ -70,6 +71,7 @@ - Michael Joseph - Waldemar Kornewald - Alexey Kotlyarov +- Steve Kowalik - Lion Krischer - Marcin Kuzminski - Joshua Landau @@ -81,6 +83,7 @@ - Anika Mukherji - Jon Parise - Matthew Parnell +- Tom Picton - Miga Purg - Éloi Rivard - Sesh Sadasivam @@ -91,6 +94,7 @@ - Sameera Somisetty - Louis Sautier - Gregory P. Smith +- Chase Sterling - Daniel Szoska - Flaviu Tamas - Jeff Tratner diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/docs/whatsnew.rst new/future-0.18.2/docs/whatsnew.rst --- old/future-0.18.0/docs/whatsnew.rst 2019-10-10 01:55:07.000000000 +0200 +++ new/future-0.18.2/docs/whatsnew.rst 2019-10-31 01:56:12.000000000 +0100 @@ -3,6 +3,25 @@ What's New ********** +What's new in version 0.18.2 (2019-10-30) +========================================= +This is a minor bug-fix release containing a number of fixes: +- Fix min/max functions with generators, and 'None' default (PR #514) +- Use BaseException in raise_() (PR #515) +- Fix builtins.round() for Decimals (Issue #501) +- Fix raise_from() to prevent failures with immutable classes (PR #518) +- Make FixInput idempotent (Issue #427) +- Fix type in newround (PR #521) +- Support mimetype guessing in urllib2 for Py3.8+ (Issue #508) + +Python 3.8 is not yet officially supported. + +What's new in version 0.18.1 (2019-10-09) +========================================= +This is a minor bug-fix release containing a fix for raise_() +when passed an exception that's not an Exception (e.g. BaseException +subclasses) + What's new in version 0.18.0 (2019-10-09) ========================================= This is a major bug-fix and feature release, including: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future/__init__.py new/future-0.18.2/src/future/__init__.py --- old/future-0.18.0/src/future/__init__.py 2019-10-10 02:12:35.000000000 +0200 +++ new/future-0.18.2/src/future/__init__.py 2019-10-31 01:56:12.000000000 +0100 @@ -87,7 +87,7 @@ __copyright__ = 'Copyright 2013-2019 Python Charmers Pty Ltd' __ver_major__ = 0 __ver_minor__ = 18 -__ver_patch__ = 0 +__ver_patch__ = 2 __ver_sub__ = '' __version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__, __ver_patch__, __ver_sub__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future/builtins/new_min_max.py new/future-0.18.2/src/future/builtins/new_min_max.py --- old/future-0.18.0/src/future/builtins/new_min_max.py 2019-10-02 23:21:14.000000000 +0200 +++ new/future-0.18.2/src/future/builtins/new_min_max.py 2019-10-31 01:56:12.000000000 +0100 @@ -1,9 +1,13 @@ +import itertools + from future import utils if utils.PY2: from __builtin__ import max as _builtin_max, min as _builtin_min else: from builtins import max as _builtin_max, min as _builtin_min +_SENTINEL = object() + def newmin(*args, **kwargs): return new_min_max(_builtin_min, *args, **kwargs) @@ -29,21 +33,24 @@ if len(args) == 0: raise TypeError - if len(args) != 1 and kwargs.get('default') is not None: + if len(args) != 1 and kwargs.get('default', _SENTINEL) is not _SENTINEL: raise TypeError if len(args) == 1: + iterator = iter(args[0]) try: - next(iter(args[0])) + first = next(iterator) except StopIteration: - if kwargs.get('default') is not None: + if kwargs.get('default', _SENTINEL) is not _SENTINEL: return kwargs.get('default') else: - raise ValueError('iterable is an empty sequence') + raise ValueError('{}() arg is an empty sequence'.format(_builtin_func.__name__)) + else: + iterator = itertools.chain([first], iterator) if kwargs.get('key') is not None: - return _builtin_func(args[0], key=kwargs.get('key')) + return _builtin_func(iterator, key=kwargs.get('key')) else: - return _builtin_func(args[0]) + return _builtin_func(iterator) if len(args) > 1: if kwargs.get('key') is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future/builtins/newround.py new/future-0.18.2/src/future/builtins/newround.py --- old/future-0.18.0/src/future/builtins/newround.py 2019-10-02 23:21:14.000000000 +0200 +++ new/future-0.18.2/src/future/builtins/newround.py 2019-10-31 01:56:12.000000000 +0100 @@ -38,11 +38,14 @@ if 'numpy' in repr(type(number)): number = float(number) - if not PY26: - d = Decimal.from_float(number).quantize(exponent, - rounding=ROUND_HALF_EVEN) + if isinstance(number, Decimal): + d = number else: - d = from_float_26(number).quantize(exponent, rounding=ROUND_HALF_EVEN) + if not PY26: + d = Decimal.from_float(number).quantize(exponent, + rounding=ROUND_HALF_EVEN) + else: + d = from_float_26(number).quantize(exponent, rounding=ROUND_HALF_EVEN) if return_int: return int(d) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future/utils/__init__.py new/future-0.18.2/src/future/utils/__init__.py --- old/future-0.18.0/src/future/utils/__init__.py 2019-10-10 01:40:10.000000000 +0200 +++ new/future-0.18.2/src/future/utils/__init__.py 2019-10-31 01:56:12.000000000 +0100 @@ -408,17 +408,17 @@ allows re-raising exceptions with the cls value and traceback on Python 2 and 3. """ - if isinstance(tp, Exception): + if isinstance(tp, BaseException): # If the first object is an instance, the type of the exception # is the class of the instance, the instance itself is the value, # and the second object must be None. if value is not None: raise TypeError("instance exception may not have a separate value") exc = tp - elif not issubclass(tp, Exception): + elif isinstance(tp, type) and not issubclass(tp, BaseException): # If the first object is a class, it becomes the type of the # exception. - raise TypeError("class must derive from Exception") + raise TypeError("class must derive from BaseException, not %s" % tp.__name__) else: # The second object is used to determine the exception value: If it # is an instance of the class, the instance becomes the exception @@ -475,7 +475,7 @@ e.__suppress_context__ = True elif isinstance(cause, BaseException): e.__cause__ = cause - e.__cause__.__traceback__ = sys.exc_info()[2] + object.__setattr__(e.__cause__, '__traceback__', sys.exc_info()[2]) e.__suppress_context__ = True else: raise TypeError("exception causes must derive from BaseException") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future.egg-info/PKG-INFO new/future-0.18.2/src/future.egg-info/PKG-INFO --- old/future-0.18.0/src/future.egg-info/PKG-INFO 2019-10-10 02:16:51.000000000 +0200 +++ new/future-0.18.2/src/future.egg-info/PKG-INFO 2019-10-31 01:57:05.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.2 Name: future -Version: 0.18.0 +Version: 0.18.2 Summary: Clean single-source support for Python 3 and 2 Home-page: https://python-future.org Author: Ed Schofield Author-email: [email protected] License: MIT +Description-Content-Type: UNKNOWN Description: future: Easy, safe support for Python 2/3 compatibility ======================================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future.egg-info/SOURCES.txt new/future-0.18.2/src/future.egg-info/SOURCES.txt --- old/future-0.18.0/src/future.egg-info/SOURCES.txt 2019-10-10 02:16:51.000000000 +0200 +++ new/future-0.18.2/src/future.egg-info/SOURCES.txt 2019-10-31 01:57:06.000000000 +0100 @@ -271,6 +271,7 @@ src/libfuturize/fixes/fix_future_builtins.py src/libfuturize/fixes/fix_future_standard_library.py src/libfuturize/fixes/fix_future_standard_library_urllib.py +src/libfuturize/fixes/fix_input.py src/libfuturize/fixes/fix_metaclass.py src/libfuturize/fixes/fix_next_call.py src/libfuturize/fixes/fix_object.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/future.egg-info/top_level.txt new/future-0.18.2/src/future.egg-info/top_level.txt --- old/future-0.18.0/src/future.egg-info/top_level.txt 2019-10-10 02:16:51.000000000 +0200 +++ new/future-0.18.2/src/future.egg-info/top_level.txt 2019-10-31 01:57:05.000000000 +0100 @@ -1,4 +1,17 @@ +_dummy_thread +_markupbase +_thread +builtins +copyreg future +html +http libfuturize libpasteurize past +queue +reprlib +socketserver +tkinter +winreg +xmlrpc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/libfuturize/fixes/__init__.py new/future-0.18.2/src/libfuturize/fixes/__init__.py --- old/future-0.18.0/src/libfuturize/fixes/__init__.py 2019-10-02 23:21:14.000000000 +0200 +++ new/future-0.18.2/src/libfuturize/fixes/__init__.py 2019-10-31 01:56:12.000000000 +0100 @@ -50,7 +50,7 @@ 'lib2to3.fixes.fix_getcwdu', # 'lib2to3.fixes.fix_imports', # called by libfuturize.fixes.fix_future_standard_library # 'lib2to3.fixes.fix_imports2', # we don't handle this yet (dbm) - 'lib2to3.fixes.fix_input', + # 'lib2to3.fixes.fix_input', # Called conditionally by libfuturize.fixes.fix_input 'lib2to3.fixes.fix_itertools', 'lib2to3.fixes.fix_itertools_imports', 'lib2to3.fixes.fix_filter', @@ -86,6 +86,7 @@ 'libfuturize.fixes.fix_future_builtins', 'libfuturize.fixes.fix_future_standard_library', 'libfuturize.fixes.fix_future_standard_library_urllib', + 'libfuturize.fixes.fix_input', 'libfuturize.fixes.fix_metaclass', 'libpasteurize.fixes.fix_newstyle', 'libfuturize.fixes.fix_object', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/src/libfuturize/fixes/fix_input.py new/future-0.18.2/src/libfuturize/fixes/fix_input.py --- old/future-0.18.0/src/libfuturize/fixes/fix_input.py 1970-01-01 01:00:00.000000000 +0100 +++ new/future-0.18.2/src/libfuturize/fixes/fix_input.py 2019-10-31 01:56:12.000000000 +0100 @@ -0,0 +1,32 @@ +""" +Fixer for input. + +Does a check for `from builtins import input` before running the lib2to3 fixer. +The fixer will not run when the input is already present. + + +this: + a = input() +becomes: + from builtins import input + a = eval(input()) + +and this: + from builtins import input + a = input() +becomes (no change): + from builtins import input + a = input() +""" + +import lib2to3.fixes.fix_input +from lib2to3.fixer_util import does_tree_import + + +class FixInput(lib2to3.fixes.fix_input.FixInput): + def transform(self, node, results): + + if does_tree_import('builtins', 'input', node): + return + + return super(FixInput, self).transform(node, results) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/tests/test_future/test_builtins.py new/future-0.18.2/tests/test_future/test_builtins.py --- old/future-0.18.0/tests/test_future/test_builtins.py 2019-10-02 23:21:13.000000000 +0200 +++ new/future-0.18.2/tests/test_future/test_builtins.py 2019-10-31 01:56:12.000000000 +0100 @@ -1105,6 +1105,7 @@ with self.assertRaises(TypeError): max(1, 2, default=0) self.assertEqual(max([], default=0), 0) + self.assertIs(max([], default=None), None) def test_min(self): self.assertEqual(min('123123'), '1') @@ -1123,6 +1124,7 @@ def __getitem__(self, index): raise ValueError self.assertRaises(ValueError, min, BadSeq()) + self.assertEqual(max(x for x in [5, 4, 3]), 5) for stmt in ( "min(key=int)", # no args @@ -1149,11 +1151,15 @@ sorted(data, key=f)[0]) self.assertEqual(min([], default=5), 5) self.assertEqual(min([], default=0), 0) + self.assertIs(min([], default=None), None) with self.assertRaises(TypeError): max(None, default=5) with self.assertRaises(TypeError): max(1, 2, default=0) + # Test iterables that can only be looped once #510 + self.assertEqual(min(x for x in [5]), 5) + def test_next(self): it = iter(range(2)) self.assertEqual(next(it), 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/tests/test_future/test_futurize.py new/future-0.18.2/tests/test_future/test_futurize.py --- old/future-0.18.0/tests/test_future/test_futurize.py 2019-10-02 23:21:13.000000000 +0200 +++ new/future-0.18.2/tests/test_future/test_futurize.py 2019-10-31 01:56:12.000000000 +0100 @@ -436,6 +436,27 @@ """ self.convert_check(before, after, ignore_imports=False, run=False) + def test_input_without_import(self): + before = """ + a = input() + """ + after = """ + from builtins import input + a = eval(input()) + """ + self.convert_check(before, after, ignore_imports=False, run=False) + + def test_input_with_import(self): + before = """ + from builtins import input + a = input() + """ + after = """ + from builtins import input + a = input() + """ + self.convert_check(before, after, ignore_imports=False, run=False) + def test_xrange(self): """ The ``from builtins import range`` line was being added to the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/tests/test_future/test_urllib2.py new/future-0.18.2/tests/test_future/test_urllib2.py --- old/future-0.18.0/tests/test_future/test_urllib2.py 2019-10-02 23:21:13.000000000 +0200 +++ new/future-0.18.2/tests/test_future/test_urllib2.py 2019-10-31 01:56:12.000000000 +0100 @@ -691,6 +691,10 @@ h = NullFTPHandler(data) h.parent = MockOpener() + # MIME guessing works in Python 3.8! + guessed_mime = None + if sys.hexversion >= 0x03080000: + guessed_mime = "image/gif" for url, host, port, user, passwd, type_, dirs, filename, mimetype in [ ("ftp://localhost/foo/bar/baz.html", "localhost", ftplib.FTP_PORT, "", "", "I", @@ -709,7 +713,7 @@ ["foo", "bar"], "", None), ("ftp://localhost/baz.gif;type=a", "localhost", ftplib.FTP_PORT, "", "", "A", - [], "baz.gif", None), # XXX really this should guess image/gif + [], "baz.gif", guessed_mime), ]: req = Request(url) req.timeout = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/future-0.18.0/tests/test_future/test_utils.py new/future-0.18.2/tests/test_future/test_utils.py --- old/future-0.18.0/tests/test_future/test_utils.py 2019-10-10 01:40:10.000000000 +0200 +++ new/future-0.18.2/tests/test_future/test_utils.py 2019-10-31 01:56:12.000000000 +0100 @@ -111,13 +111,13 @@ self.assertFalse(isbytes(self.s2)) def test_raise_(self): - def valerror(): + def valuerror(): try: raise ValueError("Apples!") except Exception as e: raise_(e) - self.assertRaises(ValueError, valerror) + self.assertRaises(ValueError, valuerror) def with_value(): raise_(IOError, "This is an error") @@ -143,6 +143,17 @@ except IOError as e: self.assertEqual(str(e), "An error") + class Timeout(BaseException): + pass + + self.assertRaises(Timeout, raise_, Timeout) + self.assertRaises(Timeout, raise_, Timeout()) + + if PY3: + self.assertRaisesRegexp( + TypeError, "class must derive from BaseException", + raise_, int) + def test_raise_from_None(self): try: try: ++++++ future-correct-mimetype.patch ++++++ --- /var/tmp/diff_new_pack.Xhpkoc/_old 2019-12-11 12:10:43.260599123 +0100 +++ /var/tmp/diff_new_pack.Xhpkoc/_new 2019-12-11 12:10:43.264599122 +0100 @@ -1,22 +1,22 @@ ---- a/tests/test_future/test_urllib2.py 2019-10-14 12:22:14.230684473 +1100 -+++ b/tests/test_future/test_urllib2.py 2019-10-14 12:35:31.722438625 +1100 -@@ -691,6 +691,10 @@ +--- a/tests/test_future/test_urllib2.py ++++ b/tests/test_future/test_urllib2.py +@@ -691,10 +691,6 @@ class HandlerTests(unittest.TestCase): h = NullFTPHandler(data) h.parent = MockOpener() -+ # MIME guessing works in Python 3.8! -+ guessed_mime = None -+ if sys.hexversion >= 0x03080000: -+ guessed_mime = "image/gif" +- # MIME guessing works in Python 3.8! +- guessed_mime = None +- if sys.hexversion >= 0x03080000: +- guessed_mime = "image/gif" for url, host, port, user, passwd, type_, dirs, filename, mimetype in [ ("ftp://localhost/foo/bar/baz.html", "localhost", ftplib.FTP_PORT, "", "", "I", -@@ -709,7 +714,7 @@ +@@ -713,7 +709,7 @@ class HandlerTests(unittest.TestCase): ["foo", "bar"], "", None), ("ftp://localhost/baz.gif;type=a", "localhost", ftplib.FTP_PORT, "", "", "A", -- [], "baz.gif", None), # XXX really this should guess image/gif -+ [], "baz.gif", guessed_mime), +- [], "baz.gif", guessed_mime), ++ [], "baz.gif", None), ]: req = Request(url) req.timeout = None ++++++ python38-pow.patch ++++++ --- /var/tmp/diff_new_pack.Xhpkoc/_old 2019-12-11 12:10:43.288599112 +0100 +++ /var/tmp/diff_new_pack.Xhpkoc/_new 2019-12-11 12:10:43.288599112 +0100 @@ -16,7 +16,7 @@ self.assertRaises(ValueError, pow, -342.43, 0.234) --- a/tests/test_future/test_builtins.py +++ b/tests/test_future/test_builtins.py -@@ -1286,7 +1286,6 @@ class BuiltinTest(unittest.TestCase): +@@ -1305,7 +1305,6 @@ class BuiltinTest(unittest.TestCase): self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j) # Raises TypeError in Python < v3.5, ValueError in v3.5:
