Skip to content

Commit dc18231

Browse files
authored
PYTHON-5047 Avoid updating the uv lock unintentionally (#2076)
1 parent a3cc43f commit dc18231

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.evergreen/run-tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export PIP_QUIET=1 # Quiet by default
3737
export PIP_PREFER_BINARY=1 # Prefer binary dists by default
3838

3939
set +x
40-
PYTHON_IMPL=$(uv run python -c "import platform; print(platform.python_implementation())")
40+
PYTHON_IMPL=$(uv run --frozen python -c "import platform; print(platform.python_implementation())")
4141

4242
# Try to source local Drivers Secrets
4343
if [ -f ./secrets-export.sh ]; then
@@ -49,11 +49,11 @@ fi
4949

5050
# Start compiling the args we'll pass to uv.
5151
# Run in an isolated environment so as not to pollute the base venv.
52-
UV_ARGS=("--isolated --extra test")
52+
UV_ARGS=("--isolated --frozen --extra test")
5353

5454
# Ensure C extensions if applicable.
5555
if [ -z "${NO_EXT:-}" ] && [ "$PYTHON_IMPL" = "CPython" ]; then
56-
uv run tools/fail_if_no_c.py
56+
uv run --frozen tools/fail_if_no_c.py
5757
fi
5858

5959
if [ "$AUTH" != "noauth" ]; then
@@ -239,7 +239,7 @@ if [ -n "$PERF_TEST" ]; then
239239
fi
240240

241241
echo "Running $AUTH tests over $SSL with python $(uv python find)"
242-
uv run python -c 'import sys; print(sys.version)'
242+
uv run --frozen python -c 'import sys; print(sys.version)'
243243

244244

245245
# Run the tests, and store the results in Evergreen compatible XUnit XML

.evergreen/scripts/setup-dev-env.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ if [ ! -d $BIN_DIR ]; then
3232
echo "export UV_PYTHON=$UV_PYTHON" >> $HERE/env.sh
3333
fi
3434
echo "Using python $UV_PYTHON"
35-
uv sync
36-
uv run --with pip pip install -e .
35+
uv sync --frozen
36+
uv run --frozen --with pip pip install -e .
3737
echo "Setting up python environment... done."
3838

3939
# Ensure there is a pre-commit hook if there is a git checkout.
4040
if [ -d .git ] && [ ! -f .git/hooks/pre-commit ]; then
41-
uv run pre-commit install
41+
uv run --frozen pre-commit install
4242
fi

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set dotenv-load
44
set dotenv-filename := "./.evergreen/scripts/env.sh"
55

66
# Commonly used command segments.
7-
uv_run := "uv run --isolated "
7+
uv_run := "uv run --isolated --frozen "
88
typing_run := uv_run + "--group typing --extra aws --extra encryption --extra ocsp --extra snappy --extra test --extra zstd"
99
docs_run := uv_run + "--extra docs"
1010
doc_build := "./doc/_build"

0 commit comments

Comments
 (0)