-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
bugThis issue is a confirmed bug.This issue is a confirmed bug.investigatingThis issue is being investigated and/or work is in progress to resolve the issue.This issue is being investigated and/or work is in progress to resolve the issue.p3This is a minor priority issueThis is a minor priority issueresources
Description
Describe the bug
Calling limit(0) on a ResourceCollection yields one item instead of none.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
[]
Current Behavior
['first']
Reproduction Steps
from boto3.resources.collection import ResourceCollection
class DummyCollection(ResourceCollection):
def __init__(self, limit):
self._params = {"limit": limit}
def pages(self):
yield ["first", "second"]
items = list(DummyCollection(0))
print(items)Possible Solution
No response
Additional Information/Context
Note: This issue was identified by an automated testing tool for academic research and manually checked. If you have any concerns about this type of reporting, please let me know, and I will adjust my workflow accordingly. Thanks.
SDK version used
1.40.64
Environment details (OS name and version, etc.)
Linux | Python3.12
Metadata
Metadata
Assignees
Labels
bugThis issue is a confirmed bug.This issue is a confirmed bug.investigatingThis issue is being investigated and/or work is in progress to resolve the issue.This issue is being investigated and/or work is in progress to resolve the issue.p3This is a minor priority issueThis is a minor priority issueresources