python-makefun

Dynamically create python functions with a proper signature.

BSD-3-CLAUSE License

Downloads
13.2M
Stars
119
Committers
10

Bot releases are hidden (Show)

python-makefun - 1.10.0 - Removing arguments easily in `@wraps`

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.

python-makefun - 1.9.5 - Bugfix with `partial` when f has no args

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.

python-makefun - 1.9.4 - removed six dependency

Published by smarie about 4 years ago

  • Removed unused six dependency. Note: this version will ship in conda forge.

See documentation page for details.

python-makefun - 1.9.3 - Minor compatibility fixes with functools.partial

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.

python-makefun - 1.9.2 - packaging improvements

Published by smarie over 4 years ago

  • packaging improvements: set the "universal wheel" flag to 1, and cleaned up the 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.

python-makefun - 1.9.1 - `@compile_fun` bugfix

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.

python-makefun - 1.9.0 - `@compile_fun` improvements, bugfix and better exception

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.

python-makefun - 1.8.0 - new `@compile_fun` goodie

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.

python-makefun - 1.7.0 - minor goodies update

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.

python-makefun - 1.6.11 - Added __version__ attribute

Published by smarie about 5 years ago

Added __version__ attribute to comply with PEP396, following this guide. Fixes #45.

See documentation page for details.

python-makefun - 1.6.10 - Fixed dependencies 2

Published by smarie about 5 years ago

Fixed six dependency: also declared as a setup dependency.

See documentation page for details.

python-makefun - 1.6.9 - Fixed dependencies

Published by smarie about 5 years ago

Added missing six dependency explicitly.

See documentation page for details.

python-makefun - 1.6.8 - Improved performance

Published by smarie over 5 years ago

  • Improved performance of inner method get_signature_string (used by all entry points) after profiling.

See documentation page for details.

python-makefun - 1.6.7 - Increased tolerance to function signatures in python 2

Published by smarie over 5 years ago

  • In python 2 some libraries such as 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.

python-makefun - 1.6.6 - Bug fix

Published by smarie over 5 years ago

  • Fixed yet another nasty varpositional-related bug :). Fixes #38.

See documentation page for details.

python-makefun - 1.6.5 - Bug fix

Published by smarie over 5 years ago

  • Fixed NameError in case of unknown symbols in type hints. Fixes #37.

Note also that this includes non-released 1.6.4 changelog

  • Fixed PEP8 error in source code. Fixes #35.

  • Now string signatures can contain a colon. Fixes #36

See documentation page for details.

python-makefun - 1.6.3 - Bug fix with type hints in signature

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.

python-makefun - 1.6.2 - Bug fix with type hints in signature

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.

python-makefun - 1.6.1 - `with_partial` and `partial` minor bug fix

Published by smarie over 5 years ago

Fixed partial to support missing and empty docstring. Fixes #31.

See documentation page for details.

python-makefun - 1.6.0 - added `with_partial` and `partial`

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.

Package Rankings
Top 13.26% on Alpine-edge
Top 3.26% on Pypi.org
Top 11.26% on Alpine-v3.18
Top 11.84% on Alpine-v3.15
Top 13.13% on Alpine-v3.16
Top 14.78% on Alpine-v3.17
Top 27.79% on Conda-forge.org
Badges
Extracted from project README
Python versions Build Status Tests Status Coverage Status codecov Flake8 Status Documentation PyPI Downloads Downloads per week GitHub stars