Port variant py39
Summary Decorators, wrappers and monkey patching (3.9)
Package version 1.14.1
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants py310
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 08 MAY 2022, 14:37:35 UTC
Port created 29 NOV 2020, 06:56:42 UTC
Subpackage Descriptions
single wrapt ===== |Actions| |PyPI| The aim of the **wrapt** module is to provide a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions. The **wrapt** module focuses very much on correctness. It therefore goes way beyond existing mechanisms such as ``functools.wraps()`` to ensure that decorators preserve introspectability, signatures, type checking abilities etc. The decorators that can be constructed using this module will work in far more scenarios than typical decorators and provide more predictable and consistent behaviour. To ensure that the overhead is as minimal as possible, a C extension module is used for performance critical components. An automatic fallback to a pure Python implementation is also provided where a target system does not have a compiler to allow the C extension to be compiled. Documentation ------------- For further information on the **wrapt** module see: * Quick Start ----------- To implement your decorator you need to first define a wrapper function. This will be called each time a decorated function is called. The wrapper function needs to take four positional arguments: * wrapped - The wrapped function which in turns needs to be called by your wrapper function. * instance - The object to which the wrapped function was bound when it was called. * args - The list of positional arguments supplied when the decorated function was called. * kwargs - The dictionary of keyword arguments supplied when the decorated function was called. The wrapper function would do whatever it needs to, but would usually in turn call the wrapped function that is passed in via the wrapped argument. The decorator ``@wrapt.decorator`` then needs to be applied to the wrapper function to convert it into a decorator which can in turn be applied to other functions.
Configuration Switches (platform-specific settings discarded)
PY310 OFF Build using Python 3.10 PY39 ON Build using Python 3.9
Package Dependencies by Type
Build (only) python-setuptools:single:py39
Build and Runtime python-setuptools:single:py39
Download groups
main mirror://PYPI/w/wrapt
Distribution File Information
380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d 50890 wrapt-1.14.1.tar.gz
Ports that require python-wrapt:py39
python-Deprecated:py39 Implements @deprecated decorator (3.9)
python-astroid:py39 Abstract syntax tree with inference support (3.9)