Skip to content

Commit

Permalink
chore(spanner): Issue#1143 - Update dependency (#1158)
Browse files Browse the repository at this point in the history
* chore(spanner): Issue#1143 - Update dependency - Move grpc-interceptor to extras_required named testing

* chore(spanner): Issue#1143 - Update dependency - Move grpc-interceptor to extras_required named testing

* chore(spanner): Issue#1143 - Update dependency

- add dependency 'testing' for pretest

* chore(spanner): Issue#1143 - Update dependency

- add dependency 'testing' for docs and docfx sessions

* chore(spanner): Issue#1143 - Update dependency

  - Added "testing" dependency to owlbot.py
  - Fixed lint error

---------

Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
  • Loading branch information
bhatt4982 and harshachinta committed Aug 26, 2024
1 parent 3c91a01 commit 44434aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
9 changes: 5 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]] = {}

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -336,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.
Expand Down Expand Up @@ -371,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.
Expand Down Expand Up @@ -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 = (
Expand Down
6 changes: 3 additions & 3 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

name = "google-cloud-spanner"


description = "Google Cloud Spanner API client library"

version = {}
Expand All @@ -43,7 +42,6 @@
"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",
"grpc-interceptor >= 0.15.4",
]
extras = {
"tracing": [
Expand All @@ -52,6 +50,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"
Expand Down

0 comments on commit 44434aa

Please sign in to comment.