4.5 KiB
4.5 KiB
Version 22.3.0
Features
- #2347 API for multi-application server
- 🚨 BREAKING CHANGE: The old
sanic.worker.GunicornWorkerhas been removed. To run Sanic withgunicorn, you should use it thruuvicornas described in their docs. - 🧁 SIDE EFFECT: Named background tasks are now supported, even in Python 3.7
- 🚨 BREAKING CHANGE: The old
- #2357 Parse
Authorizationheader asRequest.credentials - #2361 Add config option to skip
Touchupstep in application startup - #2372 Updates to CLI help messaging
- #2382 Downgrade warnings to backwater debug messages
- #2396 Allow for
multidictv0.6 - #2401 Upgrade CLI catching for alternative application run types
- #2402 Conditionally inject CLI arguments into factory
- #2413 Add new start and stop event listeners to reloader process
- #2414 Remove loop as required listener arg
- #2415 Better exception for bad URL parsing
- sanic-routing#47 Add a new extention parameter type:
<file:ext>,<file:ext=jpg>,<file:ext=jpg|png|gif|svg>,<file=int:ext>,<file=int:ext=jpg|png|gif|svg>,<file=float:ext=tar.gz>- 👶 BETA FEATURE: This feature will not work with
pathtype matching, and is being released as a beta feature only.
- 👶 BETA FEATURE: This feature will not work with
- sanic-routing#57 Change
register_patternto accept astrorPattern - sanic-routing#58 Default matching on non-empty strings only, and new
stroremptypattern type- 🚨 BREAKING CHANGE: Previously a route with a dynamic string parameter (
/<foo>or/<foo:str>) would match on any string, including empty strings. It will now only match a non-empty string. To retain the old behavior, you should use the new parameter type:/<foo:strorempty>.
- 🚨 BREAKING CHANGE: Previously a route with a dynamic string parameter (
Bugfixes
- #2373 Remove
error_loggeron websockets - #2381 Fix newly assigned
Nonein task registry - sanic-routing#52 Add type casting to regex route matching
- sanic-routing#60 Add requirements check on regex routes (this resolves, for example, multiple static directories with differing
hostvalues)
Deprecations and Removals
- #2362 22.3 Deprecations and changes
debug=Trueand--debugdo NOT automatically runauto_reload- Default error render is with plain text (browsers still get HTML by default because
autolooks at headers) configis required forErrorHandler.finalizeErrorHandler.lookuprequires two positional args- Unused websocket protocol args removed
- #2344 Deprecate loading of lowercase environment variables
Developer infrastructure
- #2363 Revert code coverage back to Codecov
- #2405 Upgrade tests for
sanic-routingchanges - sanic-testing#35 Allow for httpx v0.22
Improved Documentation
- #2350 Fix link in README for ASGI
- #2398 Document middleware on_request and on_response
- #2409 Add missing documentation for
Request.respond