Skip to content

Commit 0b67c46

Browse files
committed
Mamba: remove CONDA_USES_MAMBA feature flag
Mamba can be used via `build.tools.python: mambaforge` now. This PR removes the `CONDA_USES_MAMBA` feature flag since we already contact most of the users and opened a PR on their repositories with the config file required for this change and we also sent an in-site notification to all those projects still using it. The message said this feature flag will be removed on May 1st. So, we are all good to merge and deploy next week (May 3rd).
1 parent cac2489 commit 0b67c46

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

readthedocs/doc_builder/python_environments.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,6 @@ def conda_bin_name(self):
447447
"""
448448
Decide whether use ``mamba`` or ``conda`` to create the environment.
449449
450-
Return ``mamba`` if the project has ``CONDA_USES_MAMBA`` feature and
451-
``conda`` otherwise. This will be the executable name to be used when
452-
creating the conda environment.
453-
454450
``mamba`` is really fast to solve dependencies and download channel
455451
metadata on startup.
456452
@@ -459,10 +455,6 @@ def conda_bin_name(self):
459455
# Config file using ``build.tools.python``
460456
if self.config.using_build_tools:
461457
return self.config.python_interpreter
462-
463-
# Config file using ``conda``
464-
if self.project.has_feature(Feature.CONDA_USES_MAMBA):
465-
return 'mamba'
466458
return 'conda'
467459

468460
def _update_conda_startup(self):
@@ -473,8 +465,6 @@ def _update_conda_startup(self):
473465
independently the version of Miniconda that it has installed.
474466
"""
475467
self.build_env.run(
476-
# TODO: use ``self.conda_bin_name()`` once ``mamba`` is installed in
477-
# the Docker image
478468
'conda',
479469
'update',
480470
'--yes',
@@ -485,19 +475,6 @@ def _update_conda_startup(self):
485475
cwd=self.checkout_path,
486476
)
487477

488-
def _install_mamba(self):
489-
self.build_env.run(
490-
'conda',
491-
'install',
492-
'--yes',
493-
'--quiet',
494-
'--name=base',
495-
'--channel=conda-forge',
496-
'python=3.7',
497-
'mamba',
498-
cwd=self.checkout_path,
499-
)
500-
501478
def setup_base(self):
502479
conda_env_path = os.path.join(self.project.doc_path, 'conda')
503480
os.path.join(conda_env_path, self.version.slug)
@@ -509,15 +486,6 @@ def setup_base(self):
509486
self._append_core_requirements()
510487
self._show_environment_yaml()
511488

512-
if all([
513-
# The project has CONDA_USES_MAMBA feature enabled and,
514-
self.project.has_feature(Feature.CONDA_USES_MAMBA),
515-
# the project is not using ``build.tools``,
516-
# which has mamba installed via asdf.
517-
not self.config.using_build_tools,
518-
]):
519-
self._install_mamba()
520-
521489
self.build_env.run(
522490
self.conda_bin_name(),
523491
'env',
@@ -606,9 +574,6 @@ def _get_core_requirements(self):
606574
'pillow',
607575
]
608576

609-
if self.project.has_feature(Feature.CONDA_USES_MAMBA):
610-
conda_requirements.append('pip')
611-
612577
# Install pip-only things.
613578
pip_requirements = [
614579
'recommonmark',

readthedocs/projects/models.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,6 @@ def add_features(sender, **kwargs):
17531753
CLEAN_AFTER_BUILD = "clean_after_build"
17541754
UPDATE_CONDA_STARTUP = "update_conda_startup"
17551755
CONDA_APPEND_CORE_REQUIREMENTS = "conda_append_core_requirements"
1756-
CONDA_USES_MAMBA = "conda_uses_mamba"
17571756
ALL_VERSIONS_IN_HTML_CONTEXT = "all_versions_in_html_context"
17581757
CACHED_ENVIRONMENT = "cached_environment"
17591758
LIMIT_CONCURRENT_BUILDS = "limit_concurrent_builds"
@@ -1824,10 +1823,6 @@ def add_features(sender, **kwargs):
18241823
CONDA_APPEND_CORE_REQUIREMENTS,
18251824
_('Append Read the Docs core requirements to environment.yml file'),
18261825
),
1827-
(
1828-
CONDA_USES_MAMBA,
1829-
_('Uses mamba binary instead of conda to create the environment'),
1830-
),
18311826
(
18321827
ALL_VERSIONS_IN_HTML_CONTEXT,
18331828
_(

0 commit comments

Comments
 (0)