Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
# - "3.11-dev"
- "3.11"
os:
- ubuntu-latest
# - windows-latest
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- Python 3.11 support [#347](https://github.com/stac-utils/pystac-client/pull/347)

### Changed

### Fixed

### Removed

- Python 3.7 support [#347](https://github.com/stac-utils/pystac-client/pull/347)

### Deprecated

## [v0.5.1] - 2022-09-19
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Installation

$ pip install pystac-client

``pystac_client`` requires `Python >=3.7 <https://www.python.org/>`__.
``pystac_client`` requires `Python >=3.8 <https://www.python.org/>`__.

This will install the dependencies :doc:`PySTAC <pystac:index>`,
:doc:`python-dateutil <dateutil:index>`, and :doc:`requests <requests:index>`.
Expand Down
14 changes: 8 additions & 6 deletions pystac_client/item_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Iterator,
List,
Optional,
Protocol,
Tuple,
Union,
)
Expand All @@ -38,10 +39,12 @@
r"(?P<tz_info>Z|([-+])(\d{2}):(\d{2}))?)?)?)?"
)

# todo: add runtime_checkable when we drop 3.7 support
# class GeoInterface(Protocol):
# def __geo_interface__(self) -> dict:
# ...

class GeoInterface(Protocol):
@property
def __geo_interface__(self) -> Dict[str, Any]:
...


DatetimeOrTimestamp = Optional[Union[datetime_, str]]
Datetime = str
Expand All @@ -62,8 +65,7 @@
IDsLike = Union[IDs, str, List[str], Iterator[str]]

Intersects = Dict[str, Any]
IntersectsLike = Union[str, object, Intersects]
# todo: after 3.7 is dropped, replace object with GeoInterface
IntersectsLike = Union[str, GeoInterface, Intersects]

Query = Dict[str, Any]
QueryLike = Union[Query, List[str]]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
py_modules=[splitext(basename(path))[0] for path in glob("pystac_client/*.py")],
include_package_data=True,
package_data={"pystac_client": ["py.typed"]},
python_requires=">=3.7",
python_requires=">=3.8",
install_requires=[
"requests>=2.27.1",
"pystac>=1.4.0",
Expand All @@ -43,10 +43,10 @@
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"Natural Language :: English",
"Development Status :: 3 - Alpha",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_item_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def test_intersects_json_string(self) -> None:

def test_intersects_non_geo_interface_object(self) -> None:
with pytest.raises(Exception):
ItemSearch(url=SEARCH_URL, intersects=object())
ItemSearch(url=SEARCH_URL, intersects=object()) # type: ignore

def test_filter_lang_default_for_dict(self) -> None:
search = ItemSearch(url=SEARCH_URL, filter={})
Expand Down