Skip to content

test(spanner): fall back to local Python version for mockserver tests - #18861

Merged
olavloite merged 1 commit into
mainfrom
spanner-fallback-python-version
Oct 27, 2026
Merged

olavloite merged 1 commit into
mainfrom
spanner-fallback-python-version

Conversation

@olavloite

Copy link
Copy Markdown
Contributor

Fall back to the local Python version when running mockserver tests to prevent CI failures due to new Python versions, or local build failures due to missing Python versions locally. The mockserver tests do not really care about which Python version is being used, as long as it is one that is supported by the Spanner client.

@olavloite
olavloite requested a review from a team as a code owner October 27, 2026 07:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the noxfile.py in packages/google-cloud-spanner to dynamically resolve the default Python version for mock server tests. It introduces an import of the sys module and updates DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION to use the MOCK_SERVER_TESTS_PYTHON_VERSION environment variable if set, fall back to '3.12' if python3.12 is available on the system, or otherwise default to the active Python interpreter's version. There are no review comments, and I have no feedback to provide.

Fall back to the local Python version when running mockserver tests to prevent
CI failures due to new Python versions, or local build failures due to missing
Python versions locally. The mockserver tests do not really care about which
Python version is being used, as long as it is one that is supported by the
Spanner client.
@olavloite
olavloite force-pushed the spanner-fallback-python-version branch from 5409802 to c2dee5e Compare October 27, 2026 07:37
@olavloite
olavloite requested a review from a team as a code owner October 27, 2026 07:37
@olavloite
olavloite merged commit 598c1af into main Oct 27, 2026
56 checks passed
@olavloite
olavloite deleted the spanner-fallback-python-version branch October 27, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants