1.5.0 - Major refactoring and bugfixes
Function creation API:
- renamed all
handler
intoimpl
for clarity. Fixes #27. - renamed
addsource
andaddhandler
arguments asadd_source
andadd_impl
respectively, for consistency - signatures can not be provided as a callable anymore - that was far too confusing. If the reference signature is a callable, then use
@wraps
orcreate_wrapper
, because that's probably what you want to do (= reuse not only the signature but also all metadata). Fixes #26. - the function name is now optional in signatures provided as string.
- now setting
__qualname__
attribute - default function name, qualname, doc and module name are the ones from
func_impl
increate_function
and@with_signature
, and are the ones from the wrapped function increate_wrapper
and@wraps
as intuitively expected. Fixes #28.
Wrappers:
@wraps
andcreate_wrapper
now offer anew_sig
argument. In that case the__wrapped__
attribute is not set. Fixes #25.@wraps
andcreate_wrapper
now correctly preserve the__dict__
and other metadata from the wrapped item. Fixes #24
See documentation page for details.