From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/future/files/, dev-python/future/
Date: Sun, 4 Sep 2016 18:58:25 +0000 (UTC) [thread overview]
Message-ID: <1473015471.5077441631135a94971860a8df76236db9437150.soap@gentoo> (raw)
commit: 5077441631135a94971860a8df76236db9437150
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 4 17:14:23 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Sep 4 18:57:51 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50774416
dev-python/future: Add py3.5 support
* Requires backporting some fixes for the testsuite
Package-Manager: portage-2.3.0
.../future-0.15.2-fix-py35-test-failures.patch | 57 ++++++++++++++++++++++
dev-python/future/future-0.15.2.ebuild | 7 ++-
2 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/dev-python/future/files/future-0.15.2-fix-py35-test-failures.patch b/dev-python/future/files/future-0.15.2-fix-py35-test-failures.patch
new file mode 100644
index 00000000..8d8e5da
--- /dev/null
+++ b/dev-python/future/files/future-0.15.2-fix-py35-test-failures.patch
@@ -0,0 +1,57 @@
+* Fix test failures on py3.5, backported from git, see also
+ https://github.com/PythonCharmers/python-future/issues/183
+* Fix unexpected test successes on py3.5, which are now correct
+
+--- a/tests/test_future/test_bytes.py
++++ b/tests/test_future/test_bytes.py
+@@ -10,6 +10,8 @@
+ from numbers import Integral
+ from future.tests.base import unittest, expectedFailurePY2
+
++import sys
++
+
+ TEST_UNICODE_STR = u'ℝεα∂@ßʟ℮ ☂ℯṧт υηḯ¢☺ḓ℮'
+ # Tk icon as a .gif:
+@@ -534,6 +536,8 @@
+ self.assertRaises(ValueError, bytes.maketrans, b'abc', b'xyzq')
+ self.assertRaises(TypeError, bytes.maketrans, 'abc', 'def')
+
++ @unittest.skipIf(sys.version_info[:2] == (3, 5),
++ 'Only works in Py3.5+')
+ @unittest.expectedFailure
+ def test_mod(self):
+ """
+@@ -551,6 +555,8 @@
+ a = b % (b'seventy-nine', 79)
+ self.assertEqual(a, b'seventy-nine / 100 = 79%')
+
++ @unittest.skipIf(sys.version_info[:2] == (3, 5),
++ 'Only works in Py3.5+')
+ @unittest.expectedFailure
+ def test_imod(self):
+ """
+--- a/tests/test_future/test_builtins.py
++++ b/tests/test_future/test_builtins.py
+@@ -525,11 +525,10 @@
+ self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'badmode')
+ self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'single', 0xff)
+ # Raises TypeError in Python < v3.5, ValueError in v3.5:
+- # self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
++ self.assertRaises((TypeError, ValueError), compile, chr(0), 'f', 'exec')
+ self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
+ mode='eval', source='0', filename='tmp')
+ compile('print("\xe5")\n', '', 'exec')
+- self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
+ self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad')
+
+ # test the optimize argument
+@@ -1287,7 +1286,7 @@
+ self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
+
+ # Raises TypeError in Python < v3.5, ValueError in v3.5:
+- # self.assertRaises(TypeError, pow, -1, -2, 3)
++ self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
+ self.assertRaises(ValueError, pow, 1, 2, 0)
+
+ self.assertRaises(TypeError, pow)
diff --git a/dev-python/future/future-0.15.2.ebuild b/dev-python/future/future-0.15.2.ebuild
index 1c5c970..9bafd05 100644
--- a/dev-python/future/future-0.15.2.ebuild
+++ b/dev-python/future/future-0.15.2.ebuild
@@ -2,8 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
-PYTHON_COMPAT=(python{2_7,3_4})
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit distutils-r1
@@ -16,6 +17,8 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
+PATCHES=( "${FILESDIR}/${P}-fix-py35-test-failures.patch" )
+
python_test() {
esetup.py test || die
}
next reply other threads:[~2016-09-04 18:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 18:58 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-08-21 14:46 [gentoo-commits] repo/gentoo:master commit in: dev-python/future/files/, dev-python/future/ Louis Sautier
2019-11-15 22:55 Michał Górny
2020-05-26 12:58 Michał Górny
2023-06-27 12:01 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473015471.5077441631135a94971860a8df76236db9437150.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox