mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2025-09-18 03:13:25 +00:00
Update default setup to use parallelized dep installation
Move deprecation warnings to the precondition function Deprecate --parallelize-locked-install option Add --parallel-install-threads option
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
import concurrent.futures
|
||||
import contextlib
|
||||
import typing
|
||||
from typing import Optional
|
||||
from typing import Sequence
|
||||
from typing import Set
|
||||
|
||||
@@ -23,7 +22,7 @@ def install(
|
||||
poetry: "_poetry.Poetry",
|
||||
venv: ToxVirtualEnv,
|
||||
packages: Sequence[PoetryPackage],
|
||||
parallels: Optional[int] = None,
|
||||
parallels: int = 0,
|
||||
):
|
||||
"""Install a bunch of packages to a virtualenv
|
||||
|
||||
@@ -55,7 +54,7 @@ def install(
|
||||
enables/disables the usage of the parallel thread pooler depending on the value of
|
||||
the ``parallels`` parameter.
|
||||
"""
|
||||
if parallels:
|
||||
if parallels > 0:
|
||||
with concurrent.futures.ThreadPoolExecutor(
|
||||
max_workers=parallels
|
||||
) as executor:
|
||||
|
Reference in New Issue
Block a user