Stop listing if recursion limit is hit#234
Stop listing if recursion limit is hit#234gpocentek merged 9 commits intopython-gitlab:masterfrom johanbrandhorst:patch-1
Conversation
|
Thank you for working on this, hitting the server limits is an annoying problem. With your patch using |
|
Good point on incomplete results, I agree this should change to keep current behaviour. This patch does not concern itself with rate limiting though, just the python built-in recursion limit. I can add an option to return as many as possible (and capture the recursion limit exception), while maintaining the same behaviour for |
|
Oh right, I was focused on the API rate limit! Adding the option would be great, thanks :) |
This new parameter works just like "all", except it will attempt to catch any recursion limit exceptions thrown. These errors could be countered if a large amount of values were being listed recursively.
| or not issubclass(parent_cls, GitlabObject) | ||
| or parent_cls == CurrentUser): | ||
| or not issubclass(parent_cls, GitlabObject) | ||
| or parent_cls == CurrentUser): |
There was a problem hiding this comment.
My autopep8 linter did this, should I revert it?
There was a problem hiding this comment.
No need to revert, that's fine.
|
This looks good to me, thank you for adding unit tests! Could you have a look at the travis job failures? Thanks :) |
|
Should fix the python2 errors |
|
I fixed the pep8 issues, thank you for this patch! |
Fixes #217