File: remove-six.patch

package info (click to toggle)
sphinx-testing 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: python: 734; makefile: 8; sh: 7
file content (61 lines) | stat: -rw-r--r-- 1,472 bytes parent folder | download | duplicates (2)
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
--- a/setup.py
+++ b/setup.py
@@ -49,7 +49,6 @@
     include_package_data=True,
     install_requires=[
         'Sphinx',
-        'six',
     ],
     tests_require=test_require,
 )
--- a/src/sphinx_testing.egg-info/requires.txt
+++ b/src/sphinx_testing.egg-info/requires.txt
@@ -1,2 +1 @@
 Sphinx
-six
--- a/src/sphinx_testing/path.py
+++ b/src/sphinx_testing/path.py
@@ -12,7 +12,7 @@
 import shutil
 from codecs import open
 
-from six import PY2, text_type
+text_type = str
 
 
 FILESYSTEMENCODING = sys.getfilesystemencoding() or sys.getdefaultencoding()
@@ -22,12 +22,6 @@
     """
     Represents a path which behaves like a string.
     """
-    if PY2:
-        def __new__(cls, s, encoding=FILESYSTEMENCODING, errors='strict'):
-            if isinstance(s, str):
-                s = s.decode(encoding, errors)
-                return text_type.__new__(cls, s)
-            return text_type.__new__(cls, s)
 
     @property
     def parent(self):
--- a/src/sphinx_testing/util.py
+++ b/src/sphinx_testing/util.py
@@ -9,7 +9,7 @@
 
 import os.path
 import shutil
-from six import StringIO
+from io import StringIO
 from functools import wraps
 from textwrap import dedent
 
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -3,7 +3,7 @@
 import os
 import sys
 import sphinx
-from six import StringIO
+from io import StringIO
 from sphinx_testing.path import path
 from sphinx_testing.tmpdir import mkdtemp
 from sphinx_testing.util import TestApp, with_app