Repository navigation
docs(genai-util): fix the docstring that breaks the docs build - #295
Open
pylaterreur wants to merge 2 commits into
Open
pylaterreur wants to merge 2 commits into
pylaterreur wants to merge 2 commits into
Conversation
alibaba#294 added extended_types to the API docs. Napoleon reads the first line of an attribute docstring written as "Name: text" as "type: description", so the "Streaming:" prefix of InvokeAgentInvocation.monotonic_first_token_s became a py:class reference to "Streaming". Nitpicky mode reports it and -W makes it an error, so the docs job fails on every pull request since alibaba#294. Reword the docstring. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
Contributor
Author
|
@sipercai @ralf0131 this fixes the 🤖 Generated with Claude Code |
This was referenced Oct 29, 2026
ralf0131
approved these changes
Oct 30, 2026
google-genai 2.34.0 (2026-10-29) adds automatic continuation to interactions.create. The public create now merges the hops it sends, even a single one, into a copy of the interaction made with model_copy(update=...), for the interaction and for its usage. The tests return MagicMock interactions from the generated create, and MagicMock().model_copy() is a new mock without the configured fields, so test_instrumentation_does_not_break_core_functionality got a mock id. The instrumentation is unaffected: it wraps the generated create and reads each hop's response, as before. With real objects over a mocked HTTP API, a single-hop interaction gives the same object and span on 2.33.0 and 2.34.0, and an interaction continued over two hops gives one span per request. Mock the interaction and its usage as pydantic-like models whose model_copy keeps their fields. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
Contributor
Author
|
Thanks for the approval. Each of #295 and #296 failed on the other's problem (docs here, google-genai there), so neither could go green alone. I added #296's commit here and this PR's commit to #296 (same content). Merging either one makes the other's duplicate commit empty, so either order works. 🤖 Generated with Claude Code |
4 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Since #294, the
docsjob fails on every pull request.sphinx-build -Wstops ondocstring of opentelemetry.util.genai.extended_types.InvokeAgentInvocation.monotonic_first_token_s:3: py:class reference target not found: Streaming. It failed on #294 itself as well. The job only runs on pull requests, somainshows green.#294 added
extended_typesto the API docs. Napoleon reads the first line of an attribute docstring written asName: textastype: description, so theStreaming:prefix became a reference to aStreamingclass, which nitpicky mode reports. This PR rewords the docstring.Type of change
How Has This Been Tested?
Full docs build,
sphinx-build -E -a -W --keep-going -b html -T . _build/html, with the docs env's packages on GitHub CPython 3.11:main: 2 warnings, theStreamingone andNo module named 'MySQLdb';MySQLdbone.The
MySQLdbwarning is local: mysqlclient can't be built without the MySQL client headers, which my machine lacks and CI has.tox -e precommitpasses.Does This PR Require a Core Repo Change?
Checklist:
🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN