From d728983ce1b285fd7294e0d39d937ce26085786e Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 14:29:52 -0400 Subject: [PATCH 1/9] feat: centralize mypy config and update templates --- mypy.ini | 91 +++++++++++++++++++ .../gapic/ads-templates/noxfile.py.j2 | 1 + .../gapic/templates/noxfile.py.j2 | 1 + 3 files changed, 93 insertions(+) create mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 000000000000..1f40737c74ad --- /dev/null +++ b/mypy.ini @@ -0,0 +1,91 @@ +[mypy] +python_version = 3.14 +namespace_packages = True +ignore_missing_imports = False + +# Helps mypy navigate the "google" namespace more reliably in 3.10+ +explicit_package_bases = True + +# Performance: reuse results from previous runs to speed up "nox" +incremental = True + +exclude = (?x)( + ^third_party/ + | tests/unit/resources/ + | tests/unit/gapic/ + ) + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): +# Dependencies that historically lacks py.typed markers +[mypy-google.iam.*] +ignore_missing_imports = True + + +# ============================================================================== +# PACKAGE-SPECIFIC OVERRIDES +# ============================================================================== + +# --- google-cloud-core --- +[mypy-google.protobuf.*] +ignore_missing_imports = True + +# --- bigframes --- +[mypy-cloudpickle.*] +ignore_missing_imports = True +[mypy-flask] +ignore_missing_imports = True +[mypy-pydata_google_auth] +ignore_missing_imports = True +[mypy-google.colab] +ignore_missing_imports = True +[mypy-pytz] +ignore_missing_imports = True +[mypy-pyarrow.*] +ignore_missing_imports = True +[mypy-ibis.*] +ignore_missing_imports = True +[mypy-ipywidgets] +ignore_missing_imports = True +[mypy-google.cloud.pubsub] +ignore_missing_imports = True +[mypy-google.cloud.bigtable] +ignore_missing_imports = True +[mypy-anywidget] +ignore_missing_imports = True + +# --- google-cloud-bigtable --- +[mypy-google.cloud.bigtable.*] +check_untyped_defs = True +warn_unreachable = True +disallow_any_generics = True +ignore_errors = True + +[mypy-google.cloud.bigtable.data.*] +ignore_errors = False + +[mypy-grpc.*] +ignore_missing_imports = True +[mypy-google.auth.*] +ignore_missing_imports = True +[mypy-google.longrunning.*] +ignore_missing_imports = True +[mypy-google.oauth2.*] +ignore_missing_imports = True +[mypy-google.rpc.*] +ignore_missing_imports = True +[mypy-proto.*] +ignore_missing_imports = True +[mypy-pytest] +ignore_missing_imports = True + +# --- google-cloud-datastore --- +[mypy-google.cloud.datastore._app_engine_key_pb2] +ignore_errors = True + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): +# Remove once this generator bug is fixed +[mypy-google.cloud.datastore_v1.services.datastore.async_client] +ignore_errors = True + +[mypy-google.cloud.datastore_v1.services.datastore.client] +ignore_errors = True diff --git a/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 b/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 index 0a42cd6e4fa0..4490e3f872c9 100644 --- a/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 @@ -44,6 +44,7 @@ def mypy(session): session.install('.') session.run( 'mypy', + "--config-file=../../mypy.ini", {% if api.naming.module_namespace %} '{{ api.naming.module_namespace[0] }}', {% else %} diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index c240871b994e..ad4d15560b1b 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -101,6 +101,7 @@ def mypy(session): session.install(".") session.run( "mypy", + "--config-file=../../mypy.ini", "-p", {% if api.naming.module_namespace %} "{{ api.naming.module_namespace[0] }}", From f1c0d415625467dfd9279036c606ab1d4b1703d9 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 14:30:14 -0400 Subject: [PATCH 2/9] feat: delete mypy.ini templates and goldens --- .../gapic/ads-templates/mypy.ini.j2 | 3 --- .../gapic-generator/gapic/templates/mypy.ini.j2 | 15 --------------- .../tests/integration/goldens/asset/mypy.ini | 15 --------------- .../integration/goldens/credentials/mypy.ini | 15 --------------- .../tests/integration/goldens/eventarc/mypy.ini | 15 --------------- .../tests/integration/goldens/logging/mypy.ini | 15 --------------- .../integration/goldens/logging_internal/mypy.ini | 15 --------------- .../tests/integration/goldens/redis/mypy.ini | 15 --------------- .../integration/goldens/redis_selective/mypy.ini | 15 --------------- .../goldens/storagebatchoperations/mypy.ini | 15 --------------- 10 files changed, 138 deletions(-) delete mode 100644 packages/gapic-generator/gapic/ads-templates/mypy.ini.j2 delete mode 100644 packages/gapic-generator/gapic/templates/mypy.ini.j2 delete mode 100755 packages/gapic-generator/tests/integration/goldens/asset/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/credentials/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/eventarc/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/logging/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/logging_internal/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/redis/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/redis_selective/mypy.ini delete mode 100755 packages/gapic-generator/tests/integration/goldens/storagebatchoperations/mypy.ini diff --git a/packages/gapic-generator/gapic/ads-templates/mypy.ini.j2 b/packages/gapic-generator/gapic/ads-templates/mypy.ini.j2 deleted file mode 100644 index cb397f571128..000000000000 --- a/packages/gapic-generator/gapic/ads-templates/mypy.ini.j2 +++ /dev/null @@ -1,3 +0,0 @@ -[mypy] -python_version = 3.10 -namespace_packages = True diff --git a/packages/gapic-generator/gapic/templates/mypy.ini.j2 b/packages/gapic-generator/gapic/templates/mypy.ini.j2 deleted file mode 100644 index defc5b1ed854..000000000000 --- a/packages/gapic-generator/gapic/templates/mypy.ini.j2 +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True \ No newline at end of file diff --git a/packages/gapic-generator/tests/integration/goldens/asset/mypy.ini b/packages/gapic-generator/tests/integration/goldens/asset/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/asset/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/mypy.ini b/packages/gapic-generator/tests/integration/goldens/credentials/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/credentials/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/mypy.ini b/packages/gapic-generator/tests/integration/goldens/eventarc/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/logging/mypy.ini b/packages/gapic-generator/tests/integration/goldens/logging/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/logging/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/mypy.ini b/packages/gapic-generator/tests/integration/goldens/logging_internal/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/redis/mypy.ini b/packages/gapic-generator/tests/integration/goldens/redis/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/redis/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/mypy.ini b/packages/gapic-generator/tests/integration/goldens/redis_selective/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/mypy.ini b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/mypy.ini deleted file mode 100755 index e0e0da2e9e40..000000000000 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True From 779e62a90feb829e19bfec933c6bec5d63394d7c Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 14:31:04 -0400 Subject: [PATCH 3/9] fix: remove mypy.ini from datastore post-processing --- .../datastore-integration.yaml | 36 ---- .../google-cloud-datastore/docs/README.rst | 199 ------------------ .../google-cloud-datastore/docs/index.rst | 20 +- .../google/cloud/datastore/__init__.py | 163 +++++++++----- .../cloud/datastore_admin_v1/__init__.py | 8 +- .../google/cloud/datastore_v1/__init__.py | 8 +- packages/google-cloud-datastore/mypy.ini | 23 -- packages/google-cloud-datastore/noxfile.py | 10 +- packages/google-cloud-datastore/setup.py | 12 +- .../testing/constraints-3.10.txt | 6 +- .../testing/constraints-3.13.txt | 2 +- .../testing/constraints-3.14.txt | 2 +- 12 files changed, 136 insertions(+), 353 deletions(-) delete mode 100644 packages/google-cloud-datastore/docs/README.rst delete mode 100644 packages/google-cloud-datastore/mypy.ini diff --git a/.librarian/generator-input/client-post-processing/datastore-integration.yaml b/.librarian/generator-input/client-post-processing/datastore-integration.yaml index 7d81275e77c0..aca5e5845036 100644 --- a/.librarian/generator-input/client-post-processing/datastore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/datastore-integration.yaml @@ -39,42 +39,6 @@ replacements: "google-cloud-core >= 2.0.0, <3.0.0", "grpcio >= 1.59.0, < 2.0.0", count: 1 - - paths: [ - "packages/google-cloud-datastore/mypy.ini", - ] - before: |- - # Performance: reuse results from previous runs to speed up 'nox' - incremental = True - after: |- - # Performance: reuse results from previous runs to speed up "nox" - incremental = True - - [mypy-google.cloud.datastore._app_engine_key_pb2] - ignore_errors = True - - # TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): - # Remove once this generator bug is fixed - [mypy-google.cloud.datastore_v1.services.datastore.async_client] - ignore_errors = True - - # TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): - # Remove once this generator bug is fixed - [mypy-google.cloud.datastore_v1.services.datastore.client] - ignore_errors = True - count: 1 - - paths: [ - "packages/google-cloud-datastore/mypy.ini", - ] - before: | - ignore_missing_imports = False - - # TODO\(https://github.com/googleapis/gapic-generator-python/issues/2563\): - # Dependencies that historically lacks py.typed markers - \[mypy-google\.iam\.\*\] - ignore_missing_imports = True - after: | - ignore_missing_imports = True - count: 1 - paths: [ "packages/google-cloud-datastore/docs/index.rst", ] diff --git a/packages/google-cloud-datastore/docs/README.rst b/packages/google-cloud-datastore/docs/README.rst deleted file mode 100644 index 32a2b9a52a19..000000000000 --- a/packages/google-cloud-datastore/docs/README.rst +++ /dev/null @@ -1,199 +0,0 @@ -Python Client for Cloud Datastore -================================= - -|stable| |pypi| |versions| - -`Cloud Datastore`_: Accesses the schemaless NoSQL database to provide fully managed, robust, -scalable storage for your application. - -- `Client Library Documentation`_ -- `Product Documentation`_ - -.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg - :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels -.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-datastore.svg - :target: https://pypi.org/project/google-cloud-datastore/ -.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-datastore.svg - :target: https://pypi.org/project/google-cloud-datastore/ -.. _Cloud Datastore: https://cloud.google.com/datastore -.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/datastore/latest/summary_overview -.. _Product Documentation: https://cloud.google.com/datastore - -Quick Start ------------ - -In order to use this library, you first need to go through the following steps: - -1. `Select or create a Cloud Platform project.`_ -2. `Enable billing for your project.`_ -3. `Enable the Cloud Datastore.`_ -4. `Set up Authentication.`_ - -.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project -.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project -.. _Enable the Cloud Datastore.: https://cloud.google.com/datastore -.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html - -Installation -~~~~~~~~~~~~ - -Install this library in a virtual environment using `venv`_. `venv`_ is a tool that -creates isolated Python environments. These isolated environments can have separate -versions of Python packages, which allows you to isolate one project's dependencies -from the dependencies of other projects. - -With `venv`_, it's possible to install this library without needing system -install permissions, and without clashing with the installed system -dependencies. - -.. _`venv`: https://docs.python.org/3/library/venv.html - - -Code samples and snippets -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Code samples and snippets live in the `samples/`_ folder. - -.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-datastore/samples - - -Supported Python Versions -^^^^^^^^^^^^^^^^^^^^^^^^^ -Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of -Python. - -Python >= 3.10, including 3.14 - -.. _active: https://devguide.python.org/devcycle/#in-development-main-branch -.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches - -Unsupported Python Versions -^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.9 - - -If you are using an `end-of-life`_ -version of Python, we recommend that you update as soon as possible to an actively supported version. - -.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches - -Mac/Linux -^^^^^^^^^ - -.. code-block:: console - - python3 -m venv - source /bin/activate - pip install google-cloud-datastore - - -Windows -^^^^^^^ - -.. code-block:: console - - py -m venv - .\\Scripts\activate - pip install google-cloud-datastore - -Next Steps -~~~~~~~~~~ - -- Read the `Client Library Documentation`_ for Cloud Datastore - to see other available methods on the client. -- Read the `Cloud Datastore Product documentation`_ to learn - more about the product and see How-to Guides. -- View this `README`_ to see the full list of Cloud - APIs that we cover. - -.. _Cloud Datastore Product documentation: https://cloud.google.com/datastore -.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst - -Logging -------- - -This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes. -Note the following: - -#. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging. -#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**. -#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below. - -Simple, environment-based configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google -logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged -messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging -event. - -A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log. - -- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc. -- Invalid logging scopes: :code:`foo`, :code:`123`, etc. - -**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers. - -Environment-Based Examples -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- Enabling the default handler for all Google-based loggers - -.. code-block:: console - - export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google - -- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`): - -.. code-block:: console - - export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1 - - -Advanced, code-based configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also configure a valid logging scope using Python's standard `logging` mechanism. - -Code-Based Examples -^^^^^^^^^^^^^^^^^^^ - -- Configuring a handler for all Google-based loggers - -.. code-block:: python - - import logging - - from google.cloud import library_v1 - - base_logger = logging.getLogger("google") - base_logger.addHandler(logging.StreamHandler()) - base_logger.setLevel(logging.DEBUG) - -- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`): - -.. code-block:: python - - import logging - - from google.cloud import library_v1 - - base_logger = logging.getLogger("google.cloud.library_v1") - base_logger.addHandler(logging.StreamHandler()) - base_logger.setLevel(logging.DEBUG) - -Logging details -~~~~~~~~~~~~~~~ - -#. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root - logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set - :code:`logging.getLogger("google").propagate = True` in your code. -#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for - one library, but decide you need to also set up environment-based logging configuration for another library. - - #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual - if the code -based configuration gets applied first. - -#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get - executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured. - (This is the reason for 2.i. above.) diff --git a/packages/google-cloud-datastore/docs/index.rst b/packages/google-cloud-datastore/docs/index.rst index 4e0715f4c967..d7f5c9ea8717 100644 --- a/packages/google-cloud-datastore/docs/index.rst +++ b/packages/google-cloud-datastore/docs/index.rst @@ -1,28 +1,16 @@ .. include:: README.rst -.. note:: +.. include:: multiprocessing.rst - Because the Datastore client uses the :mod:`grpcio` library by default - and uses third-party :mod:`requests` library if the GRPC is disabled, - clients are safe to share instances across threads. In multiprocessing - scenarios, the best practice is to create client instances *after* - :class:`multiprocessing.Pool` or :class:`multiprocessing.Process` invokes - :func:`os.fork`. API Reference ------------- .. toctree:: :maxdepth: 2 - client - entities - keys - queries - aggregations - transactions - batches - helpers - admin_client + datastore_admin_v1/services_ + datastore_admin_v1/types_ + Changelog --------- diff --git a/packages/google-cloud-datastore/google/cloud/datastore/__init__.py b/packages/google-cloud-datastore/google/cloud/datastore/__init__.py index 2cb3e88e7490..a6548ed66d0d 100644 --- a/packages/google-cloud-datastore/google/cloud/datastore/__init__.py +++ b/packages/google-cloud-datastore/google/cloud/datastore/__init__.py @@ -13,64 +13,121 @@ # See the License for the specific language governing permissions and # limitations under the License. # -"""Shortcut methods for getting set up with Google Cloud Datastore. +from google.cloud.datastore import gapic_version as package_version -You'll typically use these to get started with the API: +__version__ = package_version.__version__ -.. doctest:: constructors - >>> from google.cloud import datastore - >>> - >>> client = datastore.Client() - >>> key = client.key('EntityKind', 1234) - >>> key - - >>> entity = datastore.Entity(key) - >>> entity['question'] = u'Life, universe?' # Explicit unicode for text - >>> entity['answer'] = 42 - >>> entity - - >>> query = client.query(kind='EntityKind') +from google.cloud.datastore_v1.services.datastore.async_client import ( + DatastoreAsyncClient, +) +from google.cloud.datastore_v1.services.datastore.client import DatastoreClient +from google.cloud.datastore_v1.types.aggregation_result import ( + AggregationResult, + AggregationResultBatch, +) +from google.cloud.datastore_v1.types.datastore import ( + AllocateIdsRequest, + AllocateIdsResponse, + BeginTransactionRequest, + BeginTransactionResponse, + CommitRequest, + CommitResponse, + LookupRequest, + LookupResponse, + Mutation, + MutationResult, + PropertyMask, + PropertyTransform, + ReadOptions, + ReserveIdsRequest, + ReserveIdsResponse, + RollbackRequest, + RollbackResponse, + RunAggregationQueryRequest, + RunAggregationQueryResponse, + RunQueryRequest, + RunQueryResponse, + TransactionOptions, +) +from google.cloud.datastore_v1.types.entity import ( + ArrayValue, + Entity, + Key, + PartitionId, + Value, +) +from google.cloud.datastore_v1.types.query import ( + AggregationQuery, + CompositeFilter, + EntityResult, + Filter, + FindNearest, + GqlQuery, + GqlQueryParameter, + KindExpression, + Projection, + PropertyFilter, + PropertyOrder, + PropertyReference, + Query, + QueryResultBatch, +) +from google.cloud.datastore_v1.types.query_profile import ( + ExecutionStats, + ExplainMetrics, + ExplainOptions, + PlanSummary, +) -The main concepts with this API are: - -- :class:`~google.cloud.datastore.client.Client` - which represents a project (string), database (string), and namespace - (string) bundled with a connection and has convenience methods for - constructing objects with that project/database/namespace. - -- :class:`~google.cloud.datastore.entity.Entity` - which represents a single entity in the datastore - (akin to a row in relational database world). - -- :class:`~google.cloud.datastore.key.Key` - which represents a pointer to a particular entity in the datastore - (akin to a unique identifier in relational database world). - -- :class:`~google.cloud.datastore.query.Query` - which represents a lookup or search over the rows in the datastore. - -- :class:`~google.cloud.datastore.transaction.Transaction` - which represents an all-or-none transaction and enables consistency - when race conditions may occur. -""" - -from google.cloud.datastore.batch import Batch -from google.cloud.datastore.client import Client -from google.cloud.datastore.entity import Entity -from google.cloud.datastore.key import Key -from google.cloud.datastore.query import Query -from google.cloud.datastore.query_profile import ExplainOptions -from google.cloud.datastore.transaction import Transaction -from google.cloud.datastore.version import __version__ - -__all__ = [ - "__version__", - "Batch", - "Client", +__all__ = ( + "DatastoreClient", + "DatastoreAsyncClient", + "AggregationResult", + "AggregationResultBatch", + "AllocateIdsRequest", + "AllocateIdsResponse", + "BeginTransactionRequest", + "BeginTransactionResponse", + "CommitRequest", + "CommitResponse", + "LookupRequest", + "LookupResponse", + "Mutation", + "MutationResult", + "PropertyMask", + "PropertyTransform", + "ReadOptions", + "ReserveIdsRequest", + "ReserveIdsResponse", + "RollbackRequest", + "RollbackResponse", + "RunAggregationQueryRequest", + "RunAggregationQueryResponse", + "RunQueryRequest", + "RunQueryResponse", + "TransactionOptions", + "ArrayValue", "Entity", "Key", + "PartitionId", + "Value", + "AggregationQuery", + "CompositeFilter", + "EntityResult", + "Filter", + "FindNearest", + "GqlQuery", + "GqlQueryParameter", + "KindExpression", + "Projection", + "PropertyFilter", + "PropertyOrder", + "PropertyReference", "Query", + "QueryResultBatch", + "ExecutionStats", + "ExplainMetrics", "ExplainOptions", - "Transaction", -] + "PlanSummary", +) diff --git a/packages/google-cloud-datastore/google/cloud/datastore_admin_v1/__init__.py b/packages/google-cloud-datastore/google/cloud/datastore_admin_v1/__init__.py index ab92fd717567..e6209583615b 100644 --- a/packages/google-cloud-datastore/google/cloud/datastore_admin_v1/__init__.py +++ b/packages/google-cloud-datastore/google/cloud/datastore_admin_v1/__init__.py @@ -75,7 +75,7 @@ def parse_version_to_tuple(version_string: str): """Safely converts a semantic version string to a comparable tuple of integers. - Example: "4.25.8" -> (4, 25, 8) + Example: "6.33.5" -> (6, 33, 5) Ignores non-numeric parts and handles common version formats. Args: version_string: Version string in the format "x.y.z" or "x.y.z" @@ -104,9 +104,9 @@ def _get_version(dependency_name): return (None, "--") _dependency_package = "google.protobuf" - _next_supported_version = "4.25.8" - _next_supported_version_tuple = (4, 25, 8) - _recommendation = " (we recommend 6.x)" + _next_supported_version = "6.33.5" + _next_supported_version_tuple = (6, 33, 5) + _recommendation = " (we recommend 7.x)" (_version_used, _version_used_string) = _get_version(_dependency_package) if _version_used and _version_used < _next_supported_version_tuple: warnings.warn( diff --git a/packages/google-cloud-datastore/google/cloud/datastore_v1/__init__.py b/packages/google-cloud-datastore/google/cloud/datastore_v1/__init__.py index 7e8f2602291d..7017a18c095c 100644 --- a/packages/google-cloud-datastore/google/cloud/datastore_v1/__init__.py +++ b/packages/google-cloud-datastore/google/cloud/datastore_v1/__init__.py @@ -98,7 +98,7 @@ def parse_version_to_tuple(version_string: str): """Safely converts a semantic version string to a comparable tuple of integers. - Example: "4.25.8" -> (4, 25, 8) + Example: "6.33.5" -> (6, 33, 5) Ignores non-numeric parts and handles common version formats. Args: version_string: Version string in the format "x.y.z" or "x.y.z" @@ -127,9 +127,9 @@ def _get_version(dependency_name): return (None, "--") _dependency_package = "google.protobuf" - _next_supported_version = "4.25.8" - _next_supported_version_tuple = (4, 25, 8) - _recommendation = " (we recommend 6.x)" + _next_supported_version = "6.33.5" + _next_supported_version_tuple = (6, 33, 5) + _recommendation = " (we recommend 7.x)" (_version_used, _version_used_string) = _get_version(_dependency_package) if _version_used and _version_used < _next_supported_version_tuple: warnings.warn( diff --git a/packages/google-cloud-datastore/mypy.ini b/packages/google-cloud-datastore/mypy.ini deleted file mode 100644 index 2d553926db9d..000000000000 --- a/packages/google-cloud-datastore/mypy.ini +++ /dev/null @@ -1,23 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up "nox" -incremental = True - -[mypy-google.cloud.datastore._app_engine_key_pb2] -ignore_errors = True - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): -# Remove once this generator bug is fixed -[mypy-google.cloud.datastore_v1.services.datastore.async_client] -ignore_errors = True - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): -# Remove once this generator bug is fixed -[mypy-google.cloud.datastore_v1.services.datastore.client] -ignore_errors = True diff --git a/packages/google-cloud-datastore/noxfile.py b/packages/google-cloud-datastore/noxfile.py index af42d740478e..97924abe9807 100644 --- a/packages/google-cloud-datastore/noxfile.py +++ b/packages/google-cloud-datastore/noxfile.py @@ -107,6 +107,7 @@ def mypy(session): session.install(".") session.run( "mypy", + "--config-file=../../mypy.ini", "-p", "google", # TODO(https://github.com/googleapis/google-cloud-python/issues/16083) @@ -317,8 +318,7 @@ def install_systemtest_dependencies(session, *constraints): @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) -@nox.parametrize("disable_grpc", [False, True]) -def system(session, disable_grpc): +def system(session): """Run the system test suite.""" constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" @@ -341,10 +341,6 @@ def system(session, disable_grpc): install_systemtest_dependencies(session, "-c", constraints_path) - env = {} - if disable_grpc: - env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True" - # Run py.test against the system tests. if system_test_exists: session.run( @@ -352,7 +348,6 @@ def system(session, disable_grpc): "--quiet", f"--junitxml=system_{session.python}_sponge_log.xml", system_test_path, - env=env, *session.posargs, ) if system_test_folder_exists: @@ -361,7 +356,6 @@ def system(session, disable_grpc): "--quiet", f"--junitxml=system_{session.python}_sponge_log.xml", system_test_folder_path, - env=env, *session.posargs, ) diff --git a/packages/google-cloud-datastore/setup.py b/packages/google-cloud-datastore/setup.py index b0cac8c0ec50..26f21974303e 100644 --- a/packages/google-cloud-datastore/setup.py +++ b/packages/google-cloud-datastore/setup.py @@ -29,7 +29,10 @@ version = None with open(os.path.join(package_root, "google/cloud/datastore/gapic_version.py")) as fp: - version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read()) + version_candidates = re.findall( + r"(?<=\")\d+\.\d+\.\d+[^\"\s]*(?=\")", + fp.read(), + ) assert len(version_candidates) == 1 version = version_candidates[0] @@ -39,16 +42,15 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.17.1, <3.0.0", + "google-api-core[grpc] >= 2.24.2, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "google-cloud-core >= 2.0.0, <3.0.0", "grpcio >= 1.59.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", + "proto-plus >= 1.26.1, <2.0.0", + "protobuf >= 6.33.5, < 8.0.0", ] extras = {} url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-datastore" diff --git a/packages/google-cloud-datastore/testing/constraints-3.10.txt b/packages/google-cloud-datastore/testing/constraints-3.10.txt index 7be9c36933fc..81605a716d32 100644 --- a/packages/google-cloud-datastore/testing/constraints-3.10.txt +++ b/packages/google-cloud-datastore/testing/constraints-3.10.txt @@ -4,8 +4,8 @@ # pinning their versions to their lower bounds. # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 -google-api-core==2.17.1 +google-api-core==2.24.2 google-auth==2.14.1 grpcio==1.59.0 -proto-plus==1.22.3 -protobuf==4.25.8 +proto-plus==1.26.1 +protobuf==6.33.5 diff --git a/packages/google-cloud-datastore/testing/constraints-3.13.txt b/packages/google-cloud-datastore/testing/constraints-3.13.txt index 1e93c60e50aa..6bd7e1f5b03d 100644 --- a/packages/google-cloud-datastore/testing/constraints-3.13.txt +++ b/packages/google-cloud-datastore/testing/constraints-3.13.txt @@ -9,4 +9,4 @@ google-api-core>=2 google-auth>=2 grpcio>=1 proto-plus>=1 -protobuf>=6 +protobuf>=7 diff --git a/packages/google-cloud-datastore/testing/constraints-3.14.txt b/packages/google-cloud-datastore/testing/constraints-3.14.txt index 1e93c60e50aa..6bd7e1f5b03d 100644 --- a/packages/google-cloud-datastore/testing/constraints-3.14.txt +++ b/packages/google-cloud-datastore/testing/constraints-3.14.txt @@ -9,4 +9,4 @@ google-api-core>=2 google-auth>=2 grpcio>=1 proto-plus>=1 -protobuf>=6 +protobuf>=7 From 485e7dbac64a080bf15ce7fc38b9ceefe9a59b17 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 14:31:53 -0400 Subject: [PATCH 4/9] feat(datastore): regenerate package with centralized mypy.ini POC --- .../google-cloud-datastore/docs/README.rst | 199 ++++++++++++++++++ .../google-cloud-datastore/docs/index.rst | 20 +- .../google/cloud/datastore/__init__.py | 163 +++++--------- packages/google-cloud-datastore/noxfile.py | 9 +- 4 files changed, 276 insertions(+), 115 deletions(-) create mode 100644 packages/google-cloud-datastore/docs/README.rst diff --git a/packages/google-cloud-datastore/docs/README.rst b/packages/google-cloud-datastore/docs/README.rst new file mode 100644 index 000000000000..32a2b9a52a19 --- /dev/null +++ b/packages/google-cloud-datastore/docs/README.rst @@ -0,0 +1,199 @@ +Python Client for Cloud Datastore +================================= + +|stable| |pypi| |versions| + +`Cloud Datastore`_: Accesses the schemaless NoSQL database to provide fully managed, robust, +scalable storage for your application. + +- `Client Library Documentation`_ +- `Product Documentation`_ + +.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg + :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels +.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-datastore.svg + :target: https://pypi.org/project/google-cloud-datastore/ +.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-datastore.svg + :target: https://pypi.org/project/google-cloud-datastore/ +.. _Cloud Datastore: https://cloud.google.com/datastore +.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/datastore/latest/summary_overview +.. _Product Documentation: https://cloud.google.com/datastore + +Quick Start +----------- + +In order to use this library, you first need to go through the following steps: + +1. `Select or create a Cloud Platform project.`_ +2. `Enable billing for your project.`_ +3. `Enable the Cloud Datastore.`_ +4. `Set up Authentication.`_ + +.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project +.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project +.. _Enable the Cloud Datastore.: https://cloud.google.com/datastore +.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html + +Installation +~~~~~~~~~~~~ + +Install this library in a virtual environment using `venv`_. `venv`_ is a tool that +creates isolated Python environments. These isolated environments can have separate +versions of Python packages, which allows you to isolate one project's dependencies +from the dependencies of other projects. + +With `venv`_, it's possible to install this library without needing system +install permissions, and without clashing with the installed system +dependencies. + +.. _`venv`: https://docs.python.org/3/library/venv.html + + +Code samples and snippets +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Code samples and snippets live in the `samples/`_ folder. + +.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-datastore/samples + + +Supported Python Versions +^^^^^^^^^^^^^^^^^^^^^^^^^ +Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of +Python. + +Python >= 3.10, including 3.14 + +.. _active: https://devguide.python.org/devcycle/#in-development-main-branch +.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches + +Unsupported Python Versions +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Python <= 3.9 + + +If you are using an `end-of-life`_ +version of Python, we recommend that you update as soon as possible to an actively supported version. + +.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches + +Mac/Linux +^^^^^^^^^ + +.. code-block:: console + + python3 -m venv + source /bin/activate + pip install google-cloud-datastore + + +Windows +^^^^^^^ + +.. code-block:: console + + py -m venv + .\\Scripts\activate + pip install google-cloud-datastore + +Next Steps +~~~~~~~~~~ + +- Read the `Client Library Documentation`_ for Cloud Datastore + to see other available methods on the client. +- Read the `Cloud Datastore Product documentation`_ to learn + more about the product and see How-to Guides. +- View this `README`_ to see the full list of Cloud + APIs that we cover. + +.. _Cloud Datastore Product documentation: https://cloud.google.com/datastore +.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst + +Logging +------- + +This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes. +Note the following: + +#. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging. +#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**. +#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below. + +Simple, environment-based configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google +logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged +messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging +event. + +A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log. + +- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc. +- Invalid logging scopes: :code:`foo`, :code:`123`, etc. + +**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers. + +Environment-Based Examples +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Enabling the default handler for all Google-based loggers + +.. code-block:: console + + export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google + +- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`): + +.. code-block:: console + + export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1 + + +Advanced, code-based configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also configure a valid logging scope using Python's standard `logging` mechanism. + +Code-Based Examples +^^^^^^^^^^^^^^^^^^^ + +- Configuring a handler for all Google-based loggers + +.. code-block:: python + + import logging + + from google.cloud import library_v1 + + base_logger = logging.getLogger("google") + base_logger.addHandler(logging.StreamHandler()) + base_logger.setLevel(logging.DEBUG) + +- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`): + +.. code-block:: python + + import logging + + from google.cloud import library_v1 + + base_logger = logging.getLogger("google.cloud.library_v1") + base_logger.addHandler(logging.StreamHandler()) + base_logger.setLevel(logging.DEBUG) + +Logging details +~~~~~~~~~~~~~~~ + +#. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root + logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set + :code:`logging.getLogger("google").propagate = True` in your code. +#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for + one library, but decide you need to also set up environment-based logging configuration for another library. + + #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual + if the code -based configuration gets applied first. + +#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get + executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured. + (This is the reason for 2.i. above.) diff --git a/packages/google-cloud-datastore/docs/index.rst b/packages/google-cloud-datastore/docs/index.rst index d7f5c9ea8717..4e0715f4c967 100644 --- a/packages/google-cloud-datastore/docs/index.rst +++ b/packages/google-cloud-datastore/docs/index.rst @@ -1,16 +1,28 @@ .. include:: README.rst -.. include:: multiprocessing.rst +.. note:: + Because the Datastore client uses the :mod:`grpcio` library by default + and uses third-party :mod:`requests` library if the GRPC is disabled, + clients are safe to share instances across threads. In multiprocessing + scenarios, the best practice is to create client instances *after* + :class:`multiprocessing.Pool` or :class:`multiprocessing.Process` invokes + :func:`os.fork`. API Reference ------------- .. toctree:: :maxdepth: 2 - datastore_admin_v1/services_ - datastore_admin_v1/types_ - + client + entities + keys + queries + aggregations + transactions + batches + helpers + admin_client Changelog --------- diff --git a/packages/google-cloud-datastore/google/cloud/datastore/__init__.py b/packages/google-cloud-datastore/google/cloud/datastore/__init__.py index a6548ed66d0d..2cb3e88e7490 100644 --- a/packages/google-cloud-datastore/google/cloud/datastore/__init__.py +++ b/packages/google-cloud-datastore/google/cloud/datastore/__init__.py @@ -13,121 +13,64 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from google.cloud.datastore import gapic_version as package_version +"""Shortcut methods for getting set up with Google Cloud Datastore. -__version__ = package_version.__version__ +You'll typically use these to get started with the API: +.. doctest:: constructors -from google.cloud.datastore_v1.services.datastore.async_client import ( - DatastoreAsyncClient, -) -from google.cloud.datastore_v1.services.datastore.client import DatastoreClient -from google.cloud.datastore_v1.types.aggregation_result import ( - AggregationResult, - AggregationResultBatch, -) -from google.cloud.datastore_v1.types.datastore import ( - AllocateIdsRequest, - AllocateIdsResponse, - BeginTransactionRequest, - BeginTransactionResponse, - CommitRequest, - CommitResponse, - LookupRequest, - LookupResponse, - Mutation, - MutationResult, - PropertyMask, - PropertyTransform, - ReadOptions, - ReserveIdsRequest, - ReserveIdsResponse, - RollbackRequest, - RollbackResponse, - RunAggregationQueryRequest, - RunAggregationQueryResponse, - RunQueryRequest, - RunQueryResponse, - TransactionOptions, -) -from google.cloud.datastore_v1.types.entity import ( - ArrayValue, - Entity, - Key, - PartitionId, - Value, -) -from google.cloud.datastore_v1.types.query import ( - AggregationQuery, - CompositeFilter, - EntityResult, - Filter, - FindNearest, - GqlQuery, - GqlQueryParameter, - KindExpression, - Projection, - PropertyFilter, - PropertyOrder, - PropertyReference, - Query, - QueryResultBatch, -) -from google.cloud.datastore_v1.types.query_profile import ( - ExecutionStats, - ExplainMetrics, - ExplainOptions, - PlanSummary, -) + >>> from google.cloud import datastore + >>> + >>> client = datastore.Client() + >>> key = client.key('EntityKind', 1234) + >>> key + + >>> entity = datastore.Entity(key) + >>> entity['question'] = u'Life, universe?' # Explicit unicode for text + >>> entity['answer'] = 42 + >>> entity + + >>> query = client.query(kind='EntityKind') -__all__ = ( - "DatastoreClient", - "DatastoreAsyncClient", - "AggregationResult", - "AggregationResultBatch", - "AllocateIdsRequest", - "AllocateIdsResponse", - "BeginTransactionRequest", - "BeginTransactionResponse", - "CommitRequest", - "CommitResponse", - "LookupRequest", - "LookupResponse", - "Mutation", - "MutationResult", - "PropertyMask", - "PropertyTransform", - "ReadOptions", - "ReserveIdsRequest", - "ReserveIdsResponse", - "RollbackRequest", - "RollbackResponse", - "RunAggregationQueryRequest", - "RunAggregationQueryResponse", - "RunQueryRequest", - "RunQueryResponse", - "TransactionOptions", - "ArrayValue", +The main concepts with this API are: + +- :class:`~google.cloud.datastore.client.Client` + which represents a project (string), database (string), and namespace + (string) bundled with a connection and has convenience methods for + constructing objects with that project/database/namespace. + +- :class:`~google.cloud.datastore.entity.Entity` + which represents a single entity in the datastore + (akin to a row in relational database world). + +- :class:`~google.cloud.datastore.key.Key` + which represents a pointer to a particular entity in the datastore + (akin to a unique identifier in relational database world). + +- :class:`~google.cloud.datastore.query.Query` + which represents a lookup or search over the rows in the datastore. + +- :class:`~google.cloud.datastore.transaction.Transaction` + which represents an all-or-none transaction and enables consistency + when race conditions may occur. +""" + +from google.cloud.datastore.batch import Batch +from google.cloud.datastore.client import Client +from google.cloud.datastore.entity import Entity +from google.cloud.datastore.key import Key +from google.cloud.datastore.query import Query +from google.cloud.datastore.query_profile import ExplainOptions +from google.cloud.datastore.transaction import Transaction +from google.cloud.datastore.version import __version__ + +__all__ = [ + "__version__", + "Batch", + "Client", "Entity", "Key", - "PartitionId", - "Value", - "AggregationQuery", - "CompositeFilter", - "EntityResult", - "Filter", - "FindNearest", - "GqlQuery", - "GqlQueryParameter", - "KindExpression", - "Projection", - "PropertyFilter", - "PropertyOrder", - "PropertyReference", "Query", - "QueryResultBatch", - "ExecutionStats", - "ExplainMetrics", "ExplainOptions", - "PlanSummary", -) + "Transaction", +] diff --git a/packages/google-cloud-datastore/noxfile.py b/packages/google-cloud-datastore/noxfile.py index 97924abe9807..26087fd5bd16 100644 --- a/packages/google-cloud-datastore/noxfile.py +++ b/packages/google-cloud-datastore/noxfile.py @@ -318,7 +318,8 @@ def install_systemtest_dependencies(session, *constraints): @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) -def system(session): +@nox.parametrize("disable_grpc", [False, True]) +def system(session, disable_grpc): """Run the system test suite.""" constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" @@ -341,6 +342,10 @@ def system(session): install_systemtest_dependencies(session, "-c", constraints_path) + env = {} + if disable_grpc: + env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True" + # Run py.test against the system tests. if system_test_exists: session.run( @@ -348,6 +353,7 @@ def system(session): "--quiet", f"--junitxml=system_{session.python}_sponge_log.xml", system_test_path, + env=env, *session.posargs, ) if system_test_folder_exists: @@ -356,6 +362,7 @@ def system(session): "--quiet", f"--junitxml=system_{session.python}_sponge_log.xml", system_test_folder_path, + env=env, *session.posargs, ) From 9b403cb0f2d0298fcc0d29f03a4258d90e82d33d Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 14:35:15 -0400 Subject: [PATCH 5/9] fix: add google.type to mypy ignores --- mypy.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mypy.ini b/mypy.ini index 1f40737c74ad..a5456a18d345 100644 --- a/mypy.ini +++ b/mypy.ini @@ -20,6 +20,9 @@ exclude = (?x)( [mypy-google.iam.*] ignore_missing_imports = True +[mypy-google.type.*] +ignore_missing_imports = True + # ============================================================================== # PACKAGE-SPECIFIC OVERRIDES From cd574c9356434acf6f40ddef10476cafb9af758a Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 15:21:26 -0400 Subject: [PATCH 6/9] feat(generator): introduce MYPY_CONFIG_FILE constant in templates --- mypy.ini | 1 - .../gapic-generator/gapic/ads-templates/noxfile.py.j2 | 8 +++++++- packages/gapic-generator/gapic/templates/noxfile.py.j2 | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mypy.ini b/mypy.ini index a5456a18d345..e8d3405ef0ac 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,4 @@ [mypy] -python_version = 3.14 namespace_packages = True ignore_missing_imports = False diff --git a/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 b/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 index 4490e3f872c9..13b37159d38a 100644 --- a/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/ads-templates/noxfile.py.j2 @@ -3,10 +3,16 @@ {% block content %} import os +import pathlib import nox # type: ignore +CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): # Add tests for Python 3.15 alpha1 # https://peps.python.org/pep-0790/ @@ -44,7 +50,7 @@ def mypy(session): session.install('.') session.run( 'mypy', - "--config-file=../../mypy.ini", + f"--config-file={MYPY_CONFIG_FILE}", {% if api.naming.module_namespace %} '{{ api.naming.module_namespace[0] }}', {% else %} diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index ad4d15560b1b..a11b38f658eb 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -40,6 +40,8 @@ DEFAULT_PYTHON_VERSION = "3.14" PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( @@ -101,7 +103,7 @@ def mypy(session): session.install(".") session.run( "mypy", - "--config-file=../../mypy.ini", + f"--config-file={MYPY_CONFIG_FILE}", "-p", {% if api.naming.module_namespace %} "{{ api.naming.module_namespace[0] }}", From 8a618a5dfcf1f4272425fa59d7f1e7b43ddd667d Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 15:21:45 -0400 Subject: [PATCH 7/9] feat(datastore): update noxfile.py to use dynamic MYPY_CONFIG_FILE --- packages/google-cloud-datastore/noxfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-datastore/noxfile.py b/packages/google-cloud-datastore/noxfile.py index 26087fd5bd16..9e9c06b33b12 100644 --- a/packages/google-cloud-datastore/noxfile.py +++ b/packages/google-cloud-datastore/noxfile.py @@ -46,6 +46,8 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( @@ -107,7 +109,7 @@ def mypy(session): session.install(".") session.run( "mypy", - "--config-file=../../mypy.ini", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", # TODO(https://github.com/googleapis/google-cloud-python/issues/16083) From 5ae98b5618865c83125d3c66d1042d32d69e9330 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 15:49:00 -0400 Subject: [PATCH 8/9] test(generator): update integration test goldens with centralized mypy path --- .../tests/integration/goldens/asset/noxfile.py | 4 ++++ .../tests/integration/goldens/credentials/noxfile.py | 4 ++++ .../tests/integration/goldens/eventarc/noxfile.py | 4 ++++ .../tests/integration/goldens/logging/noxfile.py | 4 ++++ .../tests/integration/goldens/logging_internal/noxfile.py | 4 ++++ .../tests/integration/goldens/redis/noxfile.py | 4 ++++ .../tests/integration/goldens/redis_selective/noxfile.py | 4 ++++ .../integration/goldens/storagebatchoperations/noxfile.py | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 93e185b59d11..53fd7ac9172e 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index c991842b24ca..2a297b6139c1 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 1ec5368a9dd4..285969c33257 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index 448aec3ef2b0..f3e2606aea85 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index 448aec3ef2b0..f3e2606aea85 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index d860093c9653..9f6565236855 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index d860093c9653..9f6565236855 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index 9afec5aeae68..9066f3ce44cd 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -48,6 +48,9 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") + if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt" @@ -108,6 +111,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", From 971e416c5964a44b8e765f65b2eb7cced5718b73 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 9 Jun 2026 16:08:10 -0400 Subject: [PATCH 9/9] test(generator): remove extra blank line in integration test golden noxfile configs --- .../gapic-generator/tests/integration/goldens/asset/noxfile.py | 1 - .../tests/integration/goldens/credentials/noxfile.py | 1 - .../tests/integration/goldens/eventarc/noxfile.py | 1 - .../gapic-generator/tests/integration/goldens/logging/noxfile.py | 1 - .../tests/integration/goldens/logging_internal/noxfile.py | 1 - .../gapic-generator/tests/integration/goldens/redis/noxfile.py | 1 - .../tests/integration/goldens/redis_selective/noxfile.py | 1 - .../tests/integration/goldens/storagebatchoperations/noxfile.py | 1 - 8 files changed, 8 deletions(-) diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 53fd7ac9172e..bdbc94d16aad 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 2a297b6139c1..dacd23460373 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 285969c33257..d950dd9d285b 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index f3e2606aea85..7296b5795a8b 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index f3e2606aea85..7296b5795a8b 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index 9f6565236855..ca0b6b791d68 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index 9f6565236855..ca0b6b791d68 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini") diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index 9066f3ce44cd..141088cbacc3 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -47,7 +47,6 @@ PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - # Path to the centralized mypy configuration file at the repository root. MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")