Skip to content

Commit 9c6d06b

Browse files
Prepare for 2.4.4 🗻
1 parent a6ee152 commit 9c6d06b

9 files changed

Lines changed: 641 additions & 189 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [2.4.4] - 2025-11-??
8+
## [2.4.4] - 2025-11-15 :mount_fuji:
99

1010
- Introduce `MiddlewareList` and `MiddlewareCategory` to simplify middleware management
1111
and ordering of middlewares (see [#620](https://github.com/Neoteroi/BlackSheep/issues/620)).
@@ -29,15 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
when mapping to user-defined dataclasses, Pydantic v2 models, or classes
3030
(see [#614](https://github.com/Neoteroi/BlackSheep/issues/614)). Previously, extra
3131
properties were not ignored by default and required the user to explicitly code their
32-
input classes to allow extra properties.
33-
This is also done for expected input body declared as `list[T]`, `Sequence[T]`, and
34-
`tuple[T]` where `T` is a dataclass, Pydantic model, or plain class.
35-
The user can still control how input bodies from clients are converted using custom
36-
binders or altering `blacksheep.server.bindings.class_converters`.
37-
**Note:** automatic type conversion from strings is not performed for object properties.
38-
Use Pydantic models if you want this feature. Example: dates can require conversion
39-
when mapping JSON input, and everything is transmitted as text when using multipart
40-
form data.
32+
input classes to allow extra properties. This is also done for sub-properties, lists,
33+
and dictionaries. The user can still control how exactly input bodies from clients are
34+
converted using custom binders or altering
35+
`blacksheep.server.bindings.class_converters`.
4136
- Add support for specifying OpenAPI tags for controllers. This simplifies handling tags
4237
for documentation ([#616](https://github.com/Neoteroi/BlackSheep/issues/616)).
4338
- Improve the build matrix to build wheels for `arm64` architecture for Linux and
@@ -56,14 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5651
- Attach `EnvironmentSettings` to the `Application` object for runtime inspection, which
5752
is useful for: transparency and debugging, testing
5853
(`assert app.env_settings.force_https is True`), health check endpoints or admin tools
59-
can expose configuration:
60-
61-
```python
62-
@get("/health/config")
63-
async def config_info():
64-
return {"env": app.env_settings.env, ...}
65-
```
66-
54+
can expose configuration.
6755
- Add `HTTPSchemeMiddleware` to set request scheme when running behind reverse
6856
proxies or load balancers with TLS termination.
6957
See [#631](https://github.com/Neoteroi/BlackSheep/issues/631).
@@ -82,6 +70,9 @@ async def config_info():
8270
- Improve `OpenIDSettings`, `CookieAuthentication`, and `AntiForgeryHandler` to handle
8371
secrets using the `Secret` class from `essentials.secrets`. Passing secrets as `str`
8472
directly issues a deprecation warning and won't be supported in `2.5.x` or `2.6.x`.
73+
- Add support for annotated types in `OpenAPIHandler` return types, by @tyzhnenko. This
74+
feature is important to support automatic generation of OpenAPI Documentation when
75+
returning instances of `Response` (e.g. `Annotated[Response, ProductDetails]`).
8576

8677
## [2.4.3] - 2025-10-19 :musical_keyboard:
8778

‎blacksheep/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
__author__ = "Roberto Prevato <roberto.prevato@gmail.com>"
7-
__version__ = "2.4.4a2"
7+
__version__ = "2.4.4"
88

99
from .contents import Content as Content
1010
from .contents import FormContent as FormContent

‎blacksheep/server/bindings/__init__.py‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,6 @@ def __init__(self, expected_type, binder_type):
383383
)
384384

385385

386-
def _try_get_type_name(expected_type) -> str:
387-
try:
388-
return expected_type.__name__
389-
except AttributeError: # pragma: no cover
390-
return expected_type
391-
392-
393386
def get_default_class_converter(expected_type):
394387
for converter in class_converters:
395388
if converter.can_convert(expected_type):

0 commit comments

Comments
 (0)