Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ replacements:
"3.12",
"3.13",
"3.14",
"3.15",
]

UNIT_TEST_STANDARD_DEPENDENCIES = [
Expand Down Expand Up @@ -568,25 +569,21 @@ replacements:
@nox.session(python=ALL_PYTHON)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
["python", "upb"],
)
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.
py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
session.skip("cpp implementation is not supported in python 3.11+")

# TODO(https://github.com/googleapis/google-cloud-python/issues/17741):
# Remove once `google-crc32c` wheels are published for 3.15
if session.python == "3.15":
session.skip("Skipping 3.15 until wheels are available for google-crc32c.")

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
install_unittest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
session.install("protobuf<4")

# Run py.test against the unit tests.
session.run(
"py.test",
Expand Down Expand Up @@ -818,15 +815,11 @@ replacements:
@nox.session(python=DEFAULT_PYTHON_VERSION)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
["python", "upb"],
)
def prerelease_deps(session, protobuf_implementation):
"""Run all tests with prerelease versions of dependencies installed."""

py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
session.install("-e", ".[all, tests, tracing]")
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ replacements:
"3.12",
"3.13",
"3.14",
"3.15",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
Expand Down Expand Up @@ -827,30 +828,16 @@ replacements:
@nox.session(python=ALL_PYTHON)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
["python", "upb"],
)
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.

if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
install_unittest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
session.install("protobuf<4")

# Run py.test against the unit tests.
args = [
"py.test",
Expand Down Expand Up @@ -946,8 +933,6 @@ replacements:
("python", "POSTGRESQL"),
("upb", "GOOGLE_STANDARD_SQL"),
("upb", "POSTGRESQL"),
("cpp", "GOOGLE_STANDARD_SQL"),
("cpp", "POSTGRESQL"),
],
)
def system(session, protobuf_implementation, database_dialect):
Expand Down Expand Up @@ -975,14 +960,6 @@ replacements:
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
)

if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install pyopenssl for mTLS testing.
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
session.install("pyopenssl")
Expand All @@ -995,12 +972,6 @@ replacements:

install_systemtest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
session.install("protobuf<4")

# Run py.test against the system tests.
if system_test_exists:
args = [
Expand Down Expand Up @@ -1174,21 +1145,11 @@ replacements:
("python", "POSTGRESQL"),
("upb", "GOOGLE_STANDARD_SQL"),
("upb", "POSTGRESQL"),
("cpp", "GOOGLE_STANDARD_SQL"),
("cpp", "POSTGRESQL"),
],
)
def prerelease_deps(session, protobuf_implementation, database_dialect):
"""Run all tests with prerelease versions of dependencies installed."""

if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
session.install("-e", ".[all, tests, tracing]")
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
Expand Down
23 changes: 8 additions & 15 deletions packages/google-cloud-bigtable/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"3.12",
"3.13",
"3.14",
"3.15",
]

UNIT_TEST_STANDARD_DEPENDENCIES = [
Expand Down Expand Up @@ -216,25 +217,21 @@ def install_unittest_dependencies(session, *constraints):
@nox.session(python=ALL_PYTHON)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
["python", "upb"],
)
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.
py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
session.skip("cpp implementation is not supported in python 3.11+")

# TODO(https://github.com/googleapis/google-cloud-python/issues/17741):
# Remove once `google-crc32c` wheels are published for 3.15
if session.python == "3.15":
session.skip("Skipping 3.15 until wheels are available for google-crc32c.")

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
install_unittest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
session.install("protobuf<4")

# Run py.test against the unit tests.
session.run(
"py.test",
Expand Down Expand Up @@ -466,15 +463,11 @@ def docfx(session):
@nox.session(python=DEFAULT_PYTHON_VERSION)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
["python", "upb"],
)
def prerelease_deps(session, protobuf_implementation):
"""Run all tests with prerelease versions of dependencies installed."""

py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
session.install("-e", ".[all, tests, tracing]")
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
Expand Down
43 changes: 2 additions & 41 deletions packages/google-cloud-spanner/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"3.12",
"3.13",
"3.14",
"3.15",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
Expand Down Expand Up @@ -214,30 +215,16 @@ def install_unittest_dependencies(session, *constraints):
@nox.session(python=ALL_PYTHON)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
["python", "upb"],
)
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.

if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
install_unittest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
session.install("protobuf<4")

# Run py.test against the unit tests.
args = [
"py.test",
Expand Down Expand Up @@ -333,8 +320,6 @@ def install_systemtest_dependencies(session, *constraints):
("python", "POSTGRESQL"),
("upb", "GOOGLE_STANDARD_SQL"),
("upb", "POSTGRESQL"),
("cpp", "GOOGLE_STANDARD_SQL"),
("cpp", "POSTGRESQL"),
],
)
def system(session, protobuf_implementation, database_dialect):
Expand Down Expand Up @@ -362,14 +347,6 @@ def system(session, protobuf_implementation, database_dialect):
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
)

if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install pyopenssl for mTLS testing.
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
session.install("pyopenssl")
Expand All @@ -382,12 +359,6 @@ def system(session, protobuf_implementation, database_dialect):

install_systemtest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
session.install("protobuf<4")

# Run py.test against the system tests.
if system_test_exists:
args = [
Expand Down Expand Up @@ -561,21 +532,11 @@ def docfx(session):
("python", "POSTGRESQL"),
("upb", "GOOGLE_STANDARD_SQL"),
("upb", "POSTGRESQL"),
("cpp", "GOOGLE_STANDARD_SQL"),
("cpp", "POSTGRESQL"),
],
)
def prerelease_deps(session, protobuf_implementation, database_dialect):
"""Run all tests with prerelease versions of dependencies installed."""

if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
session.install("-e", ".[all, tests, tracing]")
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
Expand Down
Loading