Skip to content

Commit 9572c31

Browse files
authored
Merge pull request #5348 from pypa/remove-sequential
Remove --sequential
2 parents fb0c6cc + 3eacea2 commit 9572c31

File tree

7 files changed

+2
-120
lines changed

7 files changed

+2
-120
lines changed

docs/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This document covers some of Pipenv's more glorious and advanced features.
1212

1313
- Dependencies of wheels provided in a ``Pipfile`` will not be captured by ``$ pipenv lock``.
1414
- There are some known issues with using private indexes, related to hashing. We're actively working to solve this problem. You may have great luck with this, however.
15-
- Installation is intended to be as deterministic as possible — use the ``--sequential`` flag to increase this, if experiencing issues.
15+
- Installation is intended to be as deterministic as possible.
1616

1717
☤ Specifying Package Indexes
1818
----------------------------

pipenv/cli/command.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def install(state, **kwargs):
244244
ignore_pipfile=state.installstate.ignore_pipfile,
245245
skip_lock=state.installstate.skip_lock,
246246
requirementstxt=state.installstate.requirementstxt,
247-
sequential=state.installstate.sequential,
248247
pre=state.installstate.pre,
249248
deploy=state.installstate.deploy,
250249
keep_outdated=state.installstate.keep_outdated,
@@ -562,7 +561,6 @@ def update(ctx, state, bare=False, dry_run=None, outdated=False, **kwargs):
562561
user=False,
563562
clear=state.clear,
564563
unused=False,
565-
sequential=state.installstate.sequential,
566564
pypi_mirror=state.pypi_mirror,
567565
extra_pip_args=state.installstate.extra_pip_args,
568566
)
@@ -653,7 +651,6 @@ def sync(ctx, state, bare=False, user=False, unused=False, **kwargs):
653651
user=user,
654652
clear=state.clear,
655653
unused=unused,
656-
sequential=state.installstate.sequential,
657654
pypi_mirror=state.pypi_mirror,
658655
system=state.system,
659656
extra_pip_args=state.installstate.extra_pip_args,

pipenv/cli/options.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def __init__(self):
8282
self.keep_outdated = False
8383
self.skip_lock = False
8484
self.ignore_pipfile = False
85-
self.sequential = False
8685
self.code = False
8786
self.requirementstxt = None
8887
self.deploy = False
@@ -133,24 +132,6 @@ def callback(ctx, param, value):
133132
)(f)
134133

135134

136-
def sequential_option(f):
137-
def callback(ctx, param, value):
138-
state = ctx.ensure_object(State)
139-
state.installstate.sequential = value
140-
return value
141-
142-
return option(
143-
"--sequential",
144-
is_flag=True,
145-
default=False,
146-
expose_value=False,
147-
help="Install dependencies one-at-a-time, instead of concurrently.",
148-
callback=callback,
149-
type=click_types.BOOL,
150-
show_envvar=True,
151-
)(f)
152-
153-
154135
def skip_lock_option(f):
155136
def callback(ctx, param, value):
156137
state = ctx.ensure_object(State)
@@ -583,7 +564,6 @@ def lock_options(f):
583564
def sync_options(f):
584565
f = install_base_options(f)
585566
f = install_dev_option(f)
586-
f = sequential_option(f)
587567
return f
588568

589569

pipenv/core.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ def do_install_dependencies(
755755
allow_global=False,
756756
ignore_hashes=False,
757757
skip_lock=False,
758-
concurrent=True,
759758
requirements_dir=None,
760759
pypi_mirror=None,
761760
extra_pip_args=None,
@@ -792,10 +791,7 @@ def do_install_dependencies(
792791
)
793792
dev = dev or dev_only
794793
deps_list = list(lockfile.get_requirements(dev=dev, only=dev_only))
795-
if concurrent:
796-
nprocs = project.s.PIPENV_MAX_SUBPROCESS
797-
else:
798-
nprocs = 1
794+
nprocs = 2
799795
procs = queue.Queue(maxsize=nprocs)
800796
failed_deps_queue = queue.Queue()
801797
if skip_lock:
@@ -1190,7 +1186,6 @@ def do_init(
11901186
ignore_pipfile=False,
11911187
skip_lock=False,
11921188
system=False,
1193-
concurrent=True,
11941189
deploy=False,
11951190
pre=False,
11961191
keep_outdated=False,
@@ -1293,7 +1288,6 @@ def do_init(
12931288
dev_only=dev_only,
12941289
allow_global=allow_global,
12951290
skip_lock=skip_lock,
1296-
concurrent=concurrent,
12971291
requirements_dir=requirements_dir,
12981292
pypi_mirror=pypi_mirror,
12991293
extra_pip_args=extra_pip_args,
@@ -2030,7 +2024,6 @@ def do_install(
20302024
ignore_pipfile=False,
20312025
skip_lock=False,
20322026
requirementstxt=False,
2033-
sequential=False,
20342027
pre=False,
20352028
deploy=False,
20362029
keep_outdated=False,
@@ -2051,7 +2044,6 @@ def do_install(
20512044
# Don't search for requirements.txt files if the user provides one
20522045
if requirementstxt or package_args or project.pipfile_exists:
20532046
skip_requirements = True
2054-
concurrent = not sequential
20552047
# Ensure that virtualenv is available and pipfile are available
20562048
ensure_project(
20572049
project,
@@ -2186,7 +2178,6 @@ def do_install(
21862178
ignore_pipfile=ignore_pipfile,
21872179
system=system,
21882180
skip_lock=skip_lock,
2189-
concurrent=concurrent,
21902181
deploy=deploy,
21912182
pre=pre,
21922183
requirements_dir=requirements_directory,
@@ -2207,7 +2198,6 @@ def do_install(
22072198
dev=dev,
22082199
system=system,
22092200
allow_global=system,
2210-
concurrent=concurrent,
22112201
keep_outdated=keep_outdated,
22122202
requirements_dir=requirements_directory,
22132203
deploy=deploy,
@@ -2357,7 +2347,6 @@ def do_install(
23572347
dev=dev,
23582348
system=system,
23592349
allow_global=system,
2360-
concurrent=concurrent,
23612350
keep_outdated=keep_outdated,
23622351
requirements_dir=requirements_directory,
23632352
deploy=deploy,
@@ -3032,7 +3021,6 @@ def do_sync(
30323021
user=False,
30333022
clear=False,
30343023
unused=False,
3035-
sequential=False,
30363024
pypi_mirror=None,
30373025
system=False,
30383026
deploy=False,
@@ -3065,7 +3053,6 @@ def do_sync(
30653053
project,
30663054
dev=dev,
30673055
allow_global=system,
3068-
concurrent=(not sequential),
30693056
requirements_dir=requirements_dir,
30703057
ignore_pipfile=True, # Don't check if Pipfile and lock match.
30713058
pypi_mirror=pypi_mirror,

pipenv/environments.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,6 @@ def __init__(self) -> None:
196196
Default is 0. Automatically set to 1 on CI environments for robust testing.
197197
"""
198198

199-
self.PIPENV_MAX_SUBPROCESS = int(os.environ.get("PIPENV_MAX_SUBPROCESS", "8"))
200-
"""How many subprocesses should Pipenv use when installing.
201-
202-
Default is 16, an arbitrary number that seems to work.
203-
"""
204-
205199
self.PIPENV_NO_INHERIT = "PIPENV_NO_INHERIT" in os.environ
206200
"""Tell Pipenv not to inherit parent directories.
207201

tests/integration/test_install_twists.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -103,58 +103,6 @@ def test_https_dependency_links_install(self, pipenv_instance_pypi):
103103
)
104104

105105

106-
@pytest.mark.install
107-
@pytest.mark.multiprocessing
108-
def test_multiprocess_bug_and_install(pipenv_instance_pypi):
109-
with temp_environ():
110-
os.environ["PIPENV_MAX_SUBPROCESS"] = "2"
111-
112-
with pipenv_instance_pypi(chdir=True) as p:
113-
with open(p.pipfile_path, "w") as f:
114-
contents = """
115-
[packages]
116-
pytz = "*"
117-
six = "*"
118-
dataclasses-json = "*"
119-
""".strip()
120-
f.write(contents)
121-
122-
c = p.pipenv("install")
123-
assert c.returncode == 0
124-
125-
assert "pytz" in p.lockfile["default"]
126-
assert "six" in p.lockfile["default"]
127-
assert "dataclasses-json" in p.lockfile["default"]
128-
129-
c = p.pipenv('run python -c "import six; import pytz; import dataclasses_json;"')
130-
assert c.returncode == 0
131-
132-
133-
@pytest.mark.install
134-
@pytest.mark.sequential
135-
def test_sequential_mode(pipenv_instance_pypi):
136-
137-
with pipenv_instance_pypi(chdir=True) as p:
138-
with open(p.pipfile_path, "w") as f:
139-
contents = """
140-
[packages]
141-
six = "*"
142-
urllib3 = "*"
143-
pytz = "*"
144-
""".strip()
145-
f.write(contents)
146-
147-
c = p.pipenv("install --sequential")
148-
assert c.returncode == 0
149-
150-
assert "six" in p.lockfile["default"]
151-
assert "pytz" in p.lockfile["default"]
152-
assert "urllib3" in p.lockfile["default"]
153-
154-
c = p.pipenv('run python -c "import six; import urllib3; import pytz;"')
155-
assert c.returncode == 0
156-
157-
158106
@pytest.mark.run
159107
@pytest.mark.install
160108
def test_normalize_name_install(pipenv_instance_private_pypi):

tests/integration/test_sync.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,6 @@ def test_sync_should_not_lock(pipenv_instance_pypi):
7070
assert lockfile_content == p.lockfile
7171

7272

73-
@pytest.mark.sync
74-
@pytest.mark.lock
75-
def test_sync_sequential_detect_errors(pipenv_instance_private_pypi):
76-
with pipenv_instance_private_pypi() as p:
77-
with open(p.pipfile_path, 'w') as f:
78-
contents = """
79-
[packages]
80-
requests = "*"
81-
""".strip()
82-
f.write(contents)
83-
84-
c = p.pipenv('lock')
85-
assert c.returncode == 0
86-
87-
# Force hash mismatch when installing `requests`
88-
lock = p.lockfile
89-
lock['default']['requests']['hashes'] = ['sha256:' + '0' * 64]
90-
with open(p.lockfile_path, 'w') as f:
91-
json.dump(lock, f)
92-
93-
c = p.pipenv('sync --sequential')
94-
assert c.returncode != 0
95-
96-
9773
@pytest.mark.sync
9874
def test_sync_consider_pip_target(pipenv_instance_pypi):
9975
"""

0 commit comments

Comments
 (0)