- Notifications
You must be signed in to change notification settings - Fork673
Generator packages.list(iterator=True) fails to paginate when deleting packages#2271
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Description of the problem, including code/CLI snippetGenerator for a project packages list does not return the complete list of packages when iterating through them with deletion. Steps to reproduce:
Notes:
Expected BehaviorOutput:
Actual BehaviorOutput:
Specifications
|
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 3 comments
-
In this specific case, I'm not sure I'd recommend using the iterator as the number of items changes while iterating over them, so pagination might not return items properly - a bit like trying to delete dict items while looping over it sometimes isn't safe. Maybe we can look at the docs again though, thanks for the report! |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
Yes, that's what I thought. I think, though, it'd be useful to note such a case in the docs. Thanks for the reply! |
BetaWas this translation helpful?Give feedback.
All reactions
-
For this case would probably want to use |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
This discussion was converted from issue #2268 on September 09, 2022 20:32.