Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.4] - 2025-11-??
## [2.4.4] - 2025-11-15 :mount_fuji:

- Introduce `MiddlewareList` and `MiddlewareCategory` to simplify middleware management
and ordering of middlewares (see [#620](https://github.com/Neoteroi/BlackSheep/issues/620)).
Expand All @@ -29,15 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
when mapping to user-defined dataclasses, Pydantic v2 models, or classes
(see [#614](https://github.com/Neoteroi/BlackSheep/issues/614)). Previously, extra
properties were not ignored by default and required the user to explicitly code their
input classes to allow extra properties.
This is also done for expected input body declared as `list[T]`, `Sequence[T]`, and
`tuple[T]` where `T` is a dataclass, Pydantic model, or plain class.
The user can still control how input bodies from clients are converted using custom
binders or altering `blacksheep.server.bindings.class_converters`.
**Note:** automatic type conversion from strings is not performed for object properties.
Use Pydantic models if you want this feature. Example: dates can require conversion
when mapping JSON input, and everything is transmitted as text when using multipart
form data.
input classes to allow extra properties. This is also done for sub-properties, lists,
and dictionaries. The user can still control how exactly input bodies from clients are
converted using custom binders or altering
`blacksheep.server.bindings.class_converters`.
- Add support for specifying OpenAPI tags for controllers. This simplifies handling tags
for documentation ([#616](https://github.com/Neoteroi/BlackSheep/issues/616)).
- Improve the build matrix to build wheels for `arm64` architecture for Linux and
Expand All @@ -56,14 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Attach `EnvironmentSettings` to the `Application` object for runtime inspection, which
is useful for: transparency and debugging, testing
(`assert app.env_settings.force_https is True`), health check endpoints or admin tools
can expose configuration:

```python
@get("/health/config")
async def config_info():
return {"env": app.env_settings.env, ...}
```

can expose configuration.
- Add `HTTPSchemeMiddleware` to set request scheme when running behind reverse
proxies or load balancers with TLS termination.
See [#631](https://github.com/Neoteroi/BlackSheep/issues/631).
Expand All @@ -82,6 +70,9 @@ async def config_info():
- Improve `OpenIDSettings`, `CookieAuthentication`, and `AntiForgeryHandler` to handle
secrets using the `Secret` class from `essentials.secrets`. Passing secrets as `str`
directly issues a deprecation warning and won't be supported in `2.5.x` or `2.6.x`.
- Add support for annotated types in `OpenAPIHandler` return types, by @tyzhnenko. This
feature is important to support automatic generation of OpenAPI Documentation when
returning instances of `Response` (e.g. `Annotated[Response, ProductDetails]`).

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

Expand Down
2 changes: 1 addition & 1 deletion blacksheep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

__author__ = "Roberto Prevato <[email protected]>"
__version__ = "2.4.4a2"
__version__ = "2.4.4"

from .contents import Content as Content
from .contents import FormContent as FormContent
Expand Down
7 changes: 0 additions & 7 deletions blacksheep/server/bindings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@ def __init__(self, expected_type, binder_type):
)


def _try_get_type_name(expected_type) -> str:
try:
return expected_type.__name__
except AttributeError: # pragma: no cover
return expected_type


def get_default_class_converter(expected_type):
for converter in class_converters:
if converter.can_convert(expected_type):
Expand Down
Loading
Loading