Releases: dymmond/lilya
Releases · dymmond/lilya
Version 0.12.1
Added
- New SessionContextMiddleware allowing to use the new
session
object
in a request context.
Changed
- Updated the Context section by adding the session context examples and explanation
how to use it.
0.12.0
Added
- Support for Python 3.13.
- Add
ReceiveSendSniffer
. This sniffer allows to detect communication events and to replay receive messages. Include
andBaseLilya
(application) have now a ClassVarrouter_class
to provide a custom router.- Subclasses of
BaseLilya
(application) can set therouter_class
to None to provide a completely custom router
which initialization parameters aren't required to match the ones ofRouter
. - Expose
fall_through
onStaticFile
.
Changed
- The
PathHandler
interface was changed to receive aReceiveSendSniffer
instead ofsend
/receive
. - The
handle_partial
interface was changed to receive aPathHandler
. - Fall-through routing was implemented.
- Expose
redirect_slashes
onInclude
.
Fixed
Host
with middleware or permissions.
Version 0.11.11
Fixed
- Some middleware are not multithreading/async capable.
Version 0.11.10
Added
- Add
passthrough_body_types
for passing memoryviews and bytearrays directly to the application server.
Changed
- TestClient validates more ASGI conformance. It raises an
ASGISpecViolation
error for spec violations whencheck_asgi_conformance
is True (default). - Response's
make_headers
now setheaders
directly. - Response's
headers
is now a attribute. - Response's
raw_headers
is now an alias forencoded_headers
.
Fixed
- Ensure the response output is bytes when not
passthrough_body_types
is set. Defaults to passing through bytes. - Properly handle bytearrays.
- Properly parse header values. Properly handle cases in which header values are passed as an array in a dictionary.
- Properly set cookies.
Version 0.11.9
0.11.9
Added
- Add
session_serializer
,session_deserializer
parameters toSessionMiddleware
.
Changed
- Refactor
SessionMiddleware
. - Refactor authentication.
- Allow multiple backends in
AuthenticationMiddleware
. - Move backend logic from
BaseAuthMiddleware
toAuthenticationMiddleware
. Matches documentation. - Rename BaseUser to UserInterface and make it a protocol. Note: the old name is still available for compatibility reasons.
- Remove undocumented stub definitions from UserInterface. They were unsound.
Fixed
- Authentication documentation referenced non-existing structures.
- Available middleware section in middleware.md was not up to date.
- Fix serialization of primitives in the Response. Strip
"
by default.
Version 0.11.8
Fixed
- Fix too strict json_encoder_fn enforcment.
- Fix empty [] and {} becoming incorrectly an empty response in json context.
Version 0.11.7
Added
- Add bytes encoder to encoders.
- Allow using DefineMiddleware and DefinePermission with import strings.
Changed
- Move simplify logic from
make_response
to Response but keep old interface. - Move esmerald Response
transform
to lilya.
Fixed
- Fix unnecessary roundtrip in JSONResponse.
Version 0.11.6
Added
- Add
redirect
function as a wrapper to returnResponseRedirect
responses. Import happens
insidelilya.responses import redirect
.
Changed
- Make
g
object automatically managed by Lilya middleware. You no longet need to import the
GlobalContextMiddleware
as it is a default Lilya middleware.
Version 0.11.5
Added
RequestContextMiddleware
added allowing request objects being used without a context of a request
without explicitly declaring it inside handlers.
Changed
- Allow multiple directories in
StaticFiles
. This enables providing overwrites/defaults.
Version 0.11.4
Added
GlobalContextMiddleware
the new middleware that allows you to haveg
object across the
request lifecycle and set global variables to be accessed through that same lifecycle.- The g definition and declaration.
Changed
- Remove hard dependency of
dymmond-settings
.