Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate externals.six #12916

Merged
merged 6 commits into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions benchmarks/bench_plot_fastkmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from collections import defaultdict
from time import time

import six

import numpy as np
from numpy import random as nr

Expand Down
2 changes: 0 additions & 2 deletions benchmarks/bench_plot_omp_lars.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import sys
from time import time

import six

import numpy as np

from sklearn.linear_model import lars_path, orthogonal_mp
Expand Down
2 changes: 0 additions & 2 deletions benchmarks/bench_plot_svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import numpy as np
from collections import defaultdict

import six

from scipy.linalg import svd
from sklearn.utils.extmath import randomized_svd
from sklearn.datasets.samples_generator import make_low_rank_matrix
Expand Down
6 changes: 6 additions & 0 deletions doc/whats_new/v0.21.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ Support for Python 3.4 and below has been officially dropped.
error for multiclass multioutput forests models if any targets were strings.
:issue:`12834` by :user:`Elizabeth Sander <elsander>`.

:mod:`sklearn.externals`
........................

- |API| Deprecated :mod:`externals.six` since we have dropped support for
Python 2.7. :issue:`12916` by :user:`Hanmin Qin <qinhanmin2014>`.

:mod:`sklearn.linear_model`
...........................

Expand Down
6 changes: 6 additions & 0 deletions sklearn/externals/six.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
import sys
import types

import warnings
warnings.warn("The module is deprecated in version 0.21 and will be removed "
"in version 0.23 since we've dropped support for Python 2.7. "
"Please rely on the official version of six "
"(https://pypi.org/project/six/).", DeprecationWarning)

__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.4.1"

Expand Down