Skip to content
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

Rename deprecated pystac_client methods to get STAC items and collections #175

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

weiji14
Copy link
Contributor

@weiji14 weiji14 commented Oct 4, 2024

These methods were deprecated since stac-utils/pystac-client#206 in pystac_client v0.4.0 (released Jun 2022):

  • get_items() -> items()
  • get_all_items() -> item_collection()
  • get_all_items_as_dict() -> item_collection_as_dict()

This helps to silence the following warnings:

/srv/conda/envs/notebook/lib/python3.10/site-packages/pystac_client/item_search.py:834: FutureWarning: get_items() is deprecated, use items() instead
  warnings.warn(

/srv/conda/envs/notebook/lib/python3.10/site-packages/pystac_client/item_search.py:849: FutureWarning: get_all_items() is deprecated, use item_collection() instead.
  warnings.warn(

/srv/conda/envs/notebook/lib/python3.10/site-packages/pystac_client/item_search.py:864: FutureWarning: get_all_items_as_dict() is deprecated, use item_collection_as_dict() instead.
  warnings.warn(

.

@weiji14 weiji14 marked this pull request as ready for review October 4, 2024 02:45
@Kirill888
Copy link
Member

Thanks for that @weiji14 do you mind checking if these bounds are still valid after the change?

pystac>=1.0.0,<2

@weiji14
Copy link
Contributor Author

weiji14 commented Oct 7, 2024

The requirement on pystac>=1.0.0,<2 isn't directly related to the changes here (which are on pystac-client).

That said, using pystac>=1.0.0 means supporting STAC 1.0.x, and pystac-client=0.4.0 where this API change was introduced supports pystac>=1.4.0 according to https://github.com/stac-utils/pystac-client/blob/v0.4.0/setup.py#L36, so I think it should be fine.

@Kirill888 Kirill888 merged commit 7a4f00d into opendatacube:develop Oct 7, 2024
10 of 13 checks passed
@weiji14 weiji14 deleted the rename_deprecated_get_items branch October 7, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants