Repository navigation
Enable use of page_size for clients - #408
Conversation
There was a problem hiding this comment.
Since the Paginator name is clobbered by the renaming of DeprecatedPaginator, I had to rename the paginator that we will eventually be using. I considered switching everything over to the paginator will be using in the future. However the CLI relies on the deprecated paginators, so I was hesitant to make the switch.
There was a problem hiding this comment.
Might be nice to add this as a comment in the test so we don't forget why this was done.
|
On a completely separate note, I'm finding it jarring that we use CamelCased and snake_cased params for pagination. I'm thinking for the client we should be consistent and use the CamelCased params for the pagination values as well. Thoughts? cc @danielgtaylor |
|
LGTM 🚢-it. CamelCased or snake_cased are both fine for me. It seems possible that some service in the future might not use CamelCasing for its args, and then we'll have the opposite problem we do today. If we want to go with CamelCasing for now then that's fine since (all?) services use CamelCased params. |
|
I don't think a service will ever use snake_casing. |
|
+1 CamelCase since we are moving away from service and operation objects, which accept snake_case. |
|
I added a todo comment to help us later on when we switched the test to use the non deprecated paginator. Merging. |
Enable use of page_size for clients
So the reason I made this pull request is because, you cannot paginate using a page size with clients. This is what the error you get before my PR:
This also probably affects boto3 since it uses clients to paginate as well.
The fix was to retrieve the
limit_keyfrom the pagination config instead of relying on an Operation object for thelimit_key, which the clients had no access to.cc @jamesls @danielgtaylor