Defaulting to None yields a bad default user experience: if you provide too open-ended a query (e.g. "testing" or "quantum," examples I use in the docs) and try dumping into list(...) rather than using a generator, max_results=None with the default page_size will appear to hang.
In practice, one should only set max_results=None in a loop that processes results incrementally or in a long-running process or with a query where the result set is known to be small.
Breaking changes
List any changes that break the API usage supported on master.
Changes default Search behavior.
This is arguably a breaking change, but I think it may be appropriate to bundle it into a minor-version release: the existing default behavior is pathological besides on small result sets.
Description
Defaulting to None yields a bad default user experience: if you provide too open-ended a query (e.g. "testing" or "quantum," examples I use in the docs) and try dumping into
list(...)
rather than using a generator,max_results=None
with the defaultpage_size
will appear to hang.In practice, one should only set
max_results=None
in a loop that processes results incrementally or in a long-running process or with a query where the result set is known to be small.Breaking changes
Changes default
Search
behavior.This is arguably a breaking change, but I think it may be appropriate to bundle it into a minor-version release: the existing default behavior is pathological besides on small result sets.
Relevant issues
Checklist
README.md
example usage has been updated.