BlackSheep Versions Save

Fast ASGI web framework for Python

v2.0.7

2 months ago
  • Fixes bug #38, to support properly list[T] and tuple[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 variable APP_SIGNAL_HANDLER=1. The is_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

3 months ago
  • 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 a SIGTERM 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

4 months ago
  • Fixes #466, regression introduced in 2.0.4 when using sub-routers, reported by @ruancan.

v1.2.20

4 months ago
  • Fixes #460, reported by @waweber.

v2.0.4

4 months ago
  • Adds a is_disconnected() method to the Request class, similar to the one available in Starlette, which answers if the ASGI server published an http.disconnected message for a request. Feature requested by @netanel-haber in #452.
  • Makes the receive callable of the ASGI request accessible to Python code, through the existing ASGIContent class. The receive property was already included in contents.pyi file and it was wrong to keep receive 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.

v1.2.19

4 months ago
  • Fixes #450, about missing Access-Control-Allow-Credentials response header in CORS responses after successful pre-flight requests. Reported by @waweber

v2.0.3

4 months ago
  • Fixes #450, about missing Access-Control-Allow-Credentials response header in CORS responses after successful pre-flight requests. Reported by @waweber

v2.0.2

4 months ago
  • 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

5 months ago
  • 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 of Router
  • 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

5 months ago
  • Releases v2 as stable. The updated documentation is here: https://www.neoteroi.dev/blacksheep/
  • Removes the route method from the Application class, and move it to the Router class to be consistent with other methods to register request handlers.
  • Removes ClientConnectionPool and ClientConnectionPools aliases.