Skip to content

Commit

Permalink
Update context.py (#660)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
jon9595 and jonhealy1 authored Apr 18, 2024
1 parent bc52635 commit 1078c2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

* Fixed warnings.warn deprecation syntax for response class and the context extension ([#660](https://github.com/stac-utils/stac-fastapi/pull/660))

## [2.5.0] - 2024-04-12

### Added
Expand Down
2 changes: 1 addition & 1 deletion stac_fastapi/api/stac_fastapi/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def create_async_endpoint(
"""

if response_class:
warnings.warns(
warnings.warn(
"`response_class` option is deprecated, please set the Response class directly in the endpoint.", # noqa: E501
DeprecationWarning,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ContextExtension(ApiExtension):

def __attrs_post_init__(self):
"""init."""
warnings.warm(
warnings.warn(
"The ContextExtension is deprecated and will be removed in 3.0.",
DeprecationWarning,
stacklevel=1,
Expand Down

0 comments on commit 1078c2d

Please sign in to comment.