Releases: Neoteroi/BlackSheep
Releases · Neoteroi/BlackSheep
v2.0.7
- Fixes bug #38,
to support properlylist[T]
andtuple[T]
when defining query string
parameters. Reported by @ranggakd. - Passes annotated origin type to build OpenAPI docs (#475), by @tyzhnenko.
- Fixes #481, disabling signal handling by default to avoid negative side
effects. Handling signals is now opt-in and can be achieved using the env
variableAPP_SIGNAL_HANDLER=1
. Theis_stopping
function is modified to
work only when the option is enabled. Issue reported by @netanel-haber. - Upgrades
black
version and format files accordingly.
v2.0.6
- Adds built-in support for Server-Sent events.
- Adds a function to detect when the server process is terminating because it received a
SIGINT
or aSIGTERM
command (from blacksheep.server.process import is_stopping
). - Adds support for request handler normalization for methods defined as asynchronous generators. This feature is enabled by default only for ServerSentEvents, but can be configured for user defined types.
- Raises exception when the default router is used to register routes, but not associated to an application object. Fixes #470.
Refer to the BlackSheep documentation and to the examples repository for more information on server-sent events support.
v2.0.5
v1.2.20
v2.0.4
- Adds a
is_disconnected()
method to theRequest
class, similar to the one available inStarlette
, which answers if the ASGI server published anhttp.disconnected
message for a request. Feature requested by @netanel-haber in #452. - Makes the
receive
callable of theASGI
request accessible to Python code, through the existingASGIContent
class. Thereceive
property was already included incontents.pyi
file and it was wrong to keepreceive
private for Cython code. - Removes
consts.pxi
because it used a deprecated Cython feature. - Upgrades the versions of Hypercorn and uvicorn for integration tests.
- Removes the unused "active" property defined in the
Response
class. - Fixes #455, reported by @Klavionik. This error caused the WebSocket handler to erroneously return an instance of BlackSheep response to the underlying ASGI server, causing an error to be logged in the console.
- Updates type annotations in the
Application
class code to be more explicit about the fact that certain methods must return None (return in call is used to interrupt code execution and not to return objects). - Improves the normalization logic to not normalize the output for WebSocket requests (as ASGI servers do not allow controlling the response for WebSocket handshake requests).
- Improves the normalization logic to not normalize request handlers that are valid as they are, as asynchronous functions with a single parameter annotated as Request or WebSocket.
- Fixes #421 reported by @mohd-akram, causing handled exceptions to be logged like unhandled, when defining exception handlers using subclasses.
- Removes wrong type annotations in two functions in
blacksheep.utils
.
v2.0.3
v1.2.19
v2.0.2
- Upgrades default SwaggerUI files to version 5, by @sinisaos
- Fixes #427, handling WebSocket errors according to ASGI specification, by @Klavionik
- Adds support for custom files URLs for ReDoc and Swagger UI, by @joshua-auchincloss
v2.0.1
- Fixes #441 causing the
refresh_token
endpoint for OpenID Connect
integrations to not work when authentication is required by default. - Fixes #427, handling WebSocket errors according to ASGI specification.
- Fixes #443, raising a detailed exception when more than one application is
sharing the same instance ofRouter
- Fixes #438 and #436, restoring support for
uvicorn
used programmatically
and reloading the application object more than once in the same process.
v2.0.0
- Releases v2 as stable. The updated documentation is here: https://www.neoteroi.dev/blacksheep/
- Removes the
route
method from theApplication
class, and move it to the
Router
class to be consistent with other methods to register request
handlers. - Removes
ClientConnectionPool
andClientConnectionPools
aliases.