Commit Graph

11 Commits

Author SHA1 Message Date
Roman Yurchak dfd009d61e Remove test_import_sklearn_no_warnings (#12244) 2018-10-02 12:13:48 -04:00
Roman Yurchak c09352c241 [MRG] Fix DeprecationWarning due to collections.abc in Python 3.7 (#11431)
Closes https://github.com/scikit-learn/scikit-learn/issues/11121

This PR removes the deprecation warning about ABC being moved from `collections` to `collections.abc` when importing scikit-learn in Python 3.7.

In the end, I put `collections.abc.{Sequence, Iterable, Mapping, Sized}` in the namespace of `sklearn.utils.fixes`. This was the simplest way I could find, and while it has the drawback of obfuscating the real module name, other approached appeared more problematic and a similar approach is currently used e.g. for `utils.fixes.signature` which is an alias for `inspect.signature`.

We can't just patch six with https://github.com/benjaminp/six/pull/241, because sklearn uses six from 5 years ago, which would  need updating and I'm not sure if it could have side effects (e.g. for pickling backward compatibility etc).

**Edit**: This adds a test checking that generally no warnings are raised when importing scikit-learn top-level modules.
2018-07-14 15:14:02 -05:00
Sebastin Santy dc43486806 Remove unused imports (#9235) 2017-07-01 05:57:54 -07:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
Mathieu Blondel afb666c1d0 Use sklearn.utils.testing in tests. 2012-10-25 15:31:35 +09:00
Lars Buitinck 1de57fa4e9 COSMIT use Python 2.6 except-as syntax 2011-12-12 20:42:56 +01:00
Andreas Mueller 772d3385fb COSMIT removed emacs modeline 2011-11-20 21:17:12 +01:00
Andreas Mueller ff3f814a1b COSMIT pep8 whitespace 2011-11-20 21:16:52 +01:00
Fabian Pedregosa ddf4b72109 Move project directory from scikits.learn to sklearn 2011-09-02 12:06:57 +02:00
Fabian Pedregosa 68f27e3790 Revert "Move project directory from scikits.learn to sklearn"
This reverts commit fd0d3b879d.
2011-09-02 12:03:18 +02:00
Fabian Pedregosa fd0d3b879d Move project directory from scikits.learn to sklearn 2011-09-02 11:38:24 +02:00