Skip to content

Compatibility with pystac 1.8 #562

@TomAugspurger

Description

@TomAugspurger

CI is currently failing with a mypy check

mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

pystac_client/collection_client.py:117: error: Signature of "get_items" incompatible with supertype "Catalog"  [override]
pystac_client/collection_client.py:117: note:      Superclass:
pystac_client/collection_client.py:117: note:          def get_items(self, *ids: str, recursive: bool = ...) -> Iterator[Item]
pystac_client/collection_client.py:117: note:      Subclass:
pystac_client/collection_client.py:117: note:          def get_items(self) -> Iterator[Item]
pystac_client/client.py:4[42](https://github.com/stac-utils/pystac-client/actions/runs/5570293343/jobs/10174236182?pr=561#step:5:43): error: Signature of "get_items" incompatible with supertype "Catalog"  [override]
pystac_client/client.py:[44](https://github.com/stac-utils/pystac-client/actions/runs/5570293343/jobs/10174236182?pr=561#step:5:45)2: note:      Superclass:
pystac_client/client.py:442: note:          def get_items(self, *ids: str, recursive: bool = ...) -> Iterator[Item]
pystac_client/client.py:442: note:      Subclass:
pystac_client/client.py:442: note:          def get_items(self) -> Iterator[Item]
Found 2 errors in 2 files (checked 21 source files)

@gadomski do you have a preference on how many hurdles to jump through to support this? With some effort, we could support older versions of pystac (using a mix of *args, **kwargs, and runtime version checks). Or we could just bump the required version of pystac.

My preference is to just bump the required version of pystac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions