Path to this page:
./
www/py-sanic,
Microframework based on uvloop, httptools, and learnings of flask
Branch: CURRENT,
Version: 24.6.0,
Package name: py312-sanic-24.6.0,
Maintainer: pkgsrc-usersSanic is a Flask-like Python 3.5+ web server that's written to go fast. It's
based on the work done by the amazing folks at magicstack.
On top of being Flask-like, Sanic supports async request handlers. This means
you can use the new shiny async/await syntax from Python 3.5, making your code
non-blocking and speedy.
Required to run:[
devel/py-setuptools] [
devel/py-uvloop] [
www/py-websockets] [
textproc/py-ujson] [
www/py-httptools] [
devel/py-aiofiles] [
databases/py-multidict] [
lang/python37] [
www/py-httpx]
Required to build:[
pkgtools/cwrappers]
Master sites:
Filesize: 343.742 KB
Version history: (Expand)
- (2024-10-14) Updated to version: py312-sanic-24.6.0
- (2024-07-23) Updated to version: py311-sanic-24.6.0
- (2024-01-11) Updated to version: py311-sanic-23.12.1
- (2024-01-05) Updated to version: py311-sanic-23.12.0
- (2023-11-08) Updated to version: py311-sanic-23.6.0
- (2023-08-11) Updated to version: py310-sanic-23.6.0
CVS history: (Expand)
2024-01-11 14:13:28 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-sanic: updated to 23.12.1
Version 23.12.1
Fix broken multiplexer manage
Do not strip entity-headers with HTTP status 304 or 412
|
2024-01-05 19:23:02 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-sanic: updated to 23.12.0
Version 23.12.0
Features
* Start and restart arbitrary processes
* Cleaner process management in shutdown
* Suppress task cancel traceback on open websocket
* Listener and signal prioritization
* Reduce memory consumption
* Accept bare cookies
* Add websocket.handler.<before/after/exception> signals
* Add changed files to reload trigger listeners
* Allow for simple signals
* Improve functionality and consistency of Sanic.event()
* Allow range requests for a single byte
* Better Request.scheme for websocket requests
* Convert Sanic Request to a Websockets Request for handshake
* Add a REPL to the sanic CLI
* Add Python 3.12 support
* Better exception on multiprocessing context conflicts
Bugfixes
* Fix MOTD display for extra data
|
2023-11-07 23:38:10 by Thomas Klausner | Files touched by this commit (112) |
Log message:
*: latest py-sphinx only support Python 3.9+
|
2023-08-11 14:54:02 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-sanic: updated to 23.6.0
Version 23.6.0
Features
* Increase KEEP_ALIVE_TIMEOUT default to 120 seconds
* Adding allow route overwrite option in blueprint
* Add a new exception signal for ALL exceptions raised anywhere in application
* Add name prefixing to BP groups
* Update request type on middleware types
* Better exception message on startup time application induced import error
* Set multiprocessing start method early
* Add custom typing to config and ctx objects
* Add request.client_ip
Bugfixes
* Fix traversals for intended results
* Handle case when headers argument of ResponseStream constructor is None
* Fix type annotation for JSONREsponse default content type
* Use Sanic's serializer for JSON responses in the Inspector
* Support for Request.get_current in ASGI mode
* Alow Blueprint routes to explicitly define error_format
* Resolve headers on different renderers
* Resolve pypy compatibility issues
Deprecations and Removals
* Remove Python 3.7 support
Developer infrastructure
* Unpin setuptools version
* Run keep alive tests in loop to get available port
Improved Documentation
* Better documentation examples about running Sanic
|
2023-03-03 10:01:36 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-sanic: updated to 22.12.0
Version 22.12.0
Current version
Features
* Add JSONResponse class with some convenient methods when updating a response object
* Change uvloop requirement to >=0.15.0
* Add compatibility with websockets v11.0
* Kill server early on worker error
Raise deadlock timeout to 30s
* Scale number of running server workers
* Send SIGKILL on subsequent ctrl+c to force worker exit
* Add API to restart all workers from the multiplexer
* Default to spawn for all subprocesses unless specifically set:
from sanic import Sanic
Sanic.start_method = "fork"
* Filename normalisation of form-data/multipart file uploads
* Move to HTTP Inspector:
Remote access to inspect running Sanic instances
TLS support for encrypted calls to Inspector
Authentication to Inspector with API key
Ability to extend Inspector with custom commands
* Control order of restart operations
* Move reload interval to class variable
* Add priority to register_middleware method
* Add unquote to add_route method
* ASGI websockets to receive text or bytes
Bugfixes
* Force socket shutdown before close to allow rebinding
* Use actual StrEnum in Python 3.11+
* Ensure middleware executes only once per request timeout
* Crash ASGI application on lifespan failure
* Resolve error with low-level server creation on Windows
Deprecations and Removals
* Signal conditions and triggers saved on signal.extra
* Move to HTTP Inspector
BREAKING CHANGE: Moves the Inspector to a Sanic app from a simple TCP socket \
with a custom protocol
DEPRECATE: The --inspect* commands have been deprecated in favor of inspect ... \
commands
* Replace deprecated distutils.strtobool
Developer infrastructure
* Add CI testing for Python 3.11
|
2022-11-03 13:46:20 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-sanic: updated to 22.9.1
22.9.1
docs: sanic now supports windows
Upgrade markdown templates to issue forms
improve error message if no apps found in registry
fix: sideeffects created by changing fork to spawn
22.9 Docs
Add interval sleep in reloader
Resolve edge case in nested BP Groups
Add GenericCreator for loading SSL certs in processes
|
2022-10-14 10:39:49 by Adam Ciarcinski | Files touched by this commit (4) | |
Log message:
py-sanic: updated to 22.9.0
Version 22.9.0
Features
* Add custom loads function
* Make WebsocketImplProtocol async iterable
* Sanic Server WorkerManager refactor
* Use pathlib for path resolution (for static file serving)
* Use path.parts instead of match (for static file serving)
* Better request cancel handling
* Add request properties for HTTP method info:
request.is_safe
request.is_idempotent
request.is_cacheable
See MDN docs for more information about when these apply
* Always show server location in ASGI
* Cache control support for static files for returning 304 when appropriate
* Refactor _static_request_handler
* Add signals before and after handler execution
http.handler.before
http.handler.after
* Add [redacted] to CLI :)
* Add deprecation warning filter
* Middleware priority and performance enhancements
Bugfixes
* Prevent directory traversion with static files
* Do not apply double slash to paths in certain static dirs in Blueprints
Deprecations and Removals
* Warn on duplicate route names, will be prevented outright in v23.3
* Raise warning and deprecation notice on duplicate exceptions, will be \
prevented outright in v23.3
Developer infrastructure
* Cleanup test suite
* Replace Unsupported Python Version Number from the Contributing Doc
* Do not include tests folder in installed package resolver
Improved Documentation
* Fix a few typos
* Add some type hints
|
2022-08-23 11:35:23 by Adam Ciarcinski | Files touched by this commit (4) | |
Log message:
py-sanic: updated to 22.6.2
Version 22.6.0
Features
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.
📦 EXTRA REQUIREMENT: In order to use TLS autogeneration, you must install \
either mkcert or trustme.
Add message to task.cancel
Add exception aliases for more consistent naming with standard HTTP response \
types (BadRequest, MethodNotAllowed, RangeNotSatisfiable)
Expose ASGI scope as a property on the Request object
Easier access to websocket class for annotation: from sanic import Websocket
New API for reading form values with options: Request.get_form
Add custom loads function
Improved API to support setting cache control headers
Move verbosity filtering to logger
Expose getter for current request using Request.get_current()
Bugfixes
Fix to allow running with pythonw.exe or places where there is no sys.stdout
Trigger http.lifecycle.request signal in ASGI mode
Resolve typing of stacked route definitions
Properly catch websocket CancelledError in websocket handler in Python 3.7
Deprecations and Removals
v22.6 deprecations and changes
Optional application registry
Execution of custom handlers after some part of response was sent
Configuring fallback handlers on the ErrorHandler
Custom LOGO setting
sanic.response.stream
AsyncioServer.init
|