Skip to content

Releases: smarie/python-makefun

1.12.0 - Refactoring and consistency improvement

08 Oct 08:22
Compare
Choose a tag to compare
  • Fixed partial so that :
    • when no argument is provided, it is equivalent to wraps(f)(f). That is, the __wrapped__ attribute is set. Fixed #73
    • it sets the func attribute just as functools.partial does. Fixed #75
  • Removed pytest-cases dependency as it was a circular one. Fixed #68
  • Now using flake8 for qualimetry and genbadge for badges. Fixed #71
  • Restructured project so that tests are truly independent, to ease rpm/apt/etc. packaging. Fixed #69

See documentation page for details.

1.11.3 - bugfix with default values representable but not evaluable

08 Apr 09:11
Compare
Choose a tag to compare
  • When a default value v in a signature is representable but its eval(repr(v)) raises an exception, created signatures would raise an exception instead of automatically protecting the symbol. PR #67 by gcalmettes.

See documentation page for details.

1.11.2 - bugfix with chained `@wraps`

17 Mar 17:23
Compare
Choose a tag to compare
  • Fixed issue where @wraps does not remove the __wrapped__ attribute when it wraps an already-wrapped function, and modifies its signature. Fixes #66

See documentation page for details.

1.11.1 - bugfix

16 Mar 11:42
Compare
Choose a tag to compare
  • Fixed a bug happening when trying to generate a function where float('inf') is used as a default value. Fixes #63.

See documentation page for details.

1.11.0 - `partial` bugfixes and improvements + new `wraps` parameters

16 Mar 10:46
Compare
Choose a tag to compare
  • @wraps now has new arguments prepend_arg and append_arg to quickly prepend or append a new parameter to a function signature. Fixes #65

  • add_signature_parameters can now receive string parameter names in its first and last arguments.

  • Improved generated docstring for partial with better support for preset positional args.

  • partial's behaviour is now aligned with the one in functools.partial in terms of arguments order and kind. Fixes #64

  • Bug fix: passing preset positional arguments to partial does not wipe out the rest of the signature any more. Fixes #62

See documentation page for details.

1.10.2 - Github actions test

10 Mar 17:05
Compare
Choose a tag to compare
  • Technical release: validation of the new github actions workflow.

See documentation page for details.

1.10.1 - Github actions migration

10 Mar 16:46
Compare
Choose a tag to compare
  • Technical release: validation of the new github actions workflow for PyPi deployment.

See documentation page for details.

1.10.0 - Removing arguments easily in `@wraps`

05 Mar 23:21
Compare
Choose a tag to compare
  • @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.

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

02 Dec 16:03
Compare
Choose a tag to compare
  • 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.

1.9.4 - removed six dependency

05 Oct 09:03
Compare
Choose a tag to compare
  • Removed unused six dependency. Note: this version will ship in conda forge.

See documentation page for details.