From 0c8e328a43078858c37e12d42f5f5152cec7f19f Mon Sep 17 00:00:00 2001 From: Sanjeev Bhatt Date: Thu, 4 Jul 2024 15:26:56 +0530 Subject: [PATCH 1/5] chore(spanner): Issue#1143 - Update dependency - Move grpc-interceptor to extras_required named testing --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 95ff029bc6..34204c34b0 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,6 @@ "sqlparse >= 0.4.4", "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", "protobuf>=3.20.2,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - "grpc-interceptor >= 0.15.4", ] extras = { "tracing": [ @@ -52,6 +51,7 @@ "opentelemetry-instrumentation >= 0.20b0, < 0.23dev", ], "libcst": "libcst >= 0.2.5", + "testing": "grpc-interceptor >= 0.15.4", } url = "https://github.com/googleapis/python-spanner" @@ -99,4 +99,4 @@ python_requires=">=3.7", include_package_data=True, zip_safe=False, -) +) \ No newline at end of file From ec82666debc3c0ebb9b028d754e9c4f6d2a19044 Mon Sep 17 00:00:00 2001 From: Sanjeev Bhatt Date: Mon, 8 Jul 2024 09:35:03 +0530 Subject: [PATCH 2/5] chore(spanner): Issue#1143 - Update dependency - Move grpc-interceptor to extras_required named testing --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 34204c34b0..9eb1277d20 100644 --- a/setup.py +++ b/setup.py @@ -22,11 +22,11 @@ name = "google-cloud-spanner" - description = "Google Cloud Spanner API client library" version = {} -with open(os.path.join(package_root, "google/cloud/spanner_v1/gapic_version.py")) as fp: +with open(os.path.join(package_root, + "google/cloud/spanner_v1/gapic_version.py")) as fp: exec(fp.read(), version) version = version["__version__"] @@ -99,4 +99,4 @@ python_requires=">=3.7", include_package_data=True, zip_safe=False, -) \ No newline at end of file +) From b6fe4d4f55e6a962eca0efb5f99ade9cf8d1013c Mon Sep 17 00:00:00 2001 From: Sanjeev Bhatt Date: Tue, 9 Jul 2024 20:48:34 +0530 Subject: [PATCH 3/5] chore(spanner): Issue#1143 - Update dependency - add dependency 'testing' for pretest --- noxfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 7b275246a0..95bd902932 100644 --- a/noxfile.py +++ b/noxfile.py @@ -59,6 +59,7 @@ SYSTEM_TEST_DEPENDENCIES: List[str] = [] SYSTEM_TEST_EXTRAS: List[str] = [ "tracing", + "testing", ] SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} @@ -165,7 +166,7 @@ def install_unittest_dependencies(session, *constraints): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("-e", ".[tracing]", "-c", constraints_path) + session.install("-e", ".[tracing, testing]", "-c", constraints_path) # XXX: Dump installed versions to debug OT issue session.run("pip", "list") @@ -432,7 +433,7 @@ def prerelease_deps(session, protobuf_implementation, database_dialect): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies - session.install("-e", ".[all, tests, tracing]") + session.install("-e", ".[all, tests, tracing, testing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES session.install(*unit_deps_all) system_deps_all = ( From 74b2312e82c7d5893ecc5fe088dd92450e8faa35 Mon Sep 17 00:00:00 2001 From: Sanjeev Bhatt Date: Wed, 10 Jul 2024 10:35:28 +0530 Subject: [PATCH 4/5] chore(spanner): Issue#1143 - Update dependency - add dependency 'testing' for docs and docfx sessions --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 6d6f4981d5..e599d96369 100644 --- a/noxfile.py +++ b/noxfile.py @@ -337,7 +337,7 @@ def cover(session): def docs(session): """Build the docs for this library.""" - session.install("-e", ".[tracing]") + session.install("-e", ".[tracing, testing]") session.install( # We need to pin to specific versions of the `sphinxcontrib-*` packages # which still support sphinx 4.x. @@ -372,7 +372,7 @@ def docs(session): def docfx(session): """Build the docfx yaml files for this library.""" - session.install("-e", ".[tracing]") + session.install("-e", ".[tracing, testing]") session.install( # We need to pin to specific versions of the `sphinxcontrib-*` packages # which still support sphinx 4.x. From 8f9286048fb57289eba2fc63a38bba35169120b3 Mon Sep 17 00:00:00 2001 From: Sanjeev Bhatt Date: Thu, 11 Jul 2024 13:31:49 +0530 Subject: [PATCH 5/5] chore(spanner): Issue#1143 - Update dependency - Added "testing" dependency to owlbot.py - Fixed lint error --- owlbot.py | 6 +++--- setup.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/owlbot.py b/owlbot.py index e9c12e593c..b7f09f2f74 100644 --- a/owlbot.py +++ b/owlbot.py @@ -128,7 +128,7 @@ def get_staging_dirs( samples=True, cov_level=98, split_system_tests=True, - system_test_extras=["tracing"], + system_test_extras=["tracing", "testing"], ) s.move( templated_files, @@ -180,7 +180,7 @@ def place_before(path, text, *before_text, escape=None): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("-e", ".[tracing]", "-c", constraints_path) + session.install("-e", ".[tracing, testing]", "-c", constraints_path) # XXX: Dump installed versions to debug OT issue session.run("pip", "list") @@ -229,7 +229,7 @@ def place_before(path, text, *before_text, escape=None): s.replace( "noxfile.py", r"""session.install\("-e", "."\)""", - """session.install("-e", ".[tracing]")""", + """session.install("-e", ".[tracing, testing]")""", ) # Apply manual changes from PR https://github.com/googleapis/python-spanner/pull/759 diff --git a/setup.py b/setup.py index 9eb1277d20..a8173d6fa7 100644 --- a/setup.py +++ b/setup.py @@ -25,8 +25,7 @@ description = "Google Cloud Spanner API client library" version = {} -with open(os.path.join(package_root, - "google/cloud/spanner_v1/gapic_version.py")) as fp: +with open(os.path.join(package_root, "google/cloud/spanner_v1/gapic_version.py")) as fp: exec(fp.read(), version) version = version["__version__"]