GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(spanner): implement dict protocol and nested unwrapping for JsonObject by sakthivelmanii · Pull Request #17915 · googleapis/google-cloud-python

Conversation

@sakthivelmanii

@sakthivelmanii sakthivelmanii commented Jul 27, 2026 •
edited by olavloite
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes JsonObject array/scalar/null variants breaking standard Python container protocols (len, bool, iter, getitem, contains, eq). Adds _unwrap_for_json helper to safely serialize nested JsonObject instances without data erasure.

Fixes #15870

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@sakthivelmanii
sakthivelmanii requested a review from a team as a code owner July 27, 2026 21:17
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Jul 27, 2026
View reviewed changes

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Code Review

This pull request implements standard Python container protocols (such as length, truthiness, iteration, indexing, and equality) for JsonObject to support array, scalar, and null variants, and introduces a recursive unwrapping helper for serialization. The feedback recommends correcting the truthiness of scalar values to reflect their actual boolean value, simplifying equality checks by removing defensive getattr calls, preventing null objects from equating to empty dictionaries, and expanding unit tests to cover falsy scalars.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-spanner/tests/unit/test_datatypes.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sakthivelmanii
sakthivelmanii force-pushed the feat-spanner-jsonobject-helpers branch from 89a45f3 to 9339283 Compare July 28, 2026 05:37
olavloite
olavloite requested changes Jul 28, 2026
View reviewed changes

@olavloite olavloite left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Code Review: PR #17915 (fix(spanner): implement dict protocol and nested unwrapping for JsonObject)


Executive Summary

PR #17915 aims to fix issue #15870 by allowing JsonObject (which wraps Spanner JSON types) to support standard Python container protocols (len, bool, iter, __getitem__, __contains__, __eq__) for array, scalar, and null JSON variants, as well as fixing nested JsonObject serialization via _unwrap_for_json.

While the PR makes good progress towards fixing nested serialization and basic index/loop access, the current implementation is incomplete, contains critical equality and initialization bugs, and breaks fundamental Python protocol expectations.


1. Implementation Assessment

Completeness: Incomplete Dict Protocol

JsonObject inherits directly from dict (class JsonObject(dict)). However, the PR only overrides standard magic methods (__len__, __bool__, __iter__, __getitem__, __contains__), leaving core dict methods unhandled for array, scalar, and null variants:

  • .get(key[, default]) is broken: arr = JsonObject([10, 20]) allows arr[0] (returns 10), but arr.get(0) returns None.
  • .copy() causes silent data loss: Calling arr.copy() on JsonObject([10, 20]) calls dict.copy(), which returns an empty dictionary {}—erasing all array data!
  • .keys(), .values(), .items() diverge from iter(): list(arr) yields [10, 20], but list(arr.keys()) returns [].
  • dict(arr) erases data: dict(JsonObject([10, 20])) returns {}.

Reasonableness: High Architectural Tension

Subclassing dict for an object that can hold a JSON list, int, str, bool, or None creates an architectural mismatch. Because isinstance(obj, dict) evaluates to True for all JsonObject instances:

  • Passing JsonObject([10, 20]) to standard Python libraries or built-ins that check isinstance(val, dict) (e.g., standard json.dumps(obj)) will result in silent serialization as {} (empty dict) rather than [10, 20].

Efficiency: Good

_unwrap_for_json uses a recursive tree traversal. It is $O(N)$ with respect to the number of nodes in the JSON structure, which is optimal for preparing nested data for json.dumps.


2. Bugs & Critical Flaws Found

Bug A: Asymmetric Equality (a == b vs b == a)

Symmetry is a strict requirement for Python equality (a == b MUST equal b == a). In PR 17915, comparing JsonObject() and JsonObject(None) violates this:

>>> JsonObject() == JsonObject(None)
True
>>> JsonObject(None) == JsonObject()
False  # VIOLATION: Equality symmetry is broken!

Root Cause: In JsonObject.__init__:

self._is_scalar_value = len(args) == 1 and not isinstance(args[0], (list, dict))

