From 9ae1f78783e0fe1f0c125f20a4443b58bd2b21fb Mon Sep 17 00:00:00 2001 From: Igor Magalhaes Date: Fri, 10 May 2024 02:14:48 -0300 Subject: [PATCH] docs updated, code coverage fix --- docs/changelog.md | 11 +++++++++++ fastcrud/endpoint/helper.py | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index cf93a2c..e7e1d66 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,17 @@ The Changelog documents all notable changes made to FastCRUD. This includes new ___ +## [0.12.1] - May 10, 2024 + +#### Added +- Deprecation Warning for dependency handling. + +#### Detailed Changes +If you pass a sequence of `params.Depends` type variables to any `*_deps` parameter in `EndpointCreator` and `crud_router`, you'll get a warning. Support will be completely removed in 0.15.0. + +**Full Changelog**: https://github.com/igorbenav/fastcrud/compare/v0.12.0...v0.12.1 + + ## [0.12.0] - May 8, 2024 #### Added diff --git a/fastcrud/endpoint/helper.py b/fastcrud/endpoint/helper.py index cd79e64..a61c873 100644 --- a/fastcrud/endpoint/helper.py +++ b/fastcrud/endpoint/helper.py @@ -84,7 +84,7 @@ def _extract_unique_columns( def _temporary_dependency_handling( funcs: Optional[Sequence[Callable]] = None, -) -> Union[Sequence[params.Depends], None]: +) -> Union[Sequence[params.Depends], None]: # pragma: no cover """ Checks if any function in the provided sequence is an instance of params.Depends. Issues a deprecation warning once if such instances are found, and returns the sequence if any params.Depends are found. @@ -111,7 +111,7 @@ def _inject_dependencies( ) -> Optional[Sequence[params.Depends]]: """Wraps a list of functions in FastAPI's Depends.""" temp_handling = _temporary_dependency_handling(funcs) - if temp_handling is not None: + if temp_handling is not None: # pragma: no cover return temp_handling if funcs is not None: