Skip to content

Commit e395f54

Browse files
committed
RF: remove use of six.py
No longer use routines from six.py - extend py3k module ot add missing compatibility.
1 parent 38d8235 commit e395f54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+94
-45
lines changed

nibabel/affines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import numpy as np
77

8-
from six.moves import reduce
8+
from functools import reduce
99

1010

1111
class AffineError(ValueError):

nibabel/benchmarks/bench_streamlines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import numpy as np
1919

20-
from six.moves import zip
20+
from nibabel.py3k import zip
2121
from nibabel.tmpdirs import InTemporaryDirectory
2222

2323
from numpy.testing import assert_array_equal

nibabel/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from os.path import join as pjoin
99
import glob
1010
import sys
11-
from six.moves import configparser
11+
from nibabel.py3k import configparser
1212
from distutils.version import LooseVersion
1313

1414
from .environment import get_nipy_user_dir, get_nipy_system_dir

nibabel/dft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import numpy
2424

25-
from six import BytesIO
25+
from io import BytesIO
2626

2727
from .nifti1 import Nifti1Header
2828

nibabel/eulerangles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
import math
8787

88-
from six.moves import reduce
88+
from functools import reduce
8989

9090
import numpy as np
9191

nibabel/externals/netcdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from numpy import little_endian as LITTLE_ENDIAN
4242
from functools import reduce
4343

44-
from six import integer_types
44+
from nibabel.py3k import integer_types
4545

4646

4747
ABSENT = b'\x00\x00\x00\x00\x00\x00\x00\x00'

nibabel/externals/six.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
FutureWarning,
1010
stacklevel=2)
1111

12-
from six import * # noqa
12+
from nibabel.py3k import * # noqa

nibabel/externals/tests/test_six.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_old_namespace():
2727
# in this test run.
2828
if not previous_import:
2929
assert_equal(warns.pop(0).category, FutureWarning)
30-
from six import BytesIO
30+
from io import BytesIO
3131
assert_equal(warns, [])
3232
# The import from old module is the same as that from new
3333
assert_true(shim_BytesIO is BytesIO)

nibabel/filebasedimages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
99
''' Common interface for any image format--volume or surface, binary or xml.'''
1010

11-
from six import string_types
11+
from nibabel.py3k import string_types
1212
from .fileholders import FileHolder
1313
from .filename_parser import (types_filenames, TypesFilenamesError,
1414
splitext_addext)

nibabel/fileslice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from numbers import Integral
77
from mmap import mmap
88

9-
from six.moves import reduce
9+
from functools import reduce
1010

1111
import numpy as np
1212

0 commit comments

Comments
 (0)