Because isinstance(None, (list, dict)) is False, JsonObject(None) sets _is_scalar_value = True and stores _simple_value = None.
When evaluating JsonObject(None) == JsonObject():

  1. JsonObject(None) checks if self._is_scalar_value:
  2. It returns other._is_scalar_value and self._simple_value == other._simple_value
  3. JsonObject()._is_scalar_value is False, so it returns False!

Bug B: Inconsistent Invocations for JSON null

JsonObject() and JsonObject(None) behave completely differently when operated on:

  • iter(JsonObject(None)) -> Raises TypeError: 'NoneType' object is not iterable (due to _is_scalar_value = True).
  • iter(JsonObject()) -> Returns iter(["__json_null__"]) (leaking internal dict key __json_null__).
  • "__json_null__" in JsonObject() -> Returns True.
  • "__json_null__" in JsonObject(None) -> Raises TypeError.

Bug C: Tuple vs List Array Inequality

>>> JsonObject((1, 2)) == [1, 2]
False
>>> JsonObject((1, 2)) == JsonObject([1, 2])
False

Since JsonObject supports initializing arrays with tuples (isinstance(args[0], (list, tuple))), comparing a tuple-backed array to a list-backed array should evaluate to True for JSON semantics.


3. Test Coverage & Missing Tests

While unit tests were added for standard use cases, key edge cases and regression scenarios are missing:

  1. Equality Symmetry Tests: Missing test assertions verifying a == b and b == a across all null/scalar/array combinations.
  2. Dict Method Tests: Missing unit tests verifying .get(), .copy(), .keys(), .values(), and .items() on non-dict variants.
  3. Third-Party / Dict Interop Tests: Missing tests checking behavior when dict() or copy.deepcopy() is called on a JsonObject.

4. Breaking Changes Analysis

Category 1: Enhancements & Fixes ("This did not work -> Now works")

  • Array / Scalar Indexing & Iteration: Operations like len(JsonObject([1, 2])), JsonObject([1, 2])[0], for item in JsonObject([1, 2]), and 42 in JsonObject([42]) previously raised errors or returned incorrect dict lengths (0). These now work as expected.
  • Nested Serialization: Serializing JsonObject({"a": JsonObject([1, 2])}) previously produced {"a": {}} (data loss). It now produces {"a": [1, 2]}.

Category 2: Behavioral Changes ("Works differently than before")

  • Truthiness & Length of Null Objects:
    • Previously, bool(JsonObject()) returned True (because the underlying dict held {"__json_null__": True}). Now, bool(JsonObject()) returns False.
    • len(JsonObject()) now returns 0 (previously returned 1).
    • Should we worry about this change? No. Returning False for bool(null) and 0 for len(null) aligns with standard Python semantics where null/empty values are falsy.

Recommended Fixes for the PR Author

