Skip to content

Commit 1078c2d

Browse files
jon9595jonhealy1
andauthored
Update context.py (#660)
* Update context.py typo in warning, "warm" insteand of "warn" * Update routes.py fixing warn call * Update CHANGES.md * Update CHANGES.md * Update CHANGES.md --------- Co-authored-by: Jonathan Healy <jonathan.d.healy@gmail.com>
1 parent bc52635 commit 1078c2d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
* Fixed warnings.warn deprecation syntax for response class and the context extension ([#660](https://github.com/stac-utils/stac-fastapi/pull/660))
8+
59
## [2.5.0] - 2024-04-12
610

711
### Added

stac_fastapi/api/stac_fastapi/api/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def create_async_endpoint(
4545
"""
4646

4747
if response_class:
48-
warnings.warns(
48+
warnings.warn(
4949
"`response_class` option is deprecated, please set the Response class directly in the endpoint.", # noqa: E501
5050
DeprecationWarning,
5151
)

stac_fastapi/extensions/stac_fastapi/extensions/core/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ContextExtension(ApiExtension):
2828

2929
def __attrs_post_init__(self):
3030
"""init."""
31-
warnings.warm(
31+
warnings.warn(
3232
"The ContextExtension is deprecated and will be removed in 3.0.",
3333
DeprecationWarning,
3434
stacklevel=1,

0 commit comments

Comments
 (0)