PYTHON-5047 Avoid updating the uv lock unintentionally (#2076)

This commit is contained in:
Steven Silvester 2025-01-24 07:47:14 -06:00 committed by GitHub
parent a3cc43f60d
commit dc182310da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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"