Skip to content

Releases: sanic-org/sanic

Version 21.12.0

26 Dec 11:19
dc3ccba
Compare
Choose a tag to compare

Features

  • #2260 Allow early Blueprint registrations to still apply later added objects
  • #2262 Noisy exceptions - force logging of all exceptions
  • #2264 Optional uvloop by configuration
  • #2270 Vhost support using multiple TLS certificates
  • #2277 Change signal routing for increased consistency
    • BREAKING CHANGE: If you were manually routing signals there is a breaking change. The signal router's get is no longer 100% determinative. There is now an additional step to loop thru the returned signals for proper matching on the requirements. If signals are being dispatched using app.dispatch or bp.dispatch, there is no change.
  • #2290 Add contextual exceptions
  • #2291 Increase join concat performance
  • #2295, #2316, #2331 Restructure of CLI and application state with new displays and more command parity with app.run
  • #2302 Add route context at definition time
  • #2304 Named tasks and new API for managing background tasks
  • #2307 On app auto-reload, provide insight of changed files
  • #2308 Auto extend application with Sanic Extensions if it is installed, and provide first class support for accessing the extensions
  • #2309 Builtin signals changed to Enum
  • #2313 Support additional config implementation use case
  • #2321 Refactor environment variable hydration logic
  • #2327 Prevent sending multiple or mixed responses on a single request
  • #2330 Custom type casting on environment variables
  • #2332 Make all deprecation notices consistent
  • #2335 Allow underscore to start instance names

Bugfixes

  • #2273 Replace assignation by typing for websocket_handshake
  • #2285 Fix IPv6 display in startup logs
  • #2299 Dispatch http.lifecyle.response from exception handler

Deprecations and Removals

  • #2306 Removal of deprecated items
    • Sanic and Blueprint may no longer have arbitrary properties attached to them
    • Sanic and Blueprint forced to have compliant names
      • alphanumeric + _ + -
      • must start with letter or _
    • load_env keyword argument of Sanic
    • sanic.exceptions.abort
    • sanic.views.CompositionView
    • sanic.response.StreamingHTTPResponse
  • #2320 Remove app instance from Config for error handler setting

Developer infrastructure

  • #2251 Change dev install command
  • #2286 Change codeclimate complexity threshold from 5 to 10
  • #2287 Update host test function names so they are not overwritten
  • #2292 Fail CI on error
  • #2311, #2324 Do not run tests for draft PRs
  • #2336 Remove paths from coverage checks
  • #2338 Cleanup ports on tests

Improved Documentation

Miscellaneous

Version 21.9.3

21 Nov 12:28
8673021
Compare
Choose a tag to compare

Rerelease of v21.9.2 with some cleanup

Version 21.9.2

21 Nov 08:24
af1d289
Compare
Choose a tag to compare
  • #2268 Make HTTP connections start in IDLE stage, avoiding delays and error messages
  • #2310 More consistent config setting with post-FALLBACK_ERROR_FORMAT apply

Version 21.9.1

02 Oct 22:26
5e12edb
Compare
Choose a tag to compare
  • #2259 Allow non-conforming ErrorHandlers

Version 20.12.4

02 Oct 22:21
Compare
Choose a tag to compare

Version 21.9.0

30 Sep 19:37
59dd681
Compare
Choose a tag to compare

Version 21.9

Release Notes

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

  • #2173 Remove Duplicated Dependencies and PEP 517 Support
  • #2193, #2196, #2217 Type annotation changes

Version 21.6.2

02 Aug 18:07
5308fec
Compare
Choose a tag to compare

Bugfixes

  • #2211 Fix handling of exceptions in ASGI app call

Version 21.6.1

28 Jul 09:02
5a48b94
Compare
Choose a tag to compare

Bugfixes

  • #2178 Update sanic-routing to allow for better splitting of complex URI templates
  • #2183 Proper handling of chunked request bodies to resolve phantom 503 in logs
  • #2181 Resolve regression in exception logging
  • #2201 Cleanup request info in pipelined requests

Version 21.6.0

27 Jun 20:07
8df80e2
Compare
Choose a tag to compare

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 and Sanic.ctx
  • #2133 Implement new version of AST router
    • Proper differentiation between alpha and string 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
  • #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() and Blueprint()
  • #2150 Infinitely reusable and nestable Blueprint and BlueprintGroup
  • #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

  • #2164 Fix typo in documentation
  • #2100 Remove documentation for non-existent arguments

Version 21.3.4

19 Apr 22:35
Compare
Choose a tag to compare

Bugfixes

#2117 Add sanic-routing==0.6 with RouteGroup and resolve:

  • #2116 Access logs not properly displaying body size
  • #2103 Request body not automatically loading
  • #2101 ASGI routes not extracting body
  • #2090 Edge case on router with overloading