8000 API Deprecate externals.six (#12916) · scikit-learn/scikit-learn@60be46c · GitHub
[go: up one dir, main page]

Skip to content

Commit 60be46c

Browse files
qinhanmin2014jnothman
authored andcommitted
API Deprecate externals.six (#12916)
1 parent 3207278 commit 60be46c

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

benchmarks/bench_plot_fastkmeans.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from collections import defaultdict
44
from time import time
55

6-
import six
7-
86
import numpy as np
97
from numpy import random as nr
108

benchmarks/bench_plot_omp_lars.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import sys
1010
from time import time
1111

12-
import six
13-
1412
import numpy as np
1513

1614
from sklearn.linear_model import lars_path, orthogonal_mp

benchmarks/bench_plot_svd.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import numpy as np
88
from collections import defaultdict
99

10-
import six
11-
1210
from scipy.linalg import svd
1311
from sklearn.utils.extmath import randomized_svd
1412
from sklearn.datasets.samples_generator import make_low_rank_matrix

doc/whats_new/v0.21.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ Support for Python 3.4 and below has been officially dropped.
9191
with the document and the caller functions.
9292
:issue:`6463` by :user:`movelikeriver <movelikeriver>`.
9393

94+
:mod:`sklearn.externals`
95+
........................
96+
97+
- |API| Deprecated :mod:`externals.six` since we have dropped support for
98+
Python 2.7. :issue:`12916` by :user:`Hanmin Qin <qinhanmin2014>`.
99+
94100
:mod:`sklearn.linear_model`
95101
...........................
96102

sklearn/externals/six.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
import sys
2525
import types
2626

27+
import warnings
28+
warnings.warn("The module is deprecated in version 0.21 and will be removed "
29+
"in version 0.23 since we've dropped support for Python 2.7. "
30+
"Please rely on the official version of six "
31+
"(https://pypi.org/project/six/).", DeprecationWarning)
32+
2733
__author__ = "Benjamin Peterson <benjamin@python.org>"
2834
__version__ = "1.4.1"
2935

0 commit comments

Comments
 (0)
0