From 3caf1af6c8b809ca7bdf270b75d2feec86a4dfa0 Mon Sep 17 00:00:00 2001 From: Jon Lantsberger Date: Wed, 17 Apr 2024 20:52:57 -0500 Subject: [PATCH 1/5] Update context.py typo in warning, "warm" insteand of "warn" --- stac_fastapi/extensions/stac_fastapi/extensions/core/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/extensions/stac_fastapi/extensions/core/context.py b/stac_fastapi/extensions/stac_fastapi/extensions/core/context.py index b6539487..4037ba93 100644 --- a/stac_fastapi/extensions/stac_fastapi/extensions/core/context.py +++ b/stac_fastapi/extensions/stac_fastapi/extensions/core/context.py @@ -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, From ce3296498d7d16972c331648dc7c77518d7ed976 Mon Sep 17 00:00:00 2001 From: Jon Lantsberger Date: Thu, 18 Apr 2024 00:19:48 -0500 Subject: [PATCH 2/5] Update routes.py fixing warn call --- stac_fastapi/api/stac_fastapi/api/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/api/stac_fastapi/api/routes.py b/stac_fastapi/api/stac_fastapi/api/routes.py index 66b76d2d..df4a136e 100644 --- a/stac_fastapi/api/stac_fastapi/api/routes.py +++ b/stac_fastapi/api/stac_fastapi/api/routes.py @@ -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, ) From 651cbf5880c1c3597f2935e86f678d5db777dd1c Mon Sep 17 00:00:00 2001 From: Jon Lantsberger Date: Thu, 18 Apr 2024 00:23:09 -0500 Subject: [PATCH 3/5] Update CHANGES.md --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index f043635c..a9c5fe40 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [2.5.1] - 2024-04-18 + +### Fixed + +* Fixed calls to `.warn()` from typos (`.warm()` and `.warns()`) + ## [2.5.0] - 2024-04-12 ### Added From 84125eaea0f28648032681b1c43c06a7e556b613 Mon Sep 17 00:00:00 2001 From: Jon Lantsberger Date: Thu, 18 Apr 2024 00:24:50 -0500 Subject: [PATCH 4/5] Update CHANGES.md --- CHANGES.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a9c5fe40..dc6b255b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,11 +2,9 @@ ## [Unreleased] -## [2.5.1] - 2024-04-18 - ### Fixed -* Fixed calls to `.warn()` from typos (`.warm()` and `.warns()`) +* Fixed warnings in ..... ([#660](https://github.com/stac-utils/stac-fastapi/pull/660)) ## [2.5.0] - 2024-04-12 From 6c1e112b87d342823de95c3200303b93fd77cc3c Mon Sep 17 00:00:00 2001 From: Jonathan Healy Date: Thu, 18 Apr 2024 13:29:03 +0800 Subject: [PATCH 5/5] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index dc6b255b..2cda0a75 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +4,7 @@ ### Fixed -* Fixed warnings in ..... ([#660](https://github.com/stac-utils/stac-fastapi/pull/660)) +* 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