File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
1212- Fix usage documentation of ` ItemSearch `
1313- Fix fields argument to CLI ([ #797 ] ( https://github.com/stac-utils/pystac-client/pull/797 ) )
14+ - Clarify recursive behaviour of the ` get_items ` method in the method docstring ([ #800 ] ( https://github.com/stac-utils/pystac-client/pull/800 ) )
1415
1516## [ v0.8.6] - 2025-02-11
1617
Original file line number Diff line number Diff line change 3636)
3737from pystac_client .mixins import QUERYABLES_ENDPOINT , QueryablesMixin
3838from pystac_client .stac_api_io import StacApiIO , Timeout
39- from pystac_client .warnings import DoesNotConformTo , FallbackToPystac , NoConformsTo
39+ from pystac_client .warnings import (
40+ DoesNotConformTo ,
41+ FallbackToPystac ,
42+ NoConformsTo ,
43+ PystacClientWarning ,
44+ )
4045
4146if TYPE_CHECKING :
4247 from pystac .item import Item as Item_Type
@@ -450,13 +455,20 @@ def get_items(
450455
451456 Args:
452457 ids: Zero or more item ids to find.
453- recursive: unused in pystac-client, but needed for falling back to pystac
454-
458+ recursive: If this client conforms to the ITEM_SEARCH conformance class,
459+ this is unused and this will always yield items recursively.
460+ Otherwise, this will only return items recursively if True or None.
455461 Return:
456462 Iterator[Item]: Iterator of items whose parent is this
457463 catalog.
458464 """
459465 if self .conforms_to (ConformanceClasses .ITEM_SEARCH ):
466+ if recursive is False :
467+ warnings .warn (
468+ "Getting items recursively using the /search endpoint "
469+ "(the recursive argument is being ignored)." ,
470+ PystacClientWarning ,
471+ )
460472 search = self .search (ids = ids )
461473 yield from search .items ()
462474 else :
You can’t perform that action at this time.
0 commit comments