-
Notifications
You must be signed in to change notification settings - Fork 675
Stop listing if recursion limit is hit #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My autopep8
linter did this, should I revert it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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