diff options
Diffstat (limited to 'community/py-future/re-enable-python3-5.patch')
-rw-r--r-- | community/py-future/re-enable-python3-5.patch | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/community/py-future/re-enable-python3-5.patch b/community/py-future/re-enable-python3-5.patch new file mode 100644 index 0000000000..a5f6fecd6b --- /dev/null +++ b/community/py-future/re-enable-python3-5.patch @@ -0,0 +1,113 @@ +From ad0ea5e11a329a1070461b4d611a34ba702a93b8 Mon Sep 17 00:00:00 2001 +From: py <pengyu.py@gmail.com> +Date: Mon, 4 Jul 2016 11:04:26 +0800 +Subject: [PATCH 1/2] Revert "Revert "Enable Py3.5 tests on Travis and add + Py3.5 trove classifier to setup.py"" + +Travis-CI supports Py3.5 now. + +This reverts commit 6caac864d578c378479e0f2b8d78d6b3ba115075. +--- + .travis.yml | 1 + + setup.py | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/.travis.yml b/.travis.yml +index 6e20573..da167c1 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,6 +1,7 @@ + language: python + + python: ++ - "3.5" + - "3.4" + - "3.3" + - "2.7" +diff --git a/setup.py b/setup.py +index 7c81a09..79b7125 100755 +--- a/setup.py ++++ b/setup.py +@@ -106,6 +106,7 @@ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", ++ "Programming Language :: Python :: 3.5", + "License :: OSI Approved", + "License :: OSI Approved :: MIT License", + "Development Status :: 4 - Beta", + +From 0c2c021a935489bed280e37442ec2d3f79241d1a Mon Sep 17 00:00:00 2001 +From: py <pengyu.py@gmail.com> +Date: Mon, 4 Jul 2016 11:17:54 +0800 +Subject: [PATCH 2/2] pep461 should pass under py35 + +revert d141ee8953e9995d0bc6ed84d073db2fa2a0eee8 +--- + tests/test_future/test_bytes.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/tests/test_future/test_bytes.py b/tests/test_future/test_bytes.py +index f30e740..4ca5d40 100644 +--- a/tests/test_future/test_bytes.py ++++ b/tests/test_future/test_bytes.py +@@ -7,6 +7,8 @@ + from future.builtins import * + from future import utils + ++import sys ++ + from numbers import Integral + from future.tests.base import unittest, expectedFailurePY2 + +@@ -534,13 +536,14 @@ def test_maketrans(self): + self.assertRaises(ValueError, bytes.maketrans, b'abc', b'xyzq') + self.assertRaises(TypeError, bytes.maketrans, 'abc', 'def') + +- @unittest.expectedFailure + def test_mod(self): + """ + From Py3.5 test suite (post-PEP 461). + + The bytes mod code is in _PyBytes_Format() in bytesobject.c in Py3.5. + """ ++ if sys.version_info[:2] < (3, 5): ++ return + b = b'hello, %b!' + orig = b + b = b % b'world' +@@ -551,13 +554,12 @@ def test_mod(self): + a = b % (b'seventy-nine', 79) + self.assertEqual(a, b'seventy-nine / 100 = 79%') + +- @unittest.expectedFailure + def test_imod(self): + """ + From Py3.5 test suite (post-PEP 461) + """ +- # if (3, 0) <= sys.version_info[:2] < (3, 5): +- # raise unittest.SkipTest('bytes % not yet implemented on Py3.0-3.4') ++ if sys.version_info[:2] < (3, 5): ++ return + b = bytes(b'hello, %b!') + orig = b + b %= b'world' +diff --git a/setup.py b/setup.py +index 79b7125..58ba534 100755 +--- a/setup.py ++++ b/setup.py +@@ -147,14 +147,6 @@ try: + 'xmlrpc' + ]) + +- if sys.version_info[0] >= 3: +- # Do any of the above folders exist in build/lib? +- files = os.listdir(os.path.join('build', 'lib')) +- if len(set(files) & set(SYSTEM_MODULES)) > 0: +- print('ERROR: Your build folder is in an inconsistent state for ' +- 'a Python 3.x install. Please remove it manually and run ' +- 'setup.py again.', file=sys.stderr) +- sys.exit(1) + except OSError: + pass + |