Skip to content

PYTHON-5057 Avoid updating the uv lock unintentionally #2076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2025
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
8 changes: 4 additions & 4 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .evergreen/scripts/setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading