Sanic

Latest version: v23.12.1

Safety actively analyzes 630026 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 12

22.9.1

What's Changed
* docs: sanic now supports windows by SaidBySolo in https://github.com/sanic-org/sanic/pull/2582
* Upgrade markdown templates to issue forms by ahopkins in https://github.com/sanic-org/sanic/pull/2588
* improve error message if no apps found in registry by scardozos in https://github.com/sanic-org/sanic/pull/2585
* fix: sideeffects created by changing fork to spawn by SaidBySolo in https://github.com/sanic-org/sanic/pull/2591
* 22.9 Docs by ahopkins in https://github.com/sanic-org/sanic/pull/2556
* Add interval sleep in reloader by ahopkins in https://github.com/sanic-org/sanic/pull/2595
* Resolve edge case in nested BP Groups by ahopkins in https://github.com/sanic-org/sanic/pull/2592
* Add GenericCreator for loading SSL certs in processes by ahopkins in https://github.com/sanic-org/sanic/pull/2578

New Contributors
* scardozos made their first contribution in https://github.com/sanic-org/sanic/pull/2585

**Full Changelog**: https://github.com/sanic-org/sanic/compare/v22.9.0...v22.9.1

22.9.0

Features

- [2445](https://github.com/sanic-org/sanic/pull/2445) Add custom loads function
- [2490](https://github.com/sanic-org/sanic/pull/2490) Make `WebsocketImplProtocol` async iterable
- [2499](https://github.com/sanic-org/sanic/pull/2499) Sanic Server WorkerManager refactor
- [2506](https://github.com/sanic-org/sanic/pull/2506) Use `pathlib` for path resolution (for static file serving)
- [2508](https://github.com/sanic-org/sanic/pull/2508) Use `path.parts` instead of `match` (for static file serving)
- [2513](https://github.com/sanic-org/sanic/pull/2513) Better request cancel handling
- [2516](https://github.com/sanic-org/sanic/pull/2516) Add request properties for HTTP method info:
- `request.is_safe`
- `request.is_idempotent`
- `request.is_cacheable`
- *See* [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) *for more information about when these apply*
- [2522](https://github.com/sanic-org/sanic/pull/2522) Always show server location in ASGI
- [2526](https://github.com/sanic-org/sanic/pull/2526) Cache control support for static files for returning 304 when appropriate
- [2533](https://github.com/sanic-org/sanic/pull/2533) Refactor `_static_request_handler`
- [2540](https://github.com/sanic-org/sanic/pull/2540) Add signals before and after handler execution
- `http.handler.before`
- `http.handler.after`
- [2542](https://github.com/sanic-org/sanic/pull/2542) Add *[redacted]* to CLI :)
- [2546](https://github.com/sanic-org/sanic/pull/2546) Add deprecation warning filter
- [2550](https://github.com/sanic-org/sanic/pull/2550) Middleware priority and performance enhancements

Bugfixes

- [2495](https://github.com/sanic-org/sanic/pull/2495) Prevent directory traversion with static files
- [2515](https://github.com/sanic-org/sanic/pull/2515) Do not apply double slash to paths in certain static dirs in Blueprints

Deprecations and Removals

- [2525](https://github.com/sanic-org/sanic/pull/2525) Warn on duplicate route names, will be prevented outright in v23.3
- [2537](https://github.com/sanic-org/sanic/pull/2537) Raise warning and deprecation notice on duplicate exceptions, will be prevented outright in v23.3

Developer infrastructure

- [2504](https://github.com/sanic-org/sanic/pull/2504) Cleanup test suite
- [2505](https://github.com/sanic-org/sanic/pull/2505) Replace Unsupported Python Version Number from the Contributing Doc
- [2530](https://github.com/sanic-org/sanic/pull/2530) Do not include tests folder in installed package resolver

Improved Documentation

- [2502](https://github.com/sanic-org/sanic/pull/2502) Fix a few typos
- [2517](https://github.com/sanic-org/sanic/pull/2517) [#2536](https://github.com/sanic-org/sanic/pull/2536) Add some type hints

---

New Contributors
* huntzhan made their first contribution in https://github.com/sanic-org/sanic/pull/2530
* monosans made their first contribution in https://github.com/sanic-org/sanic/pull/2536

**Full Changelog**: https://github.com/sanic-org/sanic/compare/v22.6.0...v22.9.0

22.6.2

2522 Always show server location in ASGI

**Full Changelog**: https://github.com/sanic-org/sanic/compare/v22.6.1...v22.6.2

22.6.1

Resolves 2477 and 2478
See also 2495 and https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6

**Full Changelog**: https://github.com/sanic-org/sanic/compare/v22.6.0...v22.6.1

22.6.0

Not secure
Features
- [2378](https://github.com/sanic-org/sanic/pull/2378) Introduce HTTP/3 and autogeneration of TLS certificates in `DEBUG` mode
- 👶 *EARLY RELEASE FEATURE*: Serving Sanic over HTTP/3 is an early release feature. It does not yet fully cover the HTTP/3 spec, but instead aims for feature parity with Sanic's existing HTTP/1.1 server. Websockets, WebTransport, push responses are examples of some features not yet implemented.
- 📦 *EXTRA REQUIREMENT*: Not all HTTP clients are capable of interfacing with HTTP/3 servers. You may need to install a [HTTP/3 capable client](https://curl.se/docs/http3.html).
- 📦 *EXTRA REQUIREMENT*: In order to use TLS autogeneration, you must install either [mkcert](https://github.com/FiloSottile/mkcert) or [trustme](https://github.com/python-trio/trustme).
- [2416](https://github.com/sanic-org/sanic/pull/2416) Add message to `task.cancel`
- [2420](https://github.com/sanic-org/sanic/pull/2420) Add exception aliases for more consistent naming with standard HTTP response types (`BadRequest`, `MethodNotAllowed`, `RangeNotSatisfiable`)
- [2432](https://github.com/sanic-org/sanic/pull/2432) Expose ASGI `scope` as a property on the `Request` object
- [2438](https://github.com/sanic-org/sanic/pull/2438) Easier access to websocket class for annotation: `from sanic import Websocket`
- [2439](https://github.com/sanic-org/sanic/pull/2439) New API for reading form values with options: `Request.get_form`
- [2445](https://github.com/sanic-org/sanic/pull/2445) Add custom `loads` function
- [2447](https://github.com/sanic-org/sanic/pull/2447), [#2486](https://github.com/sanic-org/sanic/pull/2486) Improved API to support setting cache control headers
- [2453](https://github.com/sanic-org/sanic/pull/2453) Move verbosity filtering to logger
- [2475](https://github.com/sanic-org/sanic/pull/2475) Expose getter for current request using `Request.get_current()`

Bugfixes
- [2448](https://github.com/sanic-org/sanic/pull/2448) Fix to allow running with `pythonw.exe` or places where there is no `sys.stdout`
- [2451](https://github.com/sanic-org/sanic/pull/2451) Trigger `http.lifecycle.request` signal in ASGI mode
- [2455](https://github.com/sanic-org/sanic/pull/2455) Resolve typing of stacked route definitions
- [2463](https://github.com/sanic-org/sanic/pull/2463) Properly catch websocket CancelledError in websocket handler in Python 3.7

Deprecations and Removals
- [2487](https://github.com/sanic-org/sanic/pull/2487) v22.6 deprecations and changes
1. Optional application registry
1. Execution of custom handlers after some part of response was sent
1. Configuring fallback handlers on the `ErrorHandler`
1. Custom `LOGO` setting
1. `sanic.response.stream`
1. `AsyncioServer.init`

Developer infrastructure
- [2449](https://github.com/sanic-org/sanic/pull/2449) Clean up `black` and `isort` config
- [2479](https://github.com/sanic-org/sanic/pull/2479) Fix some flappy tests

Improved Documentation
- [2461](https://github.com/sanic-org/sanic/pull/2461) Update example to match current application naming standards
- [2466](https://github.com/sanic-org/sanic/pull/2466) Better type annotation for `Extend`
- [2485](https://github.com/sanic-org/sanic/pull/2485) Improved help messages in CLI

---

New Contributors
* azimovMichael made their first contribution in https://github.com/sanic-org/sanic/pull/2432
* amitay87 made their first contribution in https://github.com/sanic-org/sanic/pull/2461
* zozzz made their first contribution in https://github.com/sanic-org/sanic/pull/2451
* kijk2869 made their first contribution in https://github.com/sanic-org/sanic/pull/2466
* timmo001 made their first contribution in https://github.com/sanic-org/sanic/pull/2448

**Full Changelog**: https://github.com/sanic-org/sanic/compare/v22.3.1...v22.6.0

22.3.2

Not secure
**Full Changelog**: https://github.com/sanic-org/sanic/compare/v22.3.1...v22.3.2

- Resolve warning issue with error handler mismatch warning
https://github.com/sanic-org/sanic/commit/3a1a9f071df24e2fe0ff5aac7d529019034fe898

Page 2 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.