Dynamically create python functions with a proper signature.
BSD-3-CLAUSE License
Bot releases are hidden (Show)
Published by smarie over 3 years ago
@wraps
now offers a remove_params
argument allowing one to remove an argument from the exposed signature, typically to create and inject it in the wrapper. Fixes #60
See documentation page for details.
Published by smarie almost 4 years ago
partial
can now be used to create a copy of a function with no args. Fixed ValueError: Cannot preset 0 positional args, function case_second has only 0 args.
. Fixed #59
See documentation page for details.
Published by smarie about 4 years ago
six
dependency. Note: this version will ship in conda forge.See documentation page for details.
Published by smarie about 4 years ago
@wraps
can now be used to wrap a functools.partial
. Fixed #57
create_function
now correctly reuses information from the partialized function if a functools.partial
is used as the implementation.
create_function
now raises a more explicit error when no func_name
can be found.
makefun.partial
now generates a signature that is more consistent with functools.partial
. Fixes #58
See documentation page for details.
Published by smarie over 4 years ago
setup.py
. In particular removed dependency to six
for setup and added py.typed
file, as well as set the zip_safe
flag to False. Removed tests folder from package. Fixes #54
See documentation page for details.
Published by smarie over 4 years ago
Fixed OSError: could not get source code
or IOError: could not get source code
when @compile_fun
is used on a function that depends on an already-compiled function. Fixed #51
See documentation page for details.
Published by smarie over 4 years ago
@compile_fun
: added capability to disable recursive compilation (recurse
arg) , and to exclude some names from compilation (except_names
arg). Fixed #49 and #50
Fixed issue ValueError: Cell is empty
with @compile_fun
. Fixed #48
Now raising an UndefinedSymbolError
when a symbol is not known at compilation time. One step towards #47
See documentation page for details.
Published by smarie over 4 years ago
New goodie @compile_fun
decorator to compile
a function so that it can not be navigated to using the debugger. Fixes #46
See documentation page for details.
Published by smarie almost 5 years ago
add_signature_parameters
now accepts that one specifies a custom index where to insert the new parameters.
See documentation page for details.
Published by smarie about 5 years ago
Added __version__
attribute to comply with PEP396, following this guide. Fixes #45.
See documentation page for details.
Published by smarie about 5 years ago
Fixed six
dependency: also declared as a setup dependency.
See documentation page for details.
Published by smarie about 5 years ago
Added missing six
dependency explicitly.
See documentation page for details.
Published by smarie over 5 years ago
get_signature_string
(used by all entry points) after profiling.See documentation page for details.
Published by smarie over 5 years ago
attrs
can modify the annotations manually, making signature
return a string representation that is not compliant with the language version. This raised a SyntaxError
in previous versions. The new version silently removes all these annotations in python versions that do not support them. Fixes #39.See documentation page for details.
Published by smarie over 5 years ago
See documentation page for details.
Published by smarie over 5 years ago
NameError
in case of unknown symbols in type hints. Fixes #37.Note also that this includes non-released 1.6.4 changelog
See documentation page for details.
Published by smarie over 5 years ago
Fixed bug when the return type annotation of the function to create contains non-locally available type hints. Fixes #33.
See documentation page for details.
Published by smarie over 5 years ago
Fixed bug when the signature of the function to create contains non-locally available type hints. Fixes #32.
See documentation page for details.
Published by smarie over 5 years ago
Fixed partial
to support missing and empty docstring. Fixes #31.
See documentation page for details.
Published by smarie over 5 years ago
New method partial
that behaves like functools.partial
, and equivalent decorator @with_partial
. Fixes #30.
See documentation page for details.