Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .librarian/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2176,7 +2176,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-hypercomputecluster
version: 0.0.0
last_generated_commit: 72e7439c8e7e9986cf1865e337fc7c64ca5bda1f
last_generated_commit: b6bb60733a7314d0c45e294b12d563fd6194b8f5
apis:
- path: google/cloud/hypercomputecluster/v1beta
service_config: hypercomputecluster_v1beta.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,98 +18,6 @@
__version__ = package_version.__version__


import google.api_core as api_core

if hasattr(api_core, "check_python_version") and hasattr(
api_core, "check_dependency_versions"
): # pragma: NO COVER
api_core.check_python_version("google.cloud.hypercomputecluster_v1beta") # type: ignore
api_core.check_dependency_versions("google.cloud.hypercomputecluster_v1beta") # type: ignore
else: # pragma: NO COVER
# An older version of api_core is installed which does not define the
# functions above. We do equivalent checks manually.
try:
import sys
import warnings

_py_version_str = sys.version.split()[0]
_package_label = "google.cloud.hypercomputecluster_v1beta"
if sys.version_info < (3, 9):
warnings.warn(
"You are using a non-supported Python version "
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",
FutureWarning,
)
if sys.version_info[:2] == (3, 9):
warnings.warn(
f"You are using a Python version ({_py_version_str}) "
+ f"which Google will stop supporting in {_package_label} in "
+ "January 2026. Please "
+ "upgrade to the latest Python version, or at "
+ "least to Python 3.10, before then, and "
+ f"then update {_package_label}.",
FutureWarning,
)

from packaging.version import parse as parse_version

if sys.version_info < (3, 8):
import pkg_resources

def _get_version(dependency_name):
try:
version_string = pkg_resources.get_distribution(
dependency_name
).version
return (parse_version(version_string), version_string)
except pkg_resources.DistributionNotFound:
return (None, "--")

else:
from importlib import metadata

def _get_version(dependency_name):
try:
version_string = metadata.version("requests")
parsed_version = parse_version(version_string)
return (parsed_version.release, version_string)
except metadata.PackageNotFoundError:
return (None, "--")

_dependency_package = "google.protobuf"
_next_supported_version = "4.25.8"
_next_supported_version_tuple = (4, 25, 8)
_recommendation = " (we recommend 6.x)"
(_version_used, _version_used_string) = _get_version(_dependency_package)
if _version_used and _version_used < _next_supported_version_tuple:
warnings.warn(
f"Package {_package_label} depends on "
+ f"{_dependency_package}, currently installed at version "
+ f"{_version_used_string}. Future updates to "
+ f"{_package_label} will require {_dependency_package} at "
+ f"version {_next_supported_version} or higher{_recommendation}."
+ " Please ensure "
+ "that either (a) your Python environment doesn't pin the "
+ f"version of {_dependency_package}, so that updates to "
+ f"{_package_label} can require the higher version, or "
+ "(b) you manually update your Python environment to use at "
+ f"least version {_next_supported_version} of "
+ f"{_dependency_package}.",
FutureWarning,
)
except Exception:
warnings.warn(
"Could not determine the version of Python "
+ "currently being used. To continue receiving "
+ "updates for {_package_label}, ensure you are "
+ "using a supported version of Python; see "
+ "https://devguide.python.org/versions/"
)


from .services.hypercompute_cluster import (
HypercomputeClusterAsyncClient,
HypercomputeClusterClient,
Expand Down
1 change: 0 additions & 1 deletion packages/google-cloud-hypercomputecluster/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"packaging", # TODO: Remove once we require versions of api core that include this
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6188,7 +6188,6 @@ def test_hypercompute_cluster_grpc_asyncio_transport_channel():

# Remove this test when deprecated arguments (api_mtls_endpoint, client_cert_source) are
# removed from grpc/grpc_asyncio transport constructor.
@pytest.mark.filterwarnings("ignore::FutureWarning")
@pytest.mark.parametrize(
"transport_class",
[
Expand Down
Loading