Skip to content

Commit 68e0f6b

Browse files
authored
Update to pystac v1.10 (#661)
* fix: update to v1.10 * feat: drop python 3.8, add python 3.12
1 parent 2de4d5b commit 68e0f6b

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

.github/workflows/continuous-integration.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
python-version:
22-
- "3.8"
2322
- "3.9"
2423
- "3.10"
2524
- "3.11"
25+
- "3.12"
2626
os:
2727
- ubuntu-latest
2828
- windows-latest

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Updated to **pystac** v1.10.0 [#661](https://github.com/stac-utils/pystac-client/pull/661)
13+
1014
## [v0.7.6]
1115

1216
### Fixed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ license = { text = "Apache-2.0" }
1212
classifiers = [
1313
"Programming Language :: Python",
1414
"Programming Language :: Python :: 3",
15-
"Programming Language :: Python :: 3.8",
1615
"Programming Language :: Python :: 3.9",
1716
"Programming Language :: Python :: 3.10",
1817
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
1919
"Operating System :: OS Independent",
2020
"Natural Language :: English",
2121
"Development Status :: 4 - Beta",
@@ -28,7 +28,7 @@ classifiers = [
2828
requires-python = ">=3.8"
2929
dependencies = [
3030
"requests>=2.28.2",
31-
"pystac[validation]>=1.8.2",
31+
"pystac[validation]>=1.10.0",
3232
"python-dateutil>=2.8.2",
3333
]
3434
dynamic = ["version"]

pystac_client/client.py

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import pystac.utils
1818
import pystac.validation
1919
from pystac import CatalogType, Collection
20+
from pystac.layout import HrefLayoutStrategy
2021
from requests import Request
2122

2223
from pystac_client._utils import Modifiable, call_modifier
@@ -71,6 +72,7 @@ def __init__(
7172
extra_fields: Optional[Dict[str, Any]] = None,
7273
href: Optional[str] = None,
7374
catalog_type: CatalogType = CatalogType.ABSOLUTE_PUBLISHED,
75+
strategy: Optional[HrefLayoutStrategy] = None,
7476
*,
7577
modifier: Optional[Callable[[Modifiable], None]] = None,
7678
**kwargs: Dict[str, Any],
@@ -83,6 +85,7 @@ def __init__(
8385
extra_fields=extra_fields,
8486
href=href,
8587
catalog_type=catalog_type,
88+
strategy=strategy,
8689
**kwargs,
8790
)
8891
self.modifier = modifier

pystac_client/collection_client.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
)
1515

1616
import pystac
17+
import pystac.layout
1718

1819
from pystac_client._utils import Modifiable, call_modifier
1920
from pystac_client.conformance import ConformanceClasses
@@ -47,11 +48,12 @@ def __init__(
4748
keywords: Optional[List[str]] = None,
4849
providers: Optional[List[pystac.Provider]] = None,
4950
summaries: Optional[pystac.Summaries] = None,
51+
assets: Optional[Dict[str, pystac.Asset]] = None,
52+
strategy: Optional[pystac.layout.HrefLayoutStrategy] = None,
5053
*,
5154
modifier: Optional[Callable[[Modifiable], None]] = None,
5255
**kwargs: Dict[str, Any],
5356
):
54-
# TODO(pystac==1.6.0): Add `assets` as a regular keyword
5557
super().__init__(
5658
id,
5759
description,
@@ -65,6 +67,8 @@ def __init__(
6567
keywords,
6668
providers,
6769
summaries,
70+
assets,
71+
strategy,
6872
**kwargs,
6973
)
7074
# error: Cannot assign to a method [assignment]

0 commit comments

Comments
 (0)