To make this PR robust and safe to merge, the following updates are recommended:

  1. Fix Null / Scalar Detection in __init__:
    Exclude None explicitly from _is_scalar_value:

    self._is_scalar_value = len(args) == 1 and args[0] is not None and not isinstance(args[0], (list, dict))
  2. Normalize Tuple Arrays to Lists:
    Convert input tuples to lists during initialization to ensure equality comparisons work consistently:

    if self._is_array:
        self._array_value = list(args[0])
        return
  3. Override .get() and .copy() on JsonObject:

    def get(self, key, default=None):
        if self._is_array:
            try:
                return self._array_value[key]
            except (IndexError, TypeError):
                return default
        if self._is_scalar_value or self._is_null:
            return default
        return super().get(key, default)
    
    def copy(self):
        if self._is_array:
            return JsonObject(list(self._array_value))
        if self._is_scalar_value:
            return JsonObject(self._simple_value)
        if self._is_null:
            return JsonObject(None)
        return JsonObject(super().copy())

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py
"""Represents a Spanner INTERVAL type.

An interval is a combination of months, days and nanoseconds.
Internally, Spanner supports Interval value with the following range of individual fields:

@olavloite olavloite Jul 28, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please undo this change. It does not appear to be related to the actual change, and the new comment does not make sense.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sakthivelmanii sakthivelmanii Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py

_INTERVAL_PATTERN = re.compile(
r"^P(-?\d+Y)?(-?\d+M)?(-?\d+D)?(T(-?\d+H)?(-?\d+M)?(-?((\d+([.,]\d{1,9})?)|([.,]\d{1,9}))S)?)?$"
r"^P(-?\d+Y)?(-?\d+M)?(-?\d+D)?"

@olavloite olavloite Jul 28, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can we undo these unrelated changes? (unless it would otherwise cause CI failures due to wrong formatting)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sakthivelmanii sakthivelmanii Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It would cause formatting issues. ruff automatically formatted this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/tests/unit/test_datatypes.py
@@ -1,6 +1,6 @@
# Copyright 2024 Google LLC All rights reserved.

@olavloite olavloite Jul 28, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This also seems unrelated (and wrong?)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sakthivelmanii sakthivelmanii Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/tests/unit/test_datatypes.py
# See the License for the specific language governing permissions and
# limitations under the License.


@olavloite olavloite Jul 28, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nit: remove, unless it causes a formatting error

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sakthivelmanii sakthivelmanii Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sakthivelmanii
sakthivelmanii force-pushed the feat-spanner-jsonobject-helpers branch from aa9bb61 to 83c2f80 Compare July 28, 2026 08:05
@parthea parthea assigned olavloite Jul 29, 2026
olavloite
olavloite requested changes Jul 30, 2026
View reviewed changes

@olavloite olavloite left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can we add these unit tests:

import unittest
from google.cloud.spanner_v1.data_types import JsonObject, _unwrap_for_json


class Test_JsonObject_edge_cases_and_invariants(unittest.TestCase):
    """Unit tests catching remaining bugs in JsonObject rewrapping and dict invariants."""

    def test_rewrapping_null_object_preserves_null_state(self):
        """Verify that wrapping a null JsonObject preserves _is_null and serialize()."""
        # Test default JsonObject() null
        null_obj = JsonObject()
        rewrapped = JsonObject(null_obj)
        self.assertTrue(rewrapped._is_null, "Rewrapped JsonObject lost _is_null=True flag")
        self.assertIsNone(rewrapped.serialize(), "Rewrapped JsonObject() should serialize to None")
        self.assertFalse(bool(rewrapped), "Rewrapped JsonObject() should be falsy")
        self.assertEqual(len(rewrapped), 0, "Rewrapped JsonObject() length should be 0")

        # Test JsonObject(None) null
        null_none_obj = JsonObject(None)
        rewrapped_none = JsonObject(null_none_obj)
        self.assertTrue(rewrapped_none._is_null, "Rewrapped JsonObject(None) lost _is_null=True flag")
        self.assertIsNone(rewrapped_none.serialize(), "Rewrapped JsonObject(None) should serialize to None")

    def test_keys_values_items_dict_invariant_for_arrays(self):
        """Verify that dict.keys(), dict.values(), and dict.items() are mutually consistent for array JsonObjects."""
        arr = JsonObject([10, 20])
        keys = list(arr.keys())
        values = list(arr.values())
        items = list(arr.items())

        # Standard Python dict invariant: list(keys) MUST match [k for k, v in items]
        self.assertEqual(keys, [0, 1], "keys() should return integer indices matching items() keys")
        self.assertEqual(values, [10, 20], "values() should return array elements")
        self.assertEqual(items, [(0, 10), (1, 20)])
        self.assertEqual(keys, [k for k, v in items], "d.keys() must match [k for k, v in d.items()]")
        
        # Verify zip(keys, values) reconstructs items
        self.assertEqual(dict(zip(arr.keys(), arr.values())), {0: 10, 1: 20})

    def test_nested_rewrapped_null_serialization(self):
        """Verify that nested rewrapped null JsonObjects serialize correctly inside parent containers."""
        nested = JsonObject({"a": JsonObject(JsonObject(None))})
        self.assertEqual(nested.serialize(), '{"a":null}')

        raw_unwrapped = _unwrap_for_json({"a": JsonObject(JsonObject(None))})
        self.assertEqual(raw_unwrapped, {"a": None})

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py Outdated
Comment on lines 56 to 57
self._is_array = args[0]._is_array
self._is_scalar_value = args[0]._is_scalar_value

@olavloite olavloite Jul 30, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think that we need to add an assignement for _is_null as well:

Suggested change
self._is_array = args[0]._is_array
self._is_scalar_value = args[0]._is_scalar_value
self._is_null = args[0]._is_null
self._is_array = args[0]._is_array
self._is_scalar_value = args[0]._is_scalar_value

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-spanner/google/cloud/spanner_v1/data_types.py
Comment on lines +87 to +90
def keys(self):
if self._is_array or self._is_scalar_value or self._is_null:
return {}.keys()
return super().keys()

@olavloite olavloite Jul 30, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

For an array, the keys should be equal to the indexes of the array:

Suggested change
def keys(self):
if self._is_array or self._is_scalar_value or self._is_null:
return {}.keys()
return super().keys()
def keys(self):
if self._is_array:
return dict(enumerate(self._array_value)).keys()
if self._is_scalar_value or self._is_null:
return {}.keys()
return super().keys()

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
olavloite
olavloite approved these changes Jul 31, 2026
View reviewed changes
sakthivelmanii added 5 commits July 31, 2026 07:32
@sakthivelmanii
fix(spanner): implement dict protocol and nested unwrapping for JsonO…
8ff800d
…bject

Fixes JsonObject array/scalar/null variants breaking standard Python container protocols (len, bool, iter, getitem, contains, eq).
Adds _unwrap_for_json helper to safely serialize nested JsonObject instances without data erasure.

Fixes #15870
@sakthivelmanii
fix(spanner): implement dict protocol and nested unwrapping for JsonO…
fd07b4b
…bject
@sakthivelmanii
fix(spanner): fix equality symmetry, array tuple normalization, and d…
1c60d6f
…ict methods in JsonObject
@sakthivelmanii
fix(spanner): add reviewer unit tests and fix null rewrapping & array…
a0550d0
… keys() dict invariant
@sakthivelmanii
test(spanner): add targeted unit tests for JsonObject edge cases (98.…
21cc969
…87% coverage)
@sakthivelmanii
sakthivelmanii force-pushed the feat-spanner-jsonobject-helpers branch from b0eca04 to 21cc969 Compare July 31, 2026 07:34
@sakthivelmanii
sakthivelmanii merged commit 06c1f05 into main Jul 31, 2026
43 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@sakthivelmanii
sakthivelmanii deleted the feat-spanner-jsonobject-helpers branch July 31, 2026 08:11
@release-please release-please Bot mentioned this pull request Jul 30, 2026
chore: release main #17832
Merged
sofisl pushed a commit that referenced this pull request Aug 6, 2026
@release-please
chore: release main (#17832)
905bfe3
🤖 I have created a release *beep* *boop*
---


<details><summary>bigquery-magics: 0.15.1</summary>

##
[0.15.1](bigquery-magics-v0.15.0...bigquery-magics-v0.15.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>gapic-generator: 1.38.0</summary>

##
[1.38.0](gapic-generator-v1.37.1...gapic-generator-v1.38.0)
(2026-08-06)


### Features

* **generator:** delegate REST transcoding to google-api-core
([#17766](#17766))
([7b05aab](7b05aab))
* **generator:** gapic generator centralization routing
([#17816](#17816))
([32a2442](32a2442))


### Bug Fixes

* add typing for header_params
([#17914](#17914))
([9e98b93](9e98b93))
* **api-core:** use truthiness check in setup_request_id to support
proto-plus messages
([#18000](#18000))
([ad8f93c](ad8f93c))
* avoid retaining routing parameter instances in cache
([#17961](#17961))
([f64ada2](f64ada2))
* bump aiohttp from 3.13.5 to 3.14.3 in /packages/gapic-generator
([#17990](#17990))
([6ff5815](6ff5815))
* bump cryptography from 48.0.1 to 50.0.0 in /packages/gapic-generator
([#17991](#17991))
([d607f25](d607f25))
* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* **generator:** use flat_ref_types in test templates and delete
remove-unused-imports
([#17900](#17900))
([395f764](395f764))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
* resolve collision with reserved words in samples
([#17912](#17912))
([588cda9](588cda9))
* upgrade Protobuf and gRPC in WORKSPACE
([#17882](#17882))
([5b5ece5](5b5ece5))
</details>

<details><summary>gcp-sphinx-docfx-yaml: 3.3.1</summary>

##
[3.3.1](gcp-sphinx-docfx-yaml-v3.3.0...gcp-sphinx-docfx-yaml-v3.3.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-ads-admanager: 0.10.1</summary>

##
[0.10.1](google-ads-admanager-v0.10.0...google-ads-admanager-v0.10.1)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-api-core: 2.34.0</summary>

##
[2.34.0](google-api-core-v2.33.0...google-api-core-v2.34.0)
(2026-08-06)


### Features

* Add Feature Gating configuration helpers.
([#17524](#17524))
([eceea95](eceea95))
* **api-core:** centralize rest transcoding helpers
([#17765](#17765))
([4f21b8b](4f21b8b))


### Bug Fixes

* **api-core:** use truthiness check in setup_request_id to support
proto-plus messages
([#18000](#18000))
([ad8f93c](ad8f93c))
* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* deduplicate x-goog-api-client headers
([#17616](#17616))
([6167e41](6167e41))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-apps-chat: 0.10.4</summary>

##
[0.10.4](google-apps-chat-v0.10.3...google-apps-chat-v0.10.4)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-auth: 2.56.3</summary>

##
[2.56.3](google-auth-v2.56.2...google-auth-v2.56.3)
(2026-08-06)


### Bug Fixes

* **auth:** avoid creating mTLS SSL context for custom async transports
([#17825](#17825))
([fbe33f9](fbe33f9)),
refs
[#17622](#17622)
* **auth:** only trigger mTLS certificate rotation on mTLS endpoints
([#17928](#17928))
([f7b49ea](f7b49ea))
* **auth:** properly extract stdout from gnubby webauthn plugin failures
([#17885](#17885))
([744e826](744e826))
* deduplicate x-goog-api-client headers
([#17616](#17616))
([6167e41](6167e41))
* **oauth2:** avoid redundant JWKS network fetches
([#17891](#17891))
([de53298](de53298))


### Performance Improvements

* **auth:** use generator expression in any() to allow short-circuiting
([735e565](735e565))
* **auth:** use generator expression in any() to allow short-circuiting
([#17937](#17937))
([735e565](735e565))
</details>

<details><summary>google-auth-httplib2: 0.4.1</summary>

##
[0.4.1](google-auth-httplib2-v0.4.0...google-auth-httplib2-v0.4.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-access-context-manager: 0.6.1</summary>

##
[0.6.1](google-cloud-access-context-manager-v0.6.0...google-cloud-access-context-manager-v0.6.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-agentidentitycredentials: 0.1.1</summary>

##
[0.1.1](google-cloud-agentidentitycredentials-v0.1.0...google-cloud-agentidentitycredentials-v0.1.1)
(2026-08-06)


### Features

* **google/cloud/agentidentitycredentials/v1beta:** add
google-cloud-agentidentitycredentials v1beta
([#17898](#17898))
([b692dae](b692dae))
* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-audit-log: 0.6.1</summary>

##
[0.6.1](google-cloud-audit-log-v0.6.0...google-cloud-audit-log-v0.6.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-backupdr: 0.10.1</summary>

##
[0.10.1](google-cloud-backupdr-v0.10.0...google-cloud-backupdr-v0.10.1)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-batch: 0.22.2</summary>

##
[0.22.2](google-cloud-batch-v0.22.1...google-cloud-batch-v0.22.2)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-biglake: 0.5.1</summary>

##
[0.5.1](google-cloud-biglake-v0.5.0...google-cloud-biglake-v0.5.1)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-biglake-hive: 0.3.2</summary>

##
[0.3.2](google-cloud-biglake-hive-v0.3.1...google-cloud-biglake-hive-v0.3.2)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-bigquery: 3.43.0</summary>

##
[3.43.0](google-cloud-bigquery-v3.42.3...google-cloud-bigquery-v3.43.0)
(2026-08-06)


### Features

* add pandas-gbq capability helper
([#17957](#17957))
([2207ca6](2207ca6))


### Bug Fixes

* **bigquery:** Fix bigquery socket leak
([#17953](#17953))
([8c26b38](8c26b38))
* remove stray debug print in RangeQueryParameter constructor
([#17973](#17973))
([fe7bfd0](fe7bfd0))


### Documentation

* add connector libraries overview table to package README
([#17939](#17939))
([71bc622](71bc622))
* correct return type in CellDataParser.time_to_py docstring
([#17972](#17972))
([bd1e224](bd1e224))
</details>

<details><summary>google-cloud-bigquery-storage: 2.40.0</summary>

##
[2.40.0](google-cloud-bigquery-storage-v2.39.0...google-cloud-bigquery-storage-v2.40.0)
(2026-08-06)


### Features

* delegate ReadRowsPage.to_arrow to pandas_gbq.arrow
([#17938](#17938))
([aedc66f](aedc66f))


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
</details>

<details><summary>google-cloud-binary-authorization: 1.19.1</summary>

##
[1.19.1](google-cloud-binary-authorization-v1.19.0...google-cloud-binary-authorization-v1.19.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-build: 3.38.1</summary>

##
[3.38.1](google-cloud-build-v3.38.0...google-cloud-build-v3.38.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-commerceproducer: 0.1.1</summary>

##
[0.1.1](google-cloud-commerceproducer-v0.1.0...google-cloud-commerceproducer-v0.1.1)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-containeranalysis: 2.22.1</summary>

##
[2.22.1](google-cloud-containeranalysis-v2.22.0...google-cloud-containeranalysis-v2.22.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-core: 2.6.1</summary>

##
[2.6.1](google-cloud-core-v2.6.0...google-cloud-core-v2.6.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-documentai-toolbox: 0.17.2</summary>

##
[0.17.2](google-cloud-documentai-toolbox-v0.17.1...google-cloud-documentai-toolbox-v0.17.2)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-filestore: 1.17.1</summary>

##
[1.17.1](google-cloud-filestore-v1.17.0...google-cloud-filestore-v1.17.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-firestore: 2.28.1</summary>

##
[2.28.1](google-cloud-firestore-v2.28.0...google-cloud-firestore-v2.28.1)
(2026-08-06)


### Bug Fixes

* **firestore:** BulkWriter pop from an empty deque
([#17490](#17490))
([8e826f0](8e826f0))
* **firestore:** preserve async limit_to_last ordering
([#17879](#17879))
([caf2fdb](caf2fdb))
</details>

<details><summary>google-cloud-gke-hub: 1.25.1</summary>

##
[1.25.1](google-cloud-gke-hub-v1.25.0...google-cloud-gke-hub-v1.25.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-iam: 2.24.1</summary>

##
[2.24.1](google-cloud-iam-v2.24.0...google-cloud-iam-v2.24.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-logging: 3.16.2</summary>

##
[3.16.2](google-cloud-logging-v3.16.1...google-cloud-logging-v3.16.2)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-memorystore: 0.5.4</summary>

##
[0.5.4](google-cloud-memorystore-v0.5.3...google-cloud-memorystore-v0.5.4)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-ndb: 2.5.1</summary>

##
[2.5.1](google-cloud-ndb-v2.5.0...google-cloud-ndb-v2.5.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-network-connectivity: 2.17.0</summary>

##
[2.17.0](google-cloud-network-connectivity-v2.16.0...google-cloud-network-connectivity-v2.17.0)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-network-services: 0.10.2</summary>

##
[0.10.2](google-cloud-network-services-v0.10.1...google-cloud-network-services-v0.10.2)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
* update googleapis and regenerate
([#17933](#17933))
([f7a23a0](f7a23a0))
</details>

<details><summary>google-cloud-pubsub: 2.39.1</summary>

##
[2.39.1](google-cloud-pubsub-v2.39.0...google-cloud-pubsub-v2.39.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
</details>

<details><summary>google-cloud-quotas: 0.6.2</summary>

##
[0.6.2](google-cloud-quotas-v0.6.1...google-cloud-quotas-v0.6.2)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-redis-cluster: 0.5.2</summary>

##
[0.5.2](google-cloud-redis-cluster-v0.5.1...google-cloud-redis-cluster-v0.5.2)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-service-control: 1.21.0</summary>

##
[1.21.0](google-cloud-service-control-v1.20.0...google-cloud-service-control-v1.21.0)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-spanner: 3.69.1</summary>

##
[3.69.1](google-cloud-spanner-v3.69.0...google-cloud-spanner-v3.69.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* **metrics:** fix GFE and AFE metrics publishing
([#17561](#17561))
([abf1178](abf1178))
* **spanner:** escape embedded backticks in dbapi escape_name
([#17810](#17810))
([c8b0b28](c8b0b28))
* **spanner:** implement dict protocol and nested unwrapping for
JsonObject
([#17915](#17915))
([06c1f05](06c1f05)),
refs
[#15870](#15870)
</details>

<details><summary>google-cloud-storage: 3.13.1</summary>

##
[3.13.1](google-cloud-storage-v3.13.0...google-cloud-storage-v3.13.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-cloud-storage-control: 1.13.0</summary>

##
[1.13.0](google-cloud-storage-control-v1.12.0...google-cloud-storage-control-v1.13.0)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-support: 0.5.2</summary>

##
[0.5.2](google-cloud-support-v0.5.1...google-cloud-support-v0.5.2)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17933](#17933))
([f7a23a0](f7a23a0))
</details>

<details><summary>google-cloud-tasks: 2.24.0</summary>

##
[2.24.0](google-cloud-tasks-v2.23.0...google-cloud-tasks-v2.24.0)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-cloud-testutils: 1.9.2</summary>

##
[1.9.2](google-cloud-testutils-v1.9.1...google-cloud-testutils-v1.9.2)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>google-developer-knowledge: 0.1.1</summary>

##
[0.1.1](google-developer-knowledge-v0.1.0...google-developer-knowledge-v0.1.1)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-maps-navconnect: 0.2.1</summary>

##
[0.2.1](google-maps-navconnect-v0.2.0...google-maps-navconnect-v0.2.1)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17893](#17893))
([e70ab6f](e70ab6f))
</details>

<details><summary>google-resumable-media: 2.10.1</summary>

##
[2.10.1](google-resumable-media-v2.10.0...google-resumable-media-v2.10.1)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>googleapis-common-protos: 1.75.1</summary>

##
[1.75.1](googleapis-common-protos-v1.75.0...googleapis-common-protos-v1.75.1)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>grafeas: 1.24.0</summary>

##
[1.24.0](grafeas-v1.23.0...grafeas-v1.24.0)
(2026-08-06)


### Features

* update googleapis and regenerate
([#17933](#17933))
([f7a23a0](f7a23a0))
</details>

<details><summary>grpc-google-iam-v1: 0.14.5</summary>

##
[0.14.5](grpc-google-iam-v1-v0.14.4...grpc-google-iam-v1-v0.14.5)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>proto-plus: 1.28.3</summary>

##
[1.28.3](proto-plus-v1.28.2...proto-plus-v1.28.3)
(2026-08-06)


### Bug Fixes

* bump grpcio to 1.59.0; require Python 3.10+
([#17351](#17351))
([a53487a](a53487a))
* **proto-plus:** add context to TypeErrors during message manipulation
([#17682](#17682))
([08f21a6](08f21a6))
* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

<details><summary>sqlalchemy-bigquery: 1.17.2</summary>

##
[1.17.2](sqlalchemy-bigquery-v1.17.1...sqlalchemy-bigquery-v1.17.2)
(2026-08-06)


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@olavloite olavloite olavloite approved these changes
+1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@olavloite olavloite

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

JsonObject array/scalar variants break standard dict protocol (len, bool, iteration)

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@sakthivelmanii @olavloite
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.