From b284a3168fa91a038925d2ecf5e4791011ea5e7d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 18 Nov 2019 10:15:03 +0000 Subject: gentoo resync : 18.11.2019 --- dev-python/future/Manifest | 7 +- dev-python/future/files/future-0.18.2-tests.patch | 269 ++++++++++++++++++++++ dev-python/future/future-0.17.0.ebuild | 1 + dev-python/future/future-0.17.1.ebuild | 31 ++- dev-python/future/future-0.18.2.ebuild | 61 +++++ 5 files changed, 356 insertions(+), 13 deletions(-) create mode 100644 dev-python/future/files/future-0.18.2-tests.patch create mode 100644 dev-python/future/future-0.18.2.ebuild (limited to 'dev-python/future') diff --git a/dev-python/future/Manifest b/dev-python/future/Manifest index f01d28210a6d..b9e028821a26 100644 --- a/dev-python/future/Manifest +++ b/dev-python/future/Manifest @@ -1,5 +1,8 @@ +AUX future-0.18.2-tests.patch 11773 BLAKE2B e2b9321ab2a04e4567c312beaccd23886c87f8b78c1de5d480205181a68b77d8c8b1582a57f43e510d5cd3ecc54252bb85130fe6d7e82756c9f1db11263fdf7b SHA512 d884d6b4e320a6e2aeca2c0c46576d9b0fd0d31aaa6f8f9a79f2007ecbc949f1393aa0b9254f0c51616ca4e8d3fb3f11d828879e4e8c01549acd4ecf04e2cf68 DIST future-0.17.0.tar.gz 827812 BLAKE2B 14bfce4927386b157da91e6bbad547e21bb622f7e81997bc4ac400842cec5f7a50d7a0f5a743c4c76a7b80be0dcb6f54c06901311fd27781d89a8d2df1cce7e9 SHA512 f2396379e8e36753aeafdf27225c2551a31b10036f21201f1c24d63c1bb318dbd491ec977af514a19a4d477b397df9eed9711be797a64e86fc00c4692729d876 DIST future-0.17.1.tar.gz 829119 BLAKE2B 95210b5128d25d6c189cd38bced873f096802690e8fab5f4591c08fa913c41dc255e24af1931cad91d872a286f690f47bf6e0aa365e2f6508b03b0d305779c26 SHA512 50094c44db81afbfd37ee25e1710ed11ecb2c2d64ad076fb62a2688dd36a9696ab26b0d7989bf1ecb10da251961a0ee6bb37c4dbd115f70384cd8c9a675d0b2d -EBUILD future-0.17.0.ebuild 1036 BLAKE2B 2bfde942c288fee10045ce4ef39aac59dcb9b7b9adf18ab23c69fa62795fdd8f873b5574a74248a92d43be72474555ed453ac7ec1889687bf7cd79ad915e2f01 SHA512 291a5bc6c0ee18de908362a7bc950f4733abf143988fcfabc26377f61273385b2141ad97cb14c13e8d09870a5968c17ed63b658202a4b353782977b2b007c31b -EBUILD future-0.17.1.ebuild 1047 BLAKE2B 0fb61f843a805b2a727b49bdc83aad3f256b22bffe3961f160118eb4eda225d1c069fd8d34f32d1e912075e0ab359dee5a1e94701e36e898a482110212dd8dae SHA512 03ab276ca715db83513cd0ff8b39f7b04b13eb990d1b8a07997092f1b1d40967ef6e56e7ed31b681941ffed0a27982e33355ece6a5ae92aa7ab0f6c11d9a542a +DIST future-0.18.2.tar.gz 829220 BLAKE2B 68574b589bf54aa8dacbd162a54885589faa32829ccf212f50de5bf036ebd8b9aba0c13e63e80d34e507cc0dae4d8d3d47fea33433b17d2c2e6dbf6c37f66d8f SHA512 91c025f7d94bcdf93df838fab67053165a414fc84e8496f92ecbb910dd55f6b6af5e360bbd051444066880c5a6877e75157bd95e150ead46e5c605930dfc50f2 +EBUILD future-0.17.0.ebuild 1063 BLAKE2B e2cd787f349b76f6b7fe1da85d520976dc2c63a11fad671358469c573579e0eba2be4b5b3b41b6095378b43a7391715ff199578a53cc54a4fe27b389228ada1e SHA512 3848c27fb924ab7bf1ed3c99a2f7ce73999c22a0a368476b7bb6398f47876eb59003f99e136ff1a60b21dee4d2459c5e71b084b546fcdfd91daf03eb179d3554 +EBUILD future-0.17.1.ebuild 1455 BLAKE2B 7d6696d9e0ea2d2d8abc8b226130905d5235c5486fb78fef9188f19b5fe653dc4236bd639a4811b20818bfe49fc887bce93553e789fb6b5f8f127de553815dd4 SHA512 19ff053bdf7d03650be438134a158947fceabc9246d6eb86d294271953c4a37dcf3d93d80260eaadecca6abce0b020ca140b20501955093971baf585362c5068 +EBUILD future-0.18.2.ebuild 1489 BLAKE2B 5d424652e540f7360dac9932c46e340e1288138a48954cd87ed9078fcc822e3db8560fe403521fafa1beccffc61e0c35f0ec9a47f018028fdfc49829b1f7f9eb SHA512 f58432e12a0d539ab889170b158cd1aa55db55e3e302f249da4c97dcbe2579f0450e8621e65c317c71cba24329dfd7e79ae0ef7553455d518af07c1a368e81e8 MISC metadata.xml 309 BLAKE2B ac0715185226cea8e3c38698ed3e494b6464d86dad0211e4d0583e3ceb6634c2b1ec230d9dff659d5ef47208b6f3358c701a0c42e49848816ae99703cab82f46 SHA512 e01e3b2733211e1eb6aaef4da19265c7165411a46fde4c2156118700c315bc2ad52cd87de1b90355741de77d91aa22eed5f9e5847d45186bf7138d246cd775e4 diff --git a/dev-python/future/files/future-0.18.2-tests.patch b/dev-python/future/files/future-0.18.2-tests.patch new file mode 100644 index 000000000000..3742adb72821 --- /dev/null +++ b/dev-python/future/files/future-0.18.2-tests.patch @@ -0,0 +1,269 @@ +diff --git a/tests/test_future/test_backports.py b/tests/test_future/test_backports.py +index 9eeb741..63b1afe 100644 +--- a/tests/test_future/test_backports.py ++++ b/tests/test_future/test_backports.py +@@ -87,7 +87,8 @@ class TestChainMap(unittest.TestCase): + d['b'] = 20 + d['c'] = 30 + self.assertEqual(d.maps, [{'b':20, 'c':30}, {'a':1, 'b':2}]) # check internal state +- self.assertEqual(d.items(), dict(a=1, b=20, c=30).items()) # check items/iter/getitem ++ self.assertEqual(sorted(d.items()), ++ sorted(dict(a=1, b=20, c=30).items())) # check items/iter/getitem + self.assertEqual(len(d), 3) # check len + for key in 'abc': # check contains + self.assertIn(key, d) +@@ -96,7 +97,8 @@ class TestChainMap(unittest.TestCase): + + del d['b'] # unmask a value + self.assertEqual(d.maps, [{'c':30}, {'a':1, 'b':2}]) # check internal state +- self.assertEqual(d.items(), dict(a=1, b=2, c=30).items()) # check items/iter/getitem ++ self.assertEqual(sorted(d.items()), ++ sorted(dict(a=1, b=2, c=30).items())) # check items/iter/getitem + self.assertEqual(len(d), 3) # check len + for key in 'abc': # check contains + self.assertIn(key, d) +diff --git a/tests/test_future/test_builtins.py b/tests/test_future/test_builtins.py +index ca07b9e..944d97b 100644 +--- a/tests/test_future/test_builtins.py ++++ b/tests/test_future/test_builtins.py +@@ -8,7 +8,7 @@ from future.builtins import (bytes, dict, int, range, round, str, super, + ascii, chr, hex, input, next, oct, open, pow, + filter, map, zip, min, max) + +-from future.utils import PY3, exec_, native_str, implements_iterator ++from future.utils import PYPY, PY2, PY3, exec_, native_str, implements_iterator + from future.tests.base import (unittest, skip26, expectedFailurePY2, + expectedFailurePY26) + +@@ -699,12 +699,13 @@ class BuiltinTest(unittest.TestCase): + self.assertEqual(eval('dir()', g, m), list('xyz')) + self.assertEqual(eval('globals()', g, m), g) + self.assertEqual(eval('locals()', g, m), m) +- self.assertRaises(TypeError, eval, 'a', m) ++ if not (PYPY and PY2): ++ self.assertRaises(TypeError, eval, 'a', m) + class A: + "Non-mapping" + pass + m = A() +- self.assertRaises(TypeError, eval, 'a', g, m) ++ self.assertRaises((AttributeError, TypeError), eval, 'a', g, m) + + # Verify that dict subclasses work as well + class D(dict): +@@ -784,8 +785,9 @@ class BuiltinTest(unittest.TestCase): + # self.assertRaisesRegex(NameError, "name 'print' is not defined", + # exec_, code, {'__builtins__': {}}) + # Now: +- self.assertRaises(NameError, +- exec_, code, {'__builtins__': {}}) ++ if not PYPY: ++ self.assertRaises(NameError, ++ exec_, code, {'__builtins__': {}}) + # __builtins__ must be a mapping type + # Was: + # self.assertRaises(TypeError, +@@ -797,8 +799,9 @@ class BuiltinTest(unittest.TestCase): + # Was: + # self.assertRaisesRegex(NameError, "__build_class__ not found", + # exec_, code, {'__builtins__': {}}) +- self.assertRaises(NameError, +- exec_, code, {'__builtins__': {}}) ++ if not PYPY: ++ self.assertRaises(NameError, ++ exec_, code, {'__builtins__': {}}) + + class frozendict_error(Exception): + pass +@@ -1304,8 +1307,9 @@ class BuiltinTest(unittest.TestCase): + self.assertAlmostEqual(pow(-1, 0.5), 1j) + self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j) + +- # Raises TypeError in Python < v3.5, ValueError in v3.5: +- self.assertRaises((TypeError, ValueError), pow, -1, -2, 3) ++ if sys.hexversion < 0x03080000: ++ # Raises TypeError in Python < v3.5, ValueError in v3.5: ++ self.assertRaises((TypeError, ValueError), pow, -1, -2, 3) + self.assertRaises(ValueError, pow, 1, 2, 0) + + self.assertRaises(TypeError, pow) +diff --git a/tests/test_future/test_futurize.py b/tests/test_future/test_futurize.py +index 0d7c42d..4590185 100644 +--- a/tests/test_future/test_futurize.py ++++ b/tests/test_future/test_futurize.py +@@ -13,7 +13,7 @@ from lib2to3.pygram import token + + from future.tests.base import (CodeHandler, unittest, skip26, reformat_code, + order_future_lines, expectedFailurePY26) +-from future.utils import PY2 ++from future.utils import PY2, PY3, PYPY + + + class TestLibFuturize(unittest.TestCase): +@@ -565,6 +565,7 @@ class TestFuturizeSimple(CodeHandler): + # tarball.write(r2.content) + + @expectedFailurePY26 ++ @unittest.skipIf(PYPY and PY3, '') + def test_raw_input(self): + """ + Passes in a string to the waiting input() after futurize +diff --git a/tests/test_future/test_int.py b/tests/test_future/test_int.py +index 573a0d5..6172e48 100644 +--- a/tests/test_future/test_int.py ++++ b/tests/test_future/test_int.py +@@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, + print_function, unicode_literals) + from future.builtins import * + from future.tests.base import unittest, expectedFailurePY2 +-from future.utils import PY26, PY2, raise_from ++from future.utils import PY26, PY2, PY3, PYPY, raise_from + + import sys + import random +@@ -357,7 +357,8 @@ class IntTestCases(unittest.TestCase): + self.assertEqual(int(Foo0()), 42) + self.assertEqual(int(Foo1()), 42) + self.assertEqual(int(Foo2()), 42) +- self.assertEqual(int(Foo3()), 0) ++ if not (PYPY and PY3): ++ self.assertEqual(int(Foo3()), 0) + self.assertEqual(int(Foo4()), 42) + self.assertRaises(TypeError, int, Foo5()) + +diff --git a/tests/test_future/test_isinstance.py b/tests/test_future/test_isinstance.py +index 33c0a58..ccda709 100644 +--- a/tests/test_future/test_isinstance.py ++++ b/tests/test_future/test_isinstance.py +@@ -4,6 +4,7 @@ From the Python 3.3 test suite + + from __future__ import (absolute_import, division, unicode_literals) + from future.builtins import * ++from future.utils import PYPY + + # Tests some corner cases with isinstance() and issubclass(). While these + # tests use new style classes and properties, they actually do whitebox +@@ -264,11 +265,13 @@ class TestIsInstanceIsSubclass(unittest.TestCase): + self.assertEqual(True, issubclass(int, (int, (float, int)))) + self.assertEqual(True, issubclass(str, (str, (Child, NewChild, str)))) + ++ @unittest.skipIf(PYPY, '') + def test_subclass_recursion_limit(self): + # make sure that issubclass raises RuntimeError before the C stack is + # blown + self.assertRaises(RuntimeError, blowstack, issubclass, str, str) + ++ @unittest.skipIf(PYPY, '') + def test_isinstance_recursion_limit(self): + # make sure that issubclass raises RuntimeError before the C stack is + # blown +diff --git a/tests/test_future/test_str.py b/tests/test_future/test_str.py +index 5108548..eac602f 100644 +--- a/tests/test_future/test_str.py ++++ b/tests/test_future/test_str.py +@@ -201,6 +201,7 @@ class TestStr(unittest.TestCase): + with self.assertRaises(TypeError): + s.join(byte_strings2) + ++ @unittest.skipIf(utils.PYPY and utils.PY2, '') + def test_str_join_staticmethod(self): + """ + Issue #33 +@@ -430,10 +431,11 @@ class TestStr(unittest.TestCase): + e = s * long(4) + self.assertTrue(isinstance(e, str)) + self.assertEqual(e, u'ABCABCABCABC') +- with self.assertRaises(TypeError): +- s * 3.3 +- with self.assertRaises(TypeError): +- s * (3.3 + 3j) ++ if not (utils.PYPY and utils.PY2): ++ with self.assertRaises(TypeError): ++ s * 3.3 ++ with self.assertRaises(TypeError): ++ s * (3.3 + 3j) + + def test_rmul(self): + s = str(u'XYZ') +@@ -447,10 +449,11 @@ class TestStr(unittest.TestCase): + e = long(3) * s + self.assertTrue(isinstance(e, str)) + self.assertEqual(e, u'XYZXYZXYZ') +- with self.assertRaises(TypeError): +- 3.3 * s +- with self.assertRaises(TypeError): +- (3.3 + 3j) * s ++ if not (utils.PYPY and utils.PY2): ++ with self.assertRaises(TypeError): ++ 3.3 * s ++ with self.assertRaises(TypeError): ++ (3.3 + 3j) * s + + @unittest.skip('Fails on Python <= 2.7.6 due to string subclass slicing bug') + def test_slice(self): +diff --git a/tests/test_future/test_urllib2.py b/tests/test_future/test_urllib2.py +index 2d69dad..3750737 100644 +--- a/tests/test_future/test_urllib2.py ++++ b/tests/test_future/test_urllib2.py +@@ -691,10 +691,7 @@ 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" + for url, host, port, user, passwd, type_, dirs, filename, mimetype in [ + ("ftp://localhost/foo/bar/baz.html", + "localhost", ftplib.FTP_PORT, "", "", "I", +diff --git a/tests/test_past/test_builtins.py b/tests/test_past/test_builtins.py +index d16978e..f37b26c 100644 +--- a/tests/test_past/test_builtins.py ++++ b/tests/test_past/test_builtins.py +@@ -21,6 +21,7 @@ import random + from os import unlink + from operator import neg + from future.tests.base import unittest, expectedFailurePY3, skip26 ++from future.utils import PYPY, PY2 + + # count the number of test runs. + # used to skip running test_execfile() multiple times +@@ -423,6 +424,7 @@ class BuiltinTest(unittest.TestCase): + self.assertRaises(TypeError, eval, ()) + + @expectedFailurePY3 ++ @unittest.skipIf(PYPY and PY2, '') + def test_general_eval(self): + # Tests that general mappings can be used for the locals argument + +@@ -1174,7 +1176,8 @@ class BuiltinTest(unittest.TestCase): + def __cmp__(self, other): + raise RuntimeError + __hash__ = None # Invalid cmp makes this unhashable +- self.assertRaises(RuntimeError, range, a, a + 1, badzero(1)) ++ if not (PYPY and PY2): ++ self.assertRaises(RuntimeError, range, a, a + 1, badzero(1)) + + # Reject floats. + self.assertRaises(TypeError, range, 1., 1., 1.) +diff --git a/tests/test_past/test_olddict.py b/tests/test_past/test_olddict.py +index 9f21060..539c277 100644 +--- a/tests/test_past/test_olddict.py ++++ b/tests/test_past/test_olddict.py +@@ -7,7 +7,7 @@ from __future__ import absolute_import, unicode_literals, print_function + import os + import sys + +-from future.utils import implements_iterator, PY3 ++from future.utils import implements_iterator, PYPY, PY2, PY3 + from future.tests.base import unittest, skip26 + from past.builtins import dict + +@@ -415,6 +415,7 @@ class Py2DictTest(unittest.TestCase): + self.assertRaises(Exc, d.setdefault, x, []) + + @skip26 ++ @unittest.skipIf(PYPY, '') + def test_setdefault_atomic(self): + # Issue #13521: setdefault() calls __hash__ and __eq__ only once. + class Hashed(object): diff --git a/dev-python/future/future-0.17.0.ebuild b/dev-python/future/future-0.17.0.ebuild index c8748ca26019..f314fd9d3021 100644 --- a/dev-python/future/future-0.17.0.ebuild +++ b/dev-python/future/future-0.17.0.ebuild @@ -15,6 +15,7 @@ LICENSE="MIT" SLOT="0" KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="doc test" +RESTRICT="!test? ( test )" BDEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] diff --git a/dev-python/future/future-0.17.1.ebuild b/dev-python/future/future-0.17.1.ebuild index e99e2709bfab..0aee1d1a9313 100644 --- a/dev-python/future/future-0.17.1.ebuild +++ b/dev-python/future/future-0.17.1.ebuild @@ -14,25 +14,38 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="doc test" +IUSE="doc" +distutils_enable_tests pytest + +# TODO: make numpy unconditional when it supports py3.8 BDEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] doc? ( - dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}] + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}] + ' python{2_7,3_{5,6,7}}) ) test? ( - dev-python/numpy[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ + python{2_7,3_{5,6,7}}) ) " -PATCHES=( -) +python_check_deps() { + use doc || return 0 + has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && + has_version "dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]" +} python_prepare_all() { sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die + # tests requiring network access + rm tests/test_future/test_requests.py || die + sed -i -e 's:test.*request_http:_&:' \ + tests/test_future/test_standard_library.py || die + distutils-r1_python_prepare_all } @@ -42,7 +55,3 @@ python_compile_all() { HTML_DOCS=( docs/_build/html/. ) fi } - -python_test() { - pytest -vv || die "Tests failed under ${EPYTHON}" -} diff --git a/dev-python/future/future-0.18.2.ebuild b/dev-python/future/future-0.18.2.ebuild new file mode 100644 index 000000000000..d5b55ddea8d2 --- /dev/null +++ b/dev-python/future/future-0.18.2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_{5,6,7,8}} pypy{,3} ) + +inherit distutils-r1 + +DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility" +HOMEPAGE="http://python-future.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc" + +distutils_enable_tests pytest + +# TODO: make numpy unconditional when it supports py3.8 +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}] + ') + ) + test? ( + $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ + python{2_7,3_{5,6,7}}) + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-tests.patch +) + +python_check_deps() { + use doc || return 0 + has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && + has_version "dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]" +} + +python_prepare_all() { + sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die + # tests requiring network access + rm tests/test_future/test_requests.py || die + sed -i -e 's:test.*request_http:_&:' \ + tests/test_future/test_standard_library.py || die + + distutils-r1_python_prepare_all +} + +python_compile_all() { + if use doc; then + sphinx-build docs/ docs/_build/html || die + HTML_DOCS=( docs/_build/html/. ) + fi +} -- cgit v1.2.3