HS-Sanic v19.3 Release Notes
Release Date: 2019-03-17 // about 5 years ago-
๐ Features
#1497 <https://github.com/huge-success/sanic/pull/1497>
_ Add support for zero-length and RFC 5987 encoded filename for multipart/form-data requests.#1484 <https://github.com/huge-success/sanic/pull/1484>
_ The type ofexpires
attribute ofsanic.cookies.Cookie
is now enforced to be of typedatetime
.#1482 <https://github.com/huge-success/sanic/pull/1482>
_ Add support for thestream
parameter ofsanic.Sanic.add_route()
available tosanic.Blueprint.add_route()
.#1481 <https://github.com/huge-success/sanic/pull/1481>
_ Accept negative values for route parameters with typeint
ornumber
.#1476 <https://github.com/huge-success/sanic/pull/1476>
_ Deprecated the use ofsanic.request.Request.raw_args
- it has a fundamental flaw in which is drops repeated query string parameters. Addedsanic.request.Request.query_args
as a replacement for the original use-case.#1472 <https://github.com/huge-success/sanic/pull/1472>
_ Remove an unwantedNone
check in Request classrepr
implementation. This changes the defaultrepr
of a Request from<Request>
to<Request: None />
#1470 <https://github.com/huge-success/sanic/pull/1470>
_ Added 2 new parameters tosanic.app.Sanic.create_server
\ :return_asyncio_server
- whether to return an asyncio.Server.asyncio_server_kwargs
- kwargs to pass toloop.create_server
for the event loop that sanic is using.
This is a breaking change.
#1499 <https://github.com/huge-success/sanic/pull/1499>
_ Added a set of test cases that test and benchmark route resolution.#1457 <https://github.com/huge-success/sanic/pull/1457>
_ The type of the"max-age"
value in asanic.cookies.Cookie
is now enforced to be an integer. Non-integer values are replaced with0
.#1445 <https://github.com/huge-success/sanic/pull/1445>
_ Added theendpoint
attribute to an incomingrequest
\ , containing the name of the handler function.#1423 <https://github.com/huge-success/sanic/pull/1423>
_ Improved request streaming.request.stream
is now a bounded-size buffer instead of an unbounded queue. Callers must now callawait request.stream.read()
instead ofawait request.stream.get()
to read each portion of the body.This is a breaking change.
๐ Bugfixes
#1502 <https://github.com/huge-success/sanic/pull/1502>
_ Sanic was prefetchingtime.time()
and updating it once per second to avoid excessivetime.time()
calls. The implementation was observed to cause memory leaks in some cases. The benefit of the prefetch appeared to negligible, so this has been removed. Fixes#1500 <https://github.com/huge-success/sanic/pull/1500>
_#1501 <https://github.com/huge-success/sanic/pull/1501>
_ Fix a bug in the auto-reloader when the process was launched as a module i.e.python -m init0.mod1
where the sanic server is started ininit0/mod1.py
withdebug
enabled and imports another module ininit0
.#1376 <https://github.com/huge-success/sanic/pull/1376>
_ Allow sanic test client to bind to a random port by specifyingport=None
when constructing aSanicTestClient
#1399 <https://github.com/huge-success/sanic/pull/1399>
_ Added the ability to specify middleware on a blueprint group, so that all routes produced from the blueprints in the group have the middleware applied.#1442 <https://github.com/huge-success/sanic/pull/1442>
_ Allow the the use theSANIC_ACCESS_LOG
environment variable to enable/disable the access log when not explicitly passed toapp.run()
. This allows the access log to be disabled for example when running via gunicorn.
Developer infrastructure
#1529 <https://github.com/huge-success/sanic/pull/1529>
_ Update project PyPI credentials#1515 <https://github.com/huge-success/sanic/pull/1515>
_ fix linter issue causing travis build failures (fix #1514)#1490 <https://github.com/huge-success/sanic/pull/1490>
_ Fix python version in doc build#1478 <https://github.com/huge-success/sanic/pull/1478>
_ Upgrade setuptools version and use native docutils in doc build#1464 <https://github.com/huge-success/sanic/pull/1464>
_ Upgrade pytest, and fix caplog unit tests
๐ Improved Documentation
#1516 <https://github.com/huge-success/sanic/pull/1516>
_ Fix typo at the exception documentation#1510 <https://github.com/huge-success/sanic/pull/1510>
_ fix typo in Asyncio example#1486 <https://github.com/huge-success/sanic/pull/1486>
_ Documentation typo#1477 <https://github.com/huge-success/sanic/pull/1477>
_ Fix grammar in README.md#1489 <https://github.com/huge-success/sanic/pull/1489>
_ Added "databases" to the extensions list#1483 <https://github.com/huge-success/sanic/pull/1483>
_ Add sanic-zipkin to extensions list#1487 <https://github.com/huge-success/sanic/pull/1487>
_ Removed link to deleted repo, Sanic-OAuth, from the extensions list#1460 <https://github.com/huge-success/sanic/pull/1460>
_ 18.12 changelog#1449 <https://github.com/huge-success/sanic/pull/1449>
_ Add example of amending request object#1446 <https://github.com/huge-success/sanic/pull/1446>
_ Update README#1444 <https://github.com/huge-success/sanic/pull/1444>
_ Update README#1443 <https://github.com/huge-success/sanic/pull/1443>
_ Update README, including new logo#1440 <https://github.com/huge-success/sanic/pull/1440>
_ fix minor type and pip install instruction mismatch#1424 <https://github.com/huge-success/sanic/pull/1424>
_ Documentation Enhancements
๐ Note: 19.3.0 was skipped for packagement purposes and not released on PyPI