diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index d647955059..fbe310ad1e 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -37,7 +37,7 @@ export PIP_QUIET=1 # Quiet by default export PIP_PREFER_BINARY=1 # Prefer binary dists by default set +x -PYTHON_IMPL=$(uv run python -c "import platform; print(platform.python_implementation())") +PYTHON_IMPL=$(uv run --frozen python -c "import platform; print(platform.python_implementation())") # Try to source local Drivers Secrets if [ -f ./secrets-export.sh ]; then @@ -49,11 +49,11 @@ fi # Start compiling the args we'll pass to uv. # Run in an isolated environment so as not to pollute the base venv. -UV_ARGS=("--isolated --extra test") +UV_ARGS=("--isolated --frozen --extra test") # Ensure C extensions if applicable. if [ -z "${NO_EXT:-}" ] && [ "$PYTHON_IMPL" = "CPython" ]; then - uv run tools/fail_if_no_c.py + uv run --frozen tools/fail_if_no_c.py fi if [ "$AUTH" != "noauth" ]; then @@ -239,7 +239,7 @@ if [ -n "$PERF_TEST" ]; then fi echo "Running $AUTH tests over $SSL with python $(uv python find)" -uv run python -c 'import sys; print(sys.version)' +uv run --frozen python -c 'import sys; print(sys.version)' # Run the tests, and store the results in Evergreen compatible XUnit XML diff --git a/.evergreen/scripts/setup-dev-env.sh b/.evergreen/scripts/setup-dev-env.sh index 3f8d0c4292..ae4b44c626 100755 --- a/.evergreen/scripts/setup-dev-env.sh +++ b/.evergreen/scripts/setup-dev-env.sh @@ -32,11 +32,11 @@ if [ ! -d $BIN_DIR ]; then echo "export UV_PYTHON=$UV_PYTHON" >> $HERE/env.sh fi echo "Using python $UV_PYTHON" -uv sync -uv run --with pip pip install -e . +uv sync --frozen +uv run --frozen --with pip pip install -e . echo "Setting up python environment... done." # Ensure there is a pre-commit hook if there is a git checkout. if [ -d .git ] && [ ! -f .git/hooks/pre-commit ]; then - uv run pre-commit install + uv run --frozen pre-commit install fi diff --git a/justfile b/justfile index 6bcfe0c79c..8a076038a4 100644 --- a/justfile +++ b/justfile @@ -4,7 +4,7 @@ set dotenv-load set dotenv-filename := "./.evergreen/scripts/env.sh" # Commonly used command segments. -uv_run := "uv run --isolated " +uv_run := "uv run --isolated --frozen " typing_run := uv_run + "--group typing --extra aws --extra encryption --extra ocsp --extra snappy --extra test --extra zstd" docs_run := uv_run + "--extra docs" doc_build := "./doc/_build"