<h4 dir="auto">Description</h4>

<p dir="auto">In scikit-learn/scikit-learn/blob/master/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py,<br>
<code class="notranslate">import imp</code><br>
should be changed to<br>
<code class="notranslate"> import importlib</code></p>
<h4 dir="auto">Description</h4>
<p dir="auto">A deprecation warning is thrown when using sklearn. Recently cloudpickle was updated to do away with this warning, the sklearn version needs to be updated accordingly.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto">I imagine this occurs anywhere cloudpickle is imported. I am getting it from:<br>
<code class="notranslate">from sklearn.ensemble import RandomForestRegressor</code><br>
and using said Regressor</p>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">No deprecation warning should be thrown</p>
<h4 dir="auto">Actual Results</h4>
<p dir="auto">/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses<br>
import imp</p>
<h4 dir="auto">Versions</h4>
<h2 dir="auto">System</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python: 3.6.6 (default, Sep 12 2018, 18:26:19)  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
executable: /usr/bin/python3.6
machine: Linux-4.15.0-36-generic-x86_64-with-Ubuntu-18.04-bionic"><pre class="notranslate"><code class="notranslate">python: 3.6.6 (default, Sep 12 2018, 18:26:19)  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
executable: /usr/bin/python3.6
machine: Linux-4.15.0-36-generic-x86_64-with-Ubuntu-18.04-bionic
</code></pre></div>
<h2 dir="auto">BLAS</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="macros: NO_ATLAS_INFO=1, HAVE_CBLAS=None
lib_dirs: /usr/lib/x86_64-linux-gnu
cblas_libs: cblas"><pre class="notranslate"><code class="notranslate">macros: NO_ATLAS_INFO=1, HAVE_CBLAS=None
lib_dirs: /usr/lib/x86_64-linux-gnu
cblas_libs: cblas
</code></pre></div>
<h2 dir="auto">Python deps</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip: 18.1
setuptools: 40.0.0
sklearn: 0.20.0
numpy: 1.15.3
scipy: 1.1.0
Cython: None
pandas: 0.23.4"><pre class="notranslate"><code class="notranslate">pip: 18.1
setuptools: 40.0.0
sklearn: 0.20.0
numpy: 1.15.3
scipy: 1.1.0
Cython: None
pandas: 0.23.4
</code></pre></div>