Skip to content

Commit

Permalink
Document new lock behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Jan 20, 2024
1 parent 5022286 commit d8ef1f7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
14 changes: 14 additions & 0 deletions docs/guide/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ pulled in as indirect dependencies. These are added here automatically with `ry
excluded-dependencies = ["cffi"]
```

## `tool.rye.lock-with-sources`

+++ 0.18.0

When this flag is enabled all `lock` and `sync` operations in the project or workspace
operate as if `--with-sources` is passed. This means that all lock files contain the
full source references. Note that this can create lock files that contain credentials
if the sources have credentials included in the URL.

```toml
[tool.rye]
lock-with-sources = true
```

## `tool.rye.managed`

+++ 0.3.0
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ can be supplied with environment variables.
[[sources]]
name = "company-internal"
url = "https://${INDEX_USERNAME}:${INDEX_PASSWORD}@company.internal/simple/"
```
```
14 changes: 14 additions & 0 deletions docs/guide/sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ do want to include those, pass `--pre`
rye lock Flask --pre
```

### `--with-sources`

By default (unless the `tool.rye.lock-with-sources` config key is set to `true` in the
`pyproject.toml`) lock files are not generated with source references. This means that
if custom sources are used the lock file cannot be installed via `pip` unless also
`--find-links` and other parameters are manually passed.

When this flag is passed then the lock file is generated with references to `--index-url`,
`--extra-index-url` or `--find-links`.

```
rye lock --with-sources
```

## Sync

Syncing takes the same parameters as `lock` and then some. Sync will usually first do what
Expand Down

0 comments on commit d8ef1f7

Please sign in to comment.