Move concurrency settings to top-level (#4257)

These are global and non-specific to the `pip` API, so I think they
should be elevated.

- Ran `UV_CONCURRENT_DOWNLOADS=1 cargo run pip list`; verified that
`downloads` resolved to 1.
- Added `concurrent-downloads = 5` under `[tool.uv]` in
`pyproject.toml`; ran `cargo run pip list`; verified that `downloads`
resolved to 5.
- Ran `UV_CONCURRENT_DOWNLOADS=1 cargo run pip list`; verified that
`downloads` resolved to 1.
This commit is contained in:
Charlie Marsh
2024-08-19 15:36:58 -04:00
committed by Zanie Blue
parent e11bbb539a
commit 01fb41f5c4
7 changed files with 290 additions and 311 deletions
+81 -84
View File
@@ -61,6 +61,87 @@ ignore errors.
---
#### [`concurrent-builds`](#concurrent-builds) {: #concurrent-builds }
The maximum number of source distributions that uv will build concurrently at any given
time.
Defaults to the number of available CPU cores.
**Default value**: `None`
**Type**: `int`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv]
concurrent-builds = 4
```
=== "uv.toml"
```toml
concurrent-builds = 4
```
---
#### [`concurrent-downloads`](#concurrent-downloads) {: #concurrent-downloads }
The maximum number of in-flight concurrent downloads that uv will perform at any given
time.
**Default value**: `50`
**Type**: `int`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv]
concurrent-downloads = 4
```
=== "uv.toml"
```toml
concurrent-downloads = 4
```
---
#### [`concurrent-installs`](#concurrent-installs) {: #concurrent-installs }
The number of threads used when installing and unzipping packages.
Defaults to the number of available CPU cores.
**Default value**: `None`
**Type**: `int`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv]
concurrent-installs = 4
```
=== "uv.toml"
```toml
concurrent-installs = 4
```
---
#### [`config-settings`](#config-settings) {: #config-settings }
Settings to pass to the [PEP 517](https://peps.python.org/pep-0517/) build backend,
@@ -1105,90 +1186,6 @@ ignore errors.
---
#### [`concurrent-builds`](#pip_concurrent-builds) {: #pip_concurrent-builds }
<span id="concurrent-builds"></span>
The maximum number of source distributions that uv will build concurrently at any given
time.
Defaults to the number of available CPU cores.
**Default value**: `None`
**Type**: `int`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv.pip]
concurrent-builds = 4
```
=== "uv.toml"
```toml
[pip]
concurrent-builds = 4
```
---
#### [`concurrent-downloads`](#pip_concurrent-downloads) {: #pip_concurrent-downloads }
<span id="concurrent-downloads"></span>
The maximum number of in-flight concurrent downloads that uv will perform at any given
time.
**Default value**: `50`
**Type**: `int`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv.pip]
concurrent-downloads = 4
```
=== "uv.toml"
```toml
[pip]
concurrent-downloads = 4
```
---
#### [`concurrent-installs`](#pip_concurrent-installs) {: #pip_concurrent-installs }
<span id="concurrent-installs"></span>
The number of threads used when installing and unzipping packages.
Defaults to the number of available CPU cores.
**Default value**: `None`
**Type**: `int`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv.pip]
concurrent-installs = 4
```
=== "uv.toml"
```toml
[pip]
concurrent-installs = 4
```
---
#### [`config-settings`](#pip_config-settings) {: #pip_config-settings }
<span id="config-settings"></span>