Skip to content

Commit b4b66f3

Browse files
Merge pull request #138 from vincentsarago/feature/remove-context-extension
(feature): remove the deprecated Context Extension
2 parents c03272e + 9eaeb6d commit b4b66f3

File tree

5 files changed

+5
-120
lines changed

5 files changed

+5
-120
lines changed

Diff for: CHANGELOG.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2+
3.1.0 (TBD)
3+
-----------------
4+
- Remove the deprecated `Context` extension (#138, @vincentsarago)
5+
16
3.0.0 (2024-01-25)
27
------------------
38
- Support pydantic>2.0 (@huard)

Diff for: stac_pydantic/api/extensions/context.py

-35
This file was deleted.

Diff for: stac_pydantic/api/item_collection.py

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from pydantic import model_validator
55

6-
from stac_pydantic.api.extensions.context import ContextExtension
76
from stac_pydantic.api.item import Item
87
from stac_pydantic.api.links import Links
98
from stac_pydantic.item_collection import ItemCollection as BaseItemCollection
@@ -21,9 +20,6 @@ class ItemCollection(BaseItemCollection):
2120
numberMatched: Optional[int] = None
2221
numberReturned: Optional[int] = None
2322

24-
# Context Extension
25-
context: Optional[ContextExtension] = None
26-
2723
@model_validator(mode="after")
2824
def required_links(self) -> "ItemCollection":
2925
if self.links:

Diff for: tests/api/extensions/test_context.py

-75
This file was deleted.

Diff for: tests/test_models.py

-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from shapely.geometry import shape
77

88
from stac_pydantic import Collection, Item, ItemProperties
9-
from stac_pydantic.api.extensions.context import ContextExtension
109
from stac_pydantic.extensions import validate_extensions
1110
from stac_pydantic.links import Link, Links
1211
from stac_pydantic.shared import MimeTypes
@@ -161,11 +160,6 @@ def test_geo_interface() -> None:
161160
Item(**test_item)
162161

163162

164-
def test_api_context_extension() -> None:
165-
context = {"returned": 10, "limit": 10, "matched": 100}
166-
ContextExtension(**context)
167-
168-
169163
def test_declared_model() -> None:
170164
class TestProperties(ItemProperties):
171165
foo: str

0 commit comments

Comments
 (0)