aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-future/re-enable-python3-5.patch
blob: a5f6fecd6b29376b14e4e968e3e9c5f2bca43abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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