Skip to content

Releases: smarie/python-makefun

1.6.7 - Increased tolerance to function signatures in python 2

17 Apr 10:16
Compare
Choose a tag to compare
  • 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.

1.6.6 - Bug fix

16 Apr 16:16
Compare
Choose a tag to compare
  • Fixed yet another nasty varpositional-related bug :). Fixes #38.

See documentation page for details.

1.6.5 - Bug fix

16 Apr 14:39
Compare
Choose a tag to compare
  • 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.

1.6.3 - Bug fix with type hints in signature

11 Apr 16:18
Compare
Choose a tag to compare

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.

1.6.2 - Bug fix with type hints in signature

26 Mar 14:27
Compare
Choose a tag to compare

Fixed bug when the signature of the function to create contains non-locally available type hints. Fixes #32.

See documentation page for details.

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

18 Mar 16:45
Compare
Choose a tag to compare

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

See documentation page for details.

1.6.0 - added `with_partial` and `partial`

14 Mar 14:48
Compare
Choose a tag to compare

New method partial that behaves like functools.partial, and equivalent decorator @with_partial. Fixes #30.

See documentation page for details.

1.5.1 - bug fix

13 Mar 17:43
Compare
Choose a tag to compare

add_signature_parameters now correctly inserts parameters in the right order when they are prepended (using first=). Fixed #29.

See documentation page for details.

1.5.0 - Major refactoring and bugfixes

13 Mar 13:02
Compare
Choose a tag to compare

Function creation API:

  • renamed all handler into impl for clarity. Fixes #27.
  • renamed addsource and addhandler arguments as add_source and add_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 or create_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 in create_function and @with_signature, and are the ones from the wrapped function in create_wrapper and @wraps as intuitively expected. Fixes #28.

Wrappers:

  • @wraps and create_wrapper now offer a new_sig argument. In that case the __wrapped__ attribute is not set. Fixes #25.
  • @wraps and create_wrapper now correctly preserve the __dict__ and other metadata from the wrapped item. Fixes #24

See documentation page for details.

1.4.0 - Non-representable default values are now handled correctly

11 Mar 17:13
Compare
Choose a tag to compare

When a non-representable default value was used in the signature to generate, the code failed with a SyntaxError. This case is now correctly handled, by storing the corresponding variable in the generated function's context. Fixes #23.

See documentation page for details.