Path to this page:
./
devel/py-makefun,
Small library to dynamically create Python functions
Branch: CURRENT,
Version: 1.15.6,
Package name: py312-makefun-1.15.6,
Maintainer: pkgsrc-usersmakefun helps you create functions dynamically, with the signature
of your choice. It was largely inspired by decorator and functools,
and created mainly to cover some of their limitations.
The typical use cases are:
* creating signature-preserving function wrappers - just like
functools.wraps but with accurate TypeError exception raising when
user-provided arguments are wrong, and with a very convenient way
to access argument values.
* creating function wrappers that have more or less arguments that
the function they wrap. A bit like functools.partial but a lot more
flexible and friendly for your users. For example, I use it in my
pytest plugins to add a requests parameter to users' tests or
fixtures when they do not already have it.
* more generally, creating functions with a signature derived from
a reference signature,
* or even creating functions with a signature completely defined
at runtime.
Master sites:
Filesize: 70.882 KB
Version history: (Expand)
- (2024-11-10) Updated to version: py312-makefun-1.15.6
- (2024-07-16) Updated to version: py311-makefun-1.15.4
- (2023-11-26) Updated to version: py311-makefun-1.15.2
- (2023-03-12) Package added to pkgsrc.se, version py310-makefun-1.15.1 (created)
CVS history: (Expand)
2024-11-11 08:29:31 by Thomas Klausner | Files touched by this commit (862) |
Log message:
py-*: remove unused tool dependency
py-setuptools includes the py-wheel functionality nowadays
|
2024-11-10 10:16:24 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-makefun: updated to 1.15.6
1.15.6 - compatibility fix
- Fixed issue with legacy python 2.7 and 3.5.
1.15.5 - yanked version
- This version was yanked as the fix declared in the changelog was not actually \
active on the version deployed on PyPi
|
2024-07-16 05:41:29 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-makefun: updated to 1.15.4
1.15.4 - Python 3.13 official support
- Python 3.13 is now supported.
1.15.3 - bugfix
- Fixed `SyntaxError: invalid syntax` happening when the default value of one \
argument of the created function is a
subclass of a basic primitive.
|
2023-11-26 15:22:06 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-makefun: updated to 1.15.2
1.15.2 - bugfix
- Fixed `SyntaxError` happening when the name of a native coroutine function to \
create contains `'return'`.
|
2023-04-30 20:35:37 by Thomas Klausner | Files touched by this commit (1) |
Log message:
py-makefun: not for python 2
|
2023-04-13 14:29:36 by Thomas Klausner | Files touched by this commit (1) |
Log message:
py-makefun: try fixing PLIST for python2
|
2023-03-12 14:39:01 by Thomas Klausner | Files touched by this commit (4) |
Log message:
devel/py-makefun: import py-makefun-1.15.1
makefun helps you create functions dynamically, with the signature
of your choice. It was largely inspired by decorator and functools,
and created mainly to cover some of their limitations.
The typical use cases are:
* creating signature-preserving function wrappers - just like
functools.wraps but with accurate TypeError exception raising when
user-provided arguments are wrong, and with a very convenient way
to access argument values.
* creating function wrappers that have more or less arguments that
the function they wrap. A bit like functools.partial but a lot more
flexible and friendly for your users. For example, I use it in my
pytest plugins to add a requests parameter to users' tests or
fixtures when they do not already have it.
* more generally, creating functions with a signature derived from
a reference signature,
* or even creating functions with a signature completely defined
at runtime.
|