Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/uv-lock-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ jobs:
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
dry_run: ${{ inputs.dry_run || 'false' }}
# Unset UV_EXCLUDE_NEWER, so the cutoff comes from exclude-newer in
# pyproject.toml instead of the action default.
exclude_newer: ""
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,15 +639,11 @@ and in CI. Continuous integration runs `uv lock --check`, which fails when the l
no longer matches `pyproject.toml`.

If that check fails on your pull request, regenerate the lock file and commit the result.
The scheduled workflow's `uv-lock-update` action applies a 7 day cutoff
(`exclude_newer: 7 days`, passed to uv as `UV_EXCLUDE_NEWER`) so a package version
yanked shortly after release is less likely to land in the lock file. That cutoff
lives in the action, not in `pyproject.toml`, so it does not apply automatically
when you run `uv lock` locally — set `UV_EXCLUDE_NEWER` yourself so a freshly
published (and possibly still-to-be-yanked) release doesn't end up in the lock file:
A 7 day cutoff (`exclude-newer` in `pyproject.toml`) applies automatically, so a package
version yanked shortly after release is less likely to land in the lock file:

```bash
UV_EXCLUDE_NEWER="7 days" uv lock
uv lock
```

To resolve a `uv.lock` conflict when rebasing, check out either side and regenerate
Expand All @@ -657,6 +653,6 @@ rather than editing the file by hand. Which side you pick does not matter, becau

```bash
git checkout --ours uv.lock
UV_EXCLUDE_NEWER="7 days" uv lock
uv lock
git add uv.lock
```
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ Tracker = "https://jira.mongodb.org/projects/PYTHON/issues"
# install-dependencies.sh installs it in Evergreen. Bump manually when a newer uv
# is needed.
required-version = "==0.12.12"
# Skip dependency releases newer than 7 days. Defining it here keeps every uv
# invocation on the same cutoff.
exclude-newer = "7 days"
Comment thread
aclark4life marked this conversation as resolved.
# boto3 dropped Python 3.9 support in 1.43, so the universal lock forks at
# 3.10. Without a floor the pre-3.10 fork back-solves to boto3 1.7.84 (2018),
# whose vendored six and invalid escape sequences break test collection. No
Expand Down
4 changes: 4 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading