[MRG] MNT make private the modules in sklearn.mixture
diff --git a/.gitignore b/.gitignore
index 94db416d376f1..ad35460f795f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -106,3 +106,7 @@ sklearn/cluster/k_means_.py
 sklearn/cluster/mean_shift_.py
 sklearn/cluster/optics_.py
 sklearn/cluster/spectral.py
+
+sklearn/mixture/base.py
+sklearn/mixture/gaussian_mixture.py
+sklearn/mixture/bayesian_mixture.py
diff --git a/sklearn/_build_utils/deprecated_modules.py b/sklearn/_build_utils/deprecated_modules.py
index 29d4c80ff4c6c..241fa41e76e1b 100644
--- a/sklearn/_build_utils/deprecated_modules.py
+++ b/sklearn/_build_utils/deprecated_modules.py
@@ -34,6 +34,12 @@
     ('_mean_shift', 'sklearn.cluster.mean_shift_', 'sklearn.cluster'),
     ('_optics', 'sklearn.cluster.optics_', 'sklearn.cluster'),
     ('_spectral', 'sklearn.cluster.spectral', 'sklearn.cluster'),
+
+    ('_base', 'sklearn.mixture.base', 'sklearn.mixture'),
+    ('_gaussian_mixture', 'sklearn.mixture.gaussian_mixture',
+     'sklearn.mixture'),
+    ('_bayesian_mixture', 'sklearn.mixture.bayesian_mixture',
+     'sklearn.mixture'),
 }
 
 _FILE_CONTENT_TEMPLATE = """
diff --git a/sklearn/mixture/__init__.py b/sklearn/mixture/__init__.py
index 08f55802e201e..9c5a89dceaa5e 100644
--- a/sklearn/mixture/__init__.py
+++ b/sklearn/mixture/__init__.py
@@ -2,8 +2,8 @@
 The :mod:`sklearn.mixture` module implements mixture modeling algorithms.
 """
 
