Releases: sanic-org/sanic
Releases · sanic-org/sanic
Version 21.9.2
Version 21.9.1
- #2259 Allow non-conforming ErrorHandlers
Version 20.12.4
- #2129 Unpin uvloop
Version 21.9.0
Version 21.9
Features
- #2158, #2248 Complete overhaul of I/O to websockets
- #2160 Add new 17 signals into server and request lifecycles
- #2162 Smarter
auto
fallback formatting upon exception - #2184 Introduce implementation for copying a Blueprint
- #2200 Accept header parsing
- #2207 Log remote address if available
- #2209 Add convenience methods to BP groups
- #2216 Add default messages to SanicExceptions
- #2225 Type annotation convenience for annotated handlers with path parameters
- #2236 Allow Falsey (but not-None) responses from route handlers
- #2238 Add
exception
decorator to Blueprint Groups - #2244 Explicit static directive for serving file or dir (ex:
static(..., resource_type="file")
) - #2245 Close HTTP loop when connection task cancelled
Bugfixes
- #2188 Fix the handling of the end of a chunked request
- #2195 Resolve unexpected error handling on static requests
- #2208 Make blueprint-based exceptions attach and trigger in a more intuitive manner
- #2211 Fixed for handling exceptions of asgi app call
- #2213 Fix bug where ws exceptions not being logged
- #2231 Cleaner closing of tasks by using
abort()
in strategic places to avoid dangling sockets - #2247 Fix logging of auto-reload status in debug mode
- #2246 Account for BP with exception handler but no routes
Developer infrastructure
- #2194 HTTP unit tests with raw client
- #2199 Switch to codeclimate
- #2214 Try Reopening Windows Tests
- #2229 Refactor
HttpProtocol
into a base class - #2230 Refactor
server.py
into multi-file module
Miscellaneous
Version 21.6.2
Bugfixes
- #2211 Fix handling of exceptions in ASGI app call
Version 21.6.1
Version 21.6.0
Features
- #2094 Add
response.eof()
method for closing a stream in a handler - #2097 Allow case-insensitive HTTP Upgrade header
- #2104 Explicit usage of
CIMultiDict
getters - #2109 Consistent use of error loggers
- #2114 New
client_ip
access of connection info instance - #2119 Alternatate classes on instantiation for
Config
andSanic.ctx
- #2133 Implement new version of AST router
- Proper differentiation between
alpha
andstring
param types - Adds a
slug
param type, example:<foo:slug>
- Deprecates
<foo:string>
in favor of<foo:str>
- Deprecates
<foo:number>
in favor of<foo:float>
- Adds a
route.uri
accessor
- Proper differentiation between
- #2136 CLI improvements with new optional params
- #2137 Add version_prefix to URL builders
- #2140 Event autoregistration with
EVENT_AUTOREGISTER
- #2146, #2147 Require stricter names on
Sanic()
andBlueprint()
- #2150 Infinitely reusable and nestable
Blueprint
andBlueprintGroup
- #2154 Upgrade websockets dependency to min version
- #2155 Allow for maximum header sizes to be increased:
REQUEST_MAX_HEADER_SIZE
- #2157 Allow app factory pattern in CLI
- #2165 Change HTTP methods to enums
- #2167 Allow auto-reloading on additional directories
- #2168 Add simple HTTP server to CLI
- #2170 Additional methods for attaching
HTTPMethodView
Bugfixes
- #2091 Fix UserWarning in ASGI mode for missing
__slots__
- #2099 Fix static request handler logging exception on 404
- #2110 Fix
request.args.pop
removes parameters inconsistently - #2107 Fix type hinting for
load_env
- #2127 Make sure ASGI ws subprotocols is a list
- #2128 Fix issue where Blueprint exception handlers do not consistently route to proper handler
Deprecations and Removals
- #2156 Remove config value
REQUEST_BUFFER_QUEUE_SIZE
- #2170
CompositionView
deprecated and marked for removal in 21.12 - #2172 Deprecate
StreamingHTTPResponse
Developer infrastructure
- #2149 Remove Travis CI in favor of GitHub Actions
Improved Documentation
Version 21.3.4
Version 21.3.3
NO RELEASE