Skip to content

Commit 472a7cb

Browse files
authored
Features: remove USE_NEW_PIP_RESOLVER (#7745)
This is already default in the latest version of pip.
1 parent 8c2f334 commit 472a7cb

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

readthedocs/doc_builder/python_environments.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
"""An abstraction over virtualenv and Conda environments."""
22

3-
import copy
43
import codecs
4+
import copy
55
import hashlib
66
import itertools
77
import json
88
import logging
99
import os
1010
import shutil
11-
import yaml
1211

12+
import yaml
1313
from django.conf import settings
1414

1515
from readthedocs.builds.constants import EXTERNAL
16-
from readthedocs.config import PIP, SETUPTOOLS, ParseError, parse as parse_yaml
16+
from readthedocs.config import PIP, SETUPTOOLS, ParseError
17+
from readthedocs.config import parse as parse_yaml
1718
from readthedocs.config.models import PythonInstall, PythonInstallRequirements
1819
from readthedocs.doc_builder.config import load_yaml_config
1920
from readthedocs.doc_builder.constants import DOCKER_IMAGE
@@ -22,7 +23,6 @@
2223
from readthedocs.projects.constants import LOG_TEMPLATE
2324
from readthedocs.projects.models import Feature
2425

25-
2626
log = logging.getLogger(__name__)
2727

2828

@@ -106,7 +106,6 @@ def install_package(self, install):
106106
'--upgrade-strategy',
107107
'eager',
108108
*self._pip_cache_cmd_argument(),
109-
*self._pip_extra_args(),
110109
'{path}{extra_requirements}'.format(
111110
path=local_path,
112111
extra_requirements=extra_req_param,
@@ -124,12 +123,6 @@ def install_package(self, install):
124123
bin_path=self.venv_bin(),
125124
)
126125

127-
def _pip_extra_args(self):
128-
extra_args = []
129-
if self.project.has_feature(Feature.USE_NEW_PIP_RESOLVER):
130-
extra_args.extend(['--use-feature', '2020-resolver'])
131-
return extra_args
132-
133126
def _pip_cache_cmd_argument(self):
134127
"""
135128
Return the pip command ``--cache-dir`` or ``--no-cache-dir`` argument.
@@ -402,7 +395,6 @@ def install_core_requirements(self):
402395
])
403396

404397
cmd = copy.copy(pip_install_cmd)
405-
cmd.extend(self._pip_extra_args())
406398
if self.config.python.use_system_site_packages:
407399
# Other code expects sphinx-build to be installed inside the
408400
# virtualenv. Using the -I option makes sure it gets installed
@@ -451,7 +443,6 @@ def install_requirements_file(self, install):
451443
'-m',
452444
'pip',
453445
'install',
454-
*self._pip_extra_args(),
455446
]
456447
if self.project.has_feature(Feature.PIP_ALWAYS_UPGRADE):
457448
args += ['--upgrade']
@@ -669,7 +660,6 @@ def install_core_requirements(self):
669660
'install',
670661
'-U',
671662
*self._pip_cache_cmd_argument(),
672-
*self._pip_extra_args(),
673663
]
674664
pip_cmd.extend(pip_requirements)
675665
self.build_env.run(

readthedocs/projects/models.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,6 @@ def add_features(sender, **kwargs):
16011601
DEDUPLICATE_BUILDS = 'deduplicate_builds'
16021602
USE_SPHINX_RTD_EXT_LATEST = 'rtd_sphinx_ext_latest'
16031603
DONT_CREATE_INDEX = 'dont_create_index'
1604-
USE_NEW_PIP_RESOLVER = 'use_new_pip_resolver'
16051604
DONT_INSTALL_LATEST_PIP = 'dont_install_latest_pip'
16061605

16071606
FEATURES = (
@@ -1752,10 +1751,6 @@ def add_features(sender, **kwargs):
17521751
DONT_CREATE_INDEX,
17531752
_('Do not create index.md or README.rst if the project does not have one.'),
17541753
),
1755-
(
1756-
USE_NEW_PIP_RESOLVER,
1757-
_('Use new pip resolver'),
1758-
),
17591754
(
17601755
DONT_INSTALL_LATEST_PIP,
17611756
_('Don\'t install the latest version of pip'),

0 commit comments

Comments
 (0)