| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
NOTE: There is a current mismatch between incrementing Iterator.num_results in Iterator.__iter__ vs. incrementing it in Iterator.pages (there it won't be incremented, so this will need to be addressed in a subsequent commit).
Also moving __iter__ functionality into a helper so that the "started?" check could be done **before** entering the generator. This is because the "self.pages" generator wouldn't be entered until an item was consumed off the items iterator.
There was a problem hiding this comment.
Big improvement in the API surface for iterators.
Sorry, something went wrong.
There was a problem hiding this comment.
Nice.
Sorry, something went wrong.
|
|
||
| :rtype: :class:`Iterator` | ||
| :returns: Current instance. | ||
| :rtype: :class:`~types.GeneratorType` |
Broken by simultaneous merges of googleapis#2594 and googleapis#2485.
Implement Iterator.pages and simplify items iteration
Broken by simultaneous merges of googleapis#2594 and googleapis#2485.
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.0.0-20260331223231-14b1b9186e21 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e <details><summary>gapic-generator: v1.30.14</summary> ## [v1.30.14](gapic-generator-v1.30.13...gapic-generator-v1.30.14) (2026-04-02) ### Bug Fixes * Use proper SPDX license identifier (#2594) ([2b3b06c](2b3b06c2)) * async samples missing await (#2577) ([6ccd371](6ccd3710)) </details> <details><summary>gcp-sphinx-docfx-yaml: v3.2.5</summary> ## [v3.2.5](gcp-sphinx-docfx-yaml-v3.2.4...gcp-sphinx-docfx-yaml-v3.2.5) (2026-04-02) ### Bug Fixes * do not store reference to algorithms dict on PyJWK (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/1143">#1143</a>)</li> <li><a href="jpadilla/pyjwt@f3ba74c106df9ce10e272dfaad96acb4ab3ef5a5"><code>f3ba74c</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/1145">#1145</a>)</li> <li><a href="jpadilla/pyjwt@0318ffa7b156b01600376e38952bf961382e0724"><code>0318ffa</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/1141">#1141</a>)</li> <li><a href="jpadilla/pyjwt@a52753db3c1075ac01337fa8b7cc92b13a19ac09"><code>a52753d</code></a> Bump actions/download-artifact from 7 to 8 (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/1142">#1142</a>)</li> <li><a href="jpadilla/pyjwt@b85050f1d444c6828bb4618ee764443b0a3f5d18"><code>b85050f</code></a> ([b2950d5](b2950d55)) * close HTTPError to prevent ResourceWarning on Python 3.14 (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/1133">#1133</a>)</li> <li>Additional commits viewable in <a href="jpadilla/pyjwt@2.4.0...2.12.0">compare view</a></li> </ul> </details> <br /> ([b2950d5](b2950d55)) </details> <details><summary>google-ads-datamanager: v0.8.0</summary> ## [v0.8.0](google-ads-datamanager-v0.7.0...google-ads-datamanager-v0.8.0) (2026-04-02) ### Features * add INVALID_MERCHANT_ID to the ErrorReason enum for when the merchant_id field is not valid (PiperOrigin-RevId: 889816734) ([c36aa61](c36aa616)) * add EU_POLITICAL_ADVERTISING_DECLARATION_REQUIRED to the ErrorReason enum for campaigns missing the EU political advertising declaration (PiperOrigin-RevId: 889816734) ([c36aa61](c36aa616)) </details> <details><summary>google-api-core: v2.30.2</summary> ## [v2.30.2](google-api-core-v2.30.1...google-api-core-v2.30.2) (2026-04-02) ### Bug Fixes * allow Protobuf 7.x (#16532) ([ffb4b71](ffb4b712)) </details> <details><summary>google-cloud-bigtable: v2.36.0</summary> ## [v2.36.0](google-cloud-bigtable-v2.35.0...google-cloud-bigtable-v2.36.0) (2026-04-02) ### Features * add TieredStorageConfig to table admin api (PiperOrigin-RevId: 863493708) ([778ae57](778ae571)) * add data model for client side metrics (#1187) ([db8d528](db8d5286)) ### Bug Fixes * allow empty location for cluster update (#1258) ([c163cb3](c163cb3e)) </details> <details><summary>google-cloud-ces: v0.4.0</summary> ## [v0.4.0](google-cloud-ces-v0.3.0...google-cloud-ces-v0.4.0) (2026-04-02) ### Features * deprecate `root_agent` in message `.google.cloud.ces.v1beta.AgentTool` in favor of new `agent` field. (PiperOrigin-RevId: 892390364) ([c36aa61](c36aa616)) * update public libraries for CES v1beta (PiperOrigin-RevId: 892390364) ([c36aa61](c36aa616)) * add support for generating app resources with LLM (PiperOrigin-RevId: 892390364) ([c36aa61](c36aa616)) ### Documentation * A comment for field `root_agent` in message `.google.cloud.ces.v1beta.AgentTool` is changed (PiperOrigin-RevId: 892390364) ([c36aa61](c36aa616)) </details> <details><summary>google-cloud-dataflow-client: v0.13.0</summary> ## [v0.13.0](google-cloud-dataflow-client-v0.12.0...google-cloud-dataflow-client-v0.13.0) (2026-04-02) ### Features * add sha256 field to Package proto (PiperOrigin-RevId: 891887357) ([c36aa61](c36aa616)) * Add Pausing/Yaml capabilities to public protos (PiperOrigin-RevId: 891736643) ([c36aa61](c36aa616)) </details> <details><summary>google-cloud-documentai: v3.14.0</summary> ## [v3.14.0](google-cloud-documentai-v3.13.0...google-cloud-documentai-v3.14.0) (2026-04-02) ### Features * Added a fields for image and table annotation output (PiperOrigin-RevId: 893028748) ([c36aa61](c36aa616)) * Update comments for proto fields (PiperOrigin-RevId: 893028748) ([c36aa61](c36aa616)) </details> <details><summary>google-cloud-ndb: v2.4.2</summary> ## [v2.4.2](google-cloud-ndb-v2.4.1...google-cloud-ndb-v2.4.2) (2026-04-02) ### Bug Fixes * allow redis 7.x (#16533) ([4c541cf](4c541cf2)) </details> <details><summary>google-cloud-netapp: v0.9.0</summary> ## [v0.9.0](google-cloud-netapp-v0.8.0...google-cloud-netapp-v0.9.0) (2026-04-02) ### Features * Add ONTAP passthrough APIs Adds the following new methods for direct ONTAP API interaction: - ExecuteOntapPost - ExecuteOntapGet - ExecuteOntapDelete - ExecuteOntapPatch `StoragePoolType` (PiperOrigin-RevId: 889585893) ([c36aa61](c36aa616)) ### Bug Fixes * An existing value `UNIFIED_LARGE_CAPACITY` is removed from enum `StoragePoolType` (PiperOrigin-RevId: 889585893) ([c36aa61](c36aa616)) ### Documentation * A comment for field `source_volume` in message `.google.cloud.netapp.v1.Backup` is changed (PiperOrigin-RevId: 889585893) ([c36aa61](c36aa616)) * A comment for field `source_backup` in message `.google.cloud.netapp.v1.RestoreParameters` is changed (PiperOrigin-RevId: 889585893) ([c36aa61](c36aa616)) * A comment for field `type` in message `.google.cloud.netapp.v1.StoragePool` is changed (PiperOrigin-RevId: 889585893) ([c36aa61](c36aa616)) </details> <details><summary>google-cloud-network-security: v0.13.0</summary> ## [v0.13.0](google-cloud-network-security-v0.12.0...google-cloud-network-security-v0.13.0) (2026-04-02) ### Features * Publish proto definitions for AuthzPolicy, TlsInspectionPolicy, GatewaySecurityPolicy, GatewaySecurityPolicyRule, and UrlList (PiperOrigin-RevId: 889789965) ([c36aa61](c36aa616)) * Publish proto definitions for SSG (PiperOrigin-RevId: 889789965) ([c36aa61](c36aa616)) * Publish proto definitions for Intercept, Mirroring and SecurityProfileGroup (PiperOrigin-RevId: 889789965) ([c36aa61](c36aa616)) ### Documentation * Update and cleanup docs (PiperOrigin-RevId: 889789965) ([c36aa61](c36aa616)) </details> <details><summary>google-cloud-securesourcemanager: v0.5.0</summary> ## [v0.5.0](google-cloud-securesourcemanager-v0.4.0...google-cloud-securesourcemanager-v0.5.0) (2026-04-02) ### Features * Add option to require code owner approval in branch rules (PiperOrigin-RevId: 889991858) ([c36aa61](c36aa616)) * Add force option to DeleteInstance request (PiperOrigin-RevId: 889991858) ([c36aa61](c36aa616)) * Add CustomHostConfig to configure custom hostnames for private instances (PiperOrigin-RevId: 889991858) ([c36aa61](c36aa616)) ### Documentation * Improve documentation for labels, pagination, and ListLocations (PiperOrigin-RevId: 889991858) ([c36aa61](c36aa616)) </details> <details><summary>google-cloud-texttospeech: v2.36.0</summary> ## [v2.36.0](google-cloud-texttospeech-v2.35.0...google-cloud-texttospeech-v2.36.0) (2026-04-02) ### Features * Mark `advanced_voice_options` as optional. (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) * Support safety settings for Gemini voices and deprecate `relax_safety_filters` (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) * Support `enable_textnorm` for Gemini voices. (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) ### Documentation * A comment for field `markup` in message `.google.cloud.texttospeech.v1beta1.StreamingSynthesisInput` is changed (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) * A comment for field `advanced_voice_options` in message `.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest` is changed (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) * A comment for field `markup` in message `.google.cloud.texttospeech.v1beta1.SynthesisInput` is changed (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) * A comment for field `relax_safety_filters` in message `.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions` is changed (PiperOrigin-RevId: 892462011) ([c36aa61](c36aa616)) </details> <details><summary>google-maps-geocode: v0.2.0</summary> ## [v0.2.0](google-maps-geocode-v0.1.0...google-maps-geocode-v0.2.0) (2026-04-02) ### Features * make the Place ID format consistent (PiperOrigin-RevId: 890102125) ([c36aa61](c36aa616)) ### Documentation * update the navigation point usage enum documentation (PiperOrigin-RevId: 890102125) ([c36aa61](c36aa616)) </details> <details><summary>googleapis-common-protos: v1.74.0</summary> ## [v1.74.0](googleapis-common-protos-v1.73.1...googleapis-common-protos-v1.74.0) (2026-04-02) ### Features * publish new error reasons (PiperOrigin-RevId: 889289393) ([c36aa61](c36aa616)) * add origin to AttributeContext.Request (PiperOrigin-RevId: 892442206) ([c36aa61](c36aa616)) * publish client batch config schema (PiperOrigin-RevId: 889289393) ([c36aa61](c36aa616)) ### Documentation * update API common type documentation (PiperOrigin-RevId: 890591600) ([c36aa61](c36aa616)) * fix documentation formatting (PiperOrigin-RevId: 889289393) ([c36aa61](c36aa616)) * update various comments (PiperOrigin-RevId: 889289393) ([c36aa61](c36aa616)) * update SelectiveGapicGeneration usage doc (PiperOrigin-RevId: 892649773) ([c36aa61](c36aa616)) * update license year (PiperOrigin-RevId: 889289393) ([c36aa61](c36aa616)) </details>
| Back | FazBrowse Home | New Git URL |
Fixes #2548. As mentioned in #2529, this came from trying to design for the case that a page of responses came from GAX instead of from an HTTP response.
I have left alone Iterator.next_page_token and Iterator.page_number for now but think the token should be moved to the Page and the page number should just be removed (people can just use enumerate(iterator.pages) if they want the page number).
NOTE: Has #2592 as diffbase.