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

Features: remove USE_NEW_PIP_RESOLVER #7745

Merged
merged 1 commit into from
Dec 10, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions readthedocs/doc_builder/python_environments.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""An abstraction over virtualenv and Conda environments."""

import copy
import codecs
import copy
import hashlib
import itertools
import json
import logging
import os
import shutil
import yaml

import yaml
from django.conf import settings

from readthedocs.builds.constants import EXTERNAL
from readthedocs.config import PIP, SETUPTOOLS, ParseError, parse as parse_yaml
from readthedocs.config import PIP, SETUPTOOLS, ParseError
from readthedocs.config import parse as parse_yaml
from readthedocs.config.models import PythonInstall, PythonInstallRequirements
from readthedocs.doc_builder.config import load_yaml_config
from readthedocs.doc_builder.constants import DOCKER_IMAGE
Expand All @@ -22,7 +23,6 @@
from readthedocs.projects.constants import LOG_TEMPLATE
from readthedocs.projects.models import Feature


log = logging.getLogger(__name__)


Expand Down Expand Up @@ -106,7 +106,6 @@ def install_package(self, install):
'--upgrade-strategy',
'eager',
*self._pip_cache_cmd_argument(),
*self._pip_extra_args(),
'{path}{extra_requirements}'.format(
path=local_path,
extra_requirements=extra_req_param,
Expand All @@ -124,12 +123,6 @@ def install_package(self, install):
bin_path=self.venv_bin(),
)

def _pip_extra_args(self):
extra_args = []
if self.project.has_feature(Feature.USE_NEW_PIP_RESOLVER):
extra_args.extend(['--use-feature', '2020-resolver'])
return extra_args

def _pip_cache_cmd_argument(self):
"""
Return the pip command ``--cache-dir`` or ``--no-cache-dir`` argument.
Expand Down Expand Up @@ -402,7 +395,6 @@ def install_core_requirements(self):
])

cmd = copy.copy(pip_install_cmd)
cmd.extend(self._pip_extra_args())
if self.config.python.use_system_site_packages:
# Other code expects sphinx-build to be installed inside the
# virtualenv. Using the -I option makes sure it gets installed
Expand Down Expand Up @@ -451,7 +443,6 @@ def install_requirements_file(self, install):
'-m',
'pip',
'install',
*self._pip_extra_args(),
]
if self.project.has_feature(Feature.PIP_ALWAYS_UPGRADE):
args += ['--upgrade']
Expand Down Expand Up @@ -669,7 +660,6 @@ def install_core_requirements(self):
'install',
'-U',
*self._pip_cache_cmd_argument(),
*self._pip_extra_args(),
]
pip_cmd.extend(pip_requirements)
self.build_env.run(
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,6 @@ def add_features(sender, **kwargs):
DEDUPLICATE_BUILDS = 'deduplicate_builds'
USE_SPHINX_RTD_EXT_LATEST = 'rtd_sphinx_ext_latest'
DONT_CREATE_INDEX = 'dont_create_index'
USE_NEW_PIP_RESOLVER = 'use_new_pip_resolver'
DONT_INSTALL_LATEST_PIP = 'dont_install_latest_pip'

FEATURES = (
Expand Down Expand Up @@ -1752,10 +1751,6 @@ def add_features(sender, **kwargs):
DONT_CREATE_INDEX,
_('Do not create index.md or README.rst if the project does not have one.'),
),
(
USE_NEW_PIP_RESOLVER,
_('Use new pip resolver'),
),
(
DONT_INSTALL_LATEST_PIP,
_('Don\'t install the latest version of pip'),
Expand Down