You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The max_results parameter of list_blobs() is documented as controlling the maximum number of blobs returned in each page of results, but actually limits the total number of results as the name implies.
max_results (int) – The maximum number of blobs in each page of results from this request. Non-positive values are ignored. Defaults to a sensible value set by the API.
Change the documentation to match what the parameter actually does. If supplying a paging size is required, a new argument to HTTPIterator could be added and exposed up through the list_blobs() interface.
The
max_resultsparameter oflist_blobs()is documented as controlling the maximum number of blobs returned in each page of results, but actually limits the total number of results as the name implies.Compare the
Bucket.list_blobs()documentation:https://googleapis.dev/python/storage/latest/buckets.html#google.cloud.storage.bucket.Bucket.list_blobs
With the
Iteratordocumentation:https://googleapis.dev/python/google-api-core/latest/page_iterator.html#google.api_core.page_iterator.Iterator
Also the implementation of
HTTPIteratorwhich is used bylist_blobs()internally does treatmax_resultsas a hard limit for totalnum_results:https://github.com/googleapis/google-cloud-python/blob/master/api_core/google/api_core/page_iterator.py#L378
Code example
Suggested resolution
Change the documentation to match what the parameter actually does. If supplying a paging size is required, a new argument to
HTTPIteratorcould be added and exposed up through thelist_blobs()interface.