diff --git a/owlbot.py b/owlbot.py index e7fb391c2a..40443971d1 100644 --- a/owlbot.py +++ b/owlbot.py @@ -238,8 +238,18 @@ def place_before(path, text, *before_text, escape=None): """@nox.session\(python=SYSTEM_TEST_PYTHON_VERSIONS\) def system\(session\):""", """@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) -@nox.parametrize("database_dialect", ["GOOGLE_STANDARD_SQL", "POSTGRESQL"]) -def system(session, database_dialect):""", +@nox.parametrize( + "protobuf_implementation,database_dialect", + [ + ("python", "GOOGLE_STANDARD_SQL"), + ("python", "POSTGRESQL"), + ("upb", "GOOGLE_STANDARD_SQL"), + ("upb", "POSTGRESQL"), + ("cpp", "GOOGLE_STANDARD_SQL"), + ("cpp", "POSTGRESQL"), + ], +) +def system(session, protobuf_implementation, database_dialect):""", ) s.replace( @@ -248,6 +258,7 @@ def system(session, database_dialect):""", \)""", """*session.posargs, env={ + "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, "SPANNER_DATABASE_DIALECT": database_dialect, "SKIP_BACKUP_TESTS": "true", }, @@ -345,6 +356,19 @@ def mockserver(session): escape="()_*:", ) +s.replace( + "noxfile.py", + "install_systemtest_dependencies\(session, \"-c\", constraints_path\)", + """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") +""" +) + place_before( "noxfile.py", "UNIT_TEST_PYTHON_VERSIONS: List[str] = [", diff --git a/setup.py b/setup.py index 6d01b265cc..a32883075b 100644 --- a/setup.py +++ b/setup.py @@ -36,13 +36,13 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", - "google-cloud-core >= 1.4.4, < 3.0dev", - "grpc-google-iam-v1 >= 0.12.4, <1.0.0dev", - "proto-plus >= 1.22.0, <2.0.0dev", + "google-api-core[grpc] >= 1.34.0, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", + "google-cloud-core >= 1.4.4, < 3.0.0", + "grpc-google-iam-v1 >= 0.12.4, <1.0.0", + "proto-plus >= 1.22.0, <2.0.0", "sqlparse >= 0.4.4", - "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", - "protobuf>=3.20.2,<6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", + "proto-plus >= 1.22.2, <2.0.0; python_version>='3.11'", + "protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", "grpc-interceptor >= 0.15.4", ] extras = {