Skip to content
Draft
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
description: Update google-auth version to avoid dependency conflict
url: https://github.com/googleapis/google-cloud-python/issues/17131
replacements:
- paths: [
packages/google-cloud-automl/setup.py,
]
before: '(?s)dependencies = \[.*?\]\nextras = \{\}'
after: |
dependencies = [
"google-api-core[grpc] >= 2.17.1, <3.0.0",
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/17131
"google-auth >= 2.26.1, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
"protobuf >= 4.25.8, < 8.0.0",
]
extras = {
"libcst": "libcst >= 0.2.5",
"pandas": ["pandas>=1.1.3"],
"storage": ["google-cloud-storage >=2.14.0, <4.0.0"],
}
count: 1
- paths: [
packages/google-cloud-automl/docs/automl_v1beta1/services_.rst,
]
before: |
Services for Google Cloud Automl v1beta1 API
============================================
.. toctree::
:maxdepth: 2

auto_ml
prediction_service
after: |
Services for Google Cloud Automl v1beta1 API
============================================
.. toctree::
:maxdepth: 2

tables
auto_ml
prediction_service
count: 1
- paths: [
packages/google-cloud-automl/google/cloud/automl_v1beta1/__init__.py,
]
before: |
\)
from .types.annotation_payload import AnnotationPayload
after: |
)
from .services.tables.gcs_client import GcsClient
from .services.tables.tables_client import TablesClient
from .types.annotation_payload import AnnotationPayload
count: 1
- paths: [
packages/google-cloud-automl/google/cloud/automl_v1beta1/__init__.py,
]
before: |
__all__ = \(
"AutoMlAsyncClient",
after: |
__all__ = (
"GcsClient",
"TablesClient",
"AutoMlAsyncClient",
count: 1
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: |
UNIT_TEST_EXTRAS: List\[str\] = \[\]
after: |
UNIT_TEST_EXTRAS: List[str] = ["pandas", "storage"]
count: 1
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: '(?s)([ \t]+)unit_deps_all = (?:(?!UNIT_TEST_EXTRAS)[\s\S])*?session\.install\(\*unit_deps_all\)'
after: |
\g<1>unit_deps_all = (
\g<1> UNIT_TEST_STANDARD_DEPENDENCIES
\g<1> + UNIT_TEST_EXTERNAL_DEPENDENCIES
\g<1> + UNIT_TEST_EXTRAS
\g<1>)
\g<1>session.install(*unit_deps_all)
count: 2
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: |
"types-protobuf",
\ \)
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

There is an unnecessary backslash before the indentation spaces. This will likely cause the regex to fail to match the intended line in noxfile.py. Indentation in YAML block scalars is preserved, so you should just use spaces to match the indentation of the target code.

          \)

after: |
"types-protobuf",
"pandas-stubs",
)
count: 1
- paths: [
packages/google-cloud-automl/testing/constraints-3.10.txt,
]
before: 'google-auth==2.14.1'
after: 'google-auth==2.26.1'
count: 1
Original file line number Diff line number Diff line change
Expand Up @@ -192,70 +192,6 @@ replacements:
monitoring_v3/services_
monitoring_v3/types_
count: 1
- paths: [
packages/google-cloud-automl/setup.py,
]
before: extras = \{\}
after: |
extras = {
"libcst": "libcst >= 0.2.5",
"pandas": ["pandas>=1.1.3"],
"storage": ["google-cloud-storage >=2.14.0, <4.0.0"],
}
count: 1
- paths: [
packages/google-cloud-automl/docs/automl_v1beta1/services_.rst,
]
before: |
Services for Google Cloud Automl v1beta1 API
============================================
.. toctree::
:maxdepth: 2

auto_ml
prediction_service
after: |
Services for Google Cloud Automl v1beta1 API
============================================
.. toctree::
:maxdepth: 2

tables
auto_ml
prediction_service
count: 1
- paths: [
packages/google-cloud-automl/google/cloud/automl_v1beta1/__init__.py,
]
before: |
\)
from .types.annotation_payload import AnnotationPayload
after: |
)
from .services.tables.gcs_client import GcsClient
from .services.tables.tables_client import TablesClient
from .types.annotation_payload import AnnotationPayload
count: 1
- paths: [
packages/google-cloud-automl/google/cloud/automl_v1beta1/__init__.py,
]
before: |
__all__ = \(
"AutoMlAsyncClient",
after: |
__all__ = (
"GcsClient",
"TablesClient",
"AutoMlAsyncClient",
count: 1
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: |
UNIT_TEST_EXTRAS: List\[str\] = \[\]
after: |
UNIT_TEST_EXTRAS: List[str] = ["pandas", "storage"]
count: 1
- paths: [
packages/google-cloud-logging/noxfile.py,
]
Expand All @@ -270,17 +206,6 @@ replacements:
"opentelemetry-sdk",
]
count: 1
- paths: [
packages/google-cloud-automl/noxfile.py,
]
before: |
"types-protobuf",
\ \)
after: |
"types-protobuf",
"pandas-stubs",
)
count: 1
- paths: [
packages/google-cloud-monitoring/noxfile.py,
]
Expand Down
1 change: 0 additions & 1 deletion librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ libraries:
- google/cloud/automl_v1beta1/services/tables/__init__.py
- google/cloud/automl_v1beta1/services/tables/gcs_client.py
- google/cloud/automl_v1beta1/services/tables/tables_client.py
skip_generate: true
python:
library_type: GAPIC_COMBO
metadata_name_override: automl
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-automl/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-automl"
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
25 changes: 4 additions & 21 deletions packages/google-cloud-automl/google/cloud/automl_v1/__init__.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 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.auto_ml import AutoMlAsyncClient, AutoMlClient
from .services.prediction_service import (
Expand Down Expand Up @@ -149,28 +143,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.automl_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
Loading
Loading