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
4 changes: 2 additions & 2 deletions packages/google-cloud-backupdr/docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,7 +83,7 @@

# General information about the project.
project = "google-cloud-backupdr"
copyright = "2025, Google, LLC"
copyright = "2026, Google, LLC"
author = "Google APIs"

# The version info for the project you're documenting, acts as replacement for
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,13 +21,7 @@

__version__ = package_version.__version__

if sys.version_info >= (3, 8): # pragma: NO COVER
from importlib import metadata
else: # pragma: NO COVER
# TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
# this code path once we drop support for Python 3.7
import importlib_metadata as metadata

from importlib import metadata

from .services.backup_dr import BackupDRAsyncClient, BackupDRClient
from .services.backup_dr_protection_summary import (
Expand Down Expand Up @@ -196,28 +190,17 @@
# 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.backupdr_v1"
if sys.version_info < (3, 9):
if sys.version_info < (3, 10):
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}.",
+ f"least to Python 3.10, and then update {_package_label}.",
FutureWarning,
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -625,11 +625,11 @@ async def sample_create_management_server():
)

# Make the request
operation = client.create_management_server(request=request)
operation = await client.create_management_server(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -774,11 +774,11 @@ async def sample_delete_management_server():
)

# Make the request
operation = client.delete_management_server(request=request)
operation = await client.delete_management_server(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -909,11 +909,11 @@ async def sample_create_backup_vault():
)

# Make the request
operation = client.create_backup_vault(request=request)
operation = await client.create_backup_vault(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -1427,11 +1427,11 @@ async def sample_update_backup_vault():
)

# Make the request
operation = client.update_backup_vault(request=request)
operation = await client.update_backup_vault(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -1566,11 +1566,11 @@ async def sample_delete_backup_vault():
)

# Make the request
operation = client.delete_backup_vault(request=request)
operation = await client.delete_backup_vault(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -1940,11 +1940,11 @@ async def sample_update_data_source():
)

# Make the request
operation = client.update_data_source(request=request)
operation = await client.update_data_source(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -2459,11 +2459,11 @@ async def sample_update_backup():
)

# Make the request
operation = client.update_backup(request=request)
operation = await client.update_backup(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -2598,11 +2598,11 @@ async def sample_delete_backup():
)

# Make the request
operation = client.delete_backup(request=request)
operation = await client.delete_backup(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -2726,11 +2726,11 @@ async def sample_restore_backup():
)

# Make the request
operation = client.restore_backup(request=request)
operation = await client.restore_backup(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -2867,11 +2867,11 @@ async def sample_create_backup_plan():
)

# Make the request
operation = client.create_backup_plan(request=request)
operation = await client.create_backup_plan(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -3025,11 +3025,11 @@ async def sample_update_backup_plan():
)

# Make the request
operation = client.update_backup_plan(request=request)
operation = await client.update_backup_plan(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -3411,11 +3411,11 @@ async def sample_delete_backup_plan():
)

# Make the request
operation = client.delete_backup_plan(request=request)
operation = await client.delete_backup_plan(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -3805,11 +3805,11 @@ async def sample_create_backup_plan_association():
)

# Make the request
operation = client.create_backup_plan_association(request=request)
operation = await client.create_backup_plan_association(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -3963,11 +3963,11 @@ async def sample_update_backup_plan_association():
)

# Make the request
operation = client.update_backup_plan_association(request=request)
operation = await client.update_backup_plan_association(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -4519,11 +4519,11 @@ async def sample_delete_backup_plan_association():
)

# Make the request
operation = client.delete_backup_plan_association(request=request)
operation = await client.delete_backup_plan_association(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -4659,11 +4659,11 @@ async def sample_trigger_backup():
)

# Make the request
operation = client.trigger_backup(request=request)
operation = await client.trigger_backup(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down Expand Up @@ -5194,11 +5194,11 @@ async def sample_initialize_service():
)

# Make the request
operation = client.initialize_service(request=request)
operation = await client.initialize_service(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down
4 changes: 1 addition & 3 deletions packages/google-cloud-backupdr/noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,6 @@
LINT_PATHS.append("samples")

ALL_PYTHON = [
"3.9",
"3.10",
"3.11",
"3.12",
Expand Down Expand Up @@ -390,7 +389,6 @@ def docs(session):
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The -W flag has been removed from the sphinx-build command. This flag is important for maintaining documentation quality as it treats warnings as errors, preventing issues like broken links or malformed docstrings from being merged. It should be restored to ensure CI catches documentation regressions.

Suggested change
"sphinx-build",
"sphinx-build",
"-W", # warnings as errors

"-W", # warnings as errors
"-T", # show full traceback on exception
"-N", # no colors
"-b",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,11 +51,11 @@ async def sample_create_backup_plan_association():
)

# Make the request
operation = client.create_backup_plan_association(request=request)
operation = await client.create_backup_plan_association(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,11 +56,11 @@ async def sample_create_backup_plan():
)

# Make the request
operation = client.create_backup_plan(request=request)
operation = await client.create_backup_plan(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,11 +45,11 @@ async def sample_create_backup_vault():
)

# Make the request
operation = client.create_backup_vault(request=request)
operation = await client.create_backup_vault(request=request)

print("Waiting for operation to complete...")

response = (await operation).result()
response = await operation.result()

# Handle the response
print(response)
Expand Down
Loading
Loading