-from .gaussian_mixture import GaussianMixture
-from .bayesian_mixture import BayesianGaussianMixture
+from ._gaussian_mixture import GaussianMixture
+from ._bayesian_mixture import BayesianGaussianMixture
 
 
 __all__ = ['GaussianMixture',
diff --git a/sklearn/mixture/base.py b/sklearn/mixture/_base.py
similarity index 100%
rename from sklearn/mixture/base.py
rename to sklearn/mixture/_base.py
diff --git a/sklearn/mixture/bayesian_mixture.py b/sklearn/mixture/_bayesian_mixture.py
similarity index 98%
rename from sklearn/mixture/bayesian_mixture.py
rename to sklearn/mixture/_bayesian_mixture.py
index b0cc600d077da..46560fa484762 100644
--- a/sklearn/mixture/bayesian_mixture.py
+++ b/sklearn/mixture/_bayesian_mixture.py
@@ -7,13 +7,13 @@
 import numpy as np
 from scipy.special import betaln, digamma, gammaln
 
-from .base import BaseMixture, _check_shape
-from .gaussian_mixture import _check_precision_matrix
-from .gaussian_mixture import _check_precision_positivity
-from .gaussian_mixture import _compute_log_det_cholesky
-from .gaussian_mixture import _compute_precision_cholesky
-from .gaussian_mixture import _estimate_gaussian_parameters
-from .gaussian_mixture import _estimate_log_gaussian_prob
+from ._base import BaseMixture, _check_shape
+from ._gaussian_mixture import _check_precision_matrix
+from ._gaussian_mixture import _check_precision_positivity
+from ._gaussian_mixture import _compute_log_det_cholesky
+from ._gaussian_mixture import _compute_precision_cholesky
+from ._gaussian_mixture import _estimate_gaussian_parameters
+from ._gaussian_mixture import _estimate_log_gaussian_prob
 from ..utils import check_array
 from ..utils.validation import check_is_fitted
 
diff --git a/sklearn/mixture/gaussian_mixture.py b/sklearn/mixture/_gaussian_mixture.py
similarity index 99%
rename from sklearn/mixture/gaussian_mixture.py
rename to sklearn/mixture/_gaussian_mixture.py
index b7941365b2609..8603115fd202f 100644
--- a/sklearn/mixture/gaussian_mixture.py
+++ b/sklearn/mixture/_gaussian_mixture.py
@@ -8,7 +8,7 @@
 
 from scipy import linalg
 
-from .base import BaseMixture, _check_shape
+from ._base import BaseMixture, _check_shape
 from ..utils import check_array
 from ..utils.validation import check_is_fitted
 from ..utils.extmath import row_norms
diff --git a/sklearn/mixture/tests/test_bayesian_mixture.py b/sklearn/mixture/tests/test_bayesian_mixture.py
index 74426c81ef803..756c8e76f9f09 100644
--- a/sklearn/mixture/tests/test_bayesian_mixture.py
+++ b/sklearn/mixture/tests/test_bayesian_mixture.py
@@ -13,8 +13,8 @@
 
 from sklearn.metrics.cluster import adjusted_rand_score
 
-from sklearn.mixture.bayesian_mixture import _log_dirichlet_norm
-from sklearn.mixture.bayesian_mixture import _log_wishart_norm
+from sklearn.mixture._bayesian_mixture import _log_dirichlet_norm
+from sklearn.mixture._bayesian_mixture import _log_wishart_norm
 
 from sklearn.mixture import BayesianGaussianMixture
 
diff --git a/sklearn/mixture/tests/test_gaussian_mixture.py b/sklearn/mixture/tests/test_gaussian_mixture.py
index 66a42bd843283..0f970d9b8f365 100644
--- a/sklearn/mixture/tests/test_gaussian_mixture.py
+++ b/sklearn/mixture/tests/test_gaussian_mixture.py
@@ -14,14 +14,15 @@
 from sklearn.datasets.samples_generator import make_spd_matrix
 from io import StringIO
 from sklearn.metrics.cluster import adjusted_rand_score
-from sklearn.mixture.gaussian_mixture import GaussianMixture
-from sklearn.mixture.gaussian_mixture import (
+from sklearn.mixture import GaussianMixture
+from sklearn.mixture._gaussian_mixture import (
     _estimate_gaussian_covariances_full,
     _estimate_gaussian_covariances_tied,
     _estimate_gaussian_covariances_diag,
-    _estimate_gaussian_covariances_spherical)
-from sklearn.mixture.gaussian_mixture import _compute_precision_cholesky
-from sklearn.mixture.gaussian_mixture import _compute_log_det_cholesky
+    _estimate_gaussian_covariances_spherical,
+    _compute_precision_cholesky,
+    _compute_log_det_cholesky,
+    )
 from sklearn.exceptions import ConvergenceWarning, NotFittedError
 from sklearn.utils.extmath import fast_logdet
 from sklearn.utils.testing import assert_allclose
@@ -172,7 +173,7 @@ def test_gaussian_mixture_attributes():
 
 
 def test_check_X():
-    from sklearn.mixture.base import _check_X
+    from sklearn.mixture._base import _check_X
     rng = np.random.RandomState(0)
 
     n_samples, n_components, n_features = 10, 2, 2
@@ -469,7 +470,7 @@ def _naive_lmvnpdf_diag(X, means, covars):
 
 
 def test_gaussian_mixture_log_probabilities():
-    from sklearn.mixture.gaussian_mixture import _estimate_log_gaussian_prob
+    from sklearn.mixture._gaussian_mixture import _estimate_log_gaussian_prob
 
     # test against with _naive_lmvnpdf_diag
     rng = np.random.RandomState(0)
diff --git a/sklearn/tests/test_import_deprecations.py b/sklearn/tests/test_import_deprecations.py
index 1bbd821b22aee..98cabd494e588 100644
--- a/sklearn/tests/test_import_deprecations.py
+++ b/sklearn/tests/test_import_deprecations.py
@@ -39,6 +39,10 @@
     ('sklearn.cluster.mean_shift_', 'MeanShift'),
     ('sklearn.cluster.optics_', 'OPTICS'),
     ('sklearn.cluster.spectral', 'SpectralClustering'),
+
+    ('sklearn.mixture.base', 'BaseMixture'),
+    ('sklearn.mixture.bayesian_mixture', 'BayesianGaussianMixture'),
+    ('sklearn.mixture.gaussian_mixture', 'GaussianMixture'),
 ))
 def test_import_is_deprecated(deprecated_path, importee):
     # Make sure that "from deprecated_path import importee" is still possible

Towards https://github.com/scikit-learn/scikit-learn/issues/9250