BSD Ports

devel/py-wrapt 2.4.1 NetBSD

Python module for decorators, wrappers and monkey patching

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
Last update
Commit
3829c67ef7
License
2-clause-bsd
Categories
devel, python
Package size
121.3 KiB, 800.4 KiB installed

Description

A Python module for decorators, wrappers and monkey patching.

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.

In the other systems

SystemPortVersion
NetBSDdevel/py-wrapt2.4.1
FreeBSDdevel/py-wrapt2.4.1
OpenBSDdevel/py-wrapt2.4.1
DragonFlydevel/py-wrapt1.17.2
MidnightBSDdevel/py-wrapt1.16.0_1
HardenedBSDdevel/py-wrapt2.4.1
GhostBSDdevel/py-wrapt2.4.1

Install

Binary package:

pkgin install py311-wrapt

From pkgsrc:

cd /usr/pkgsrc/devel/py-wrapt && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_642.4.1
NetBSD 10.1 aarch642.2.1
SmartOS / illumos x86_642.5.1
macOS 15 arm642.5.0

Dependencies

Run dependencies 1

Configuration

No options to configure.

Service scripts
none
Flavors
py312-wrapt-2.4.1, py313-wrapt-2.4.1, py314-wrapt-2.4.1

Commit history 5

DateCommitCreditsLog message
3829c67ef7 adam py-wrapt: updated to 2.5.1
2.5.1 Bugs Fixed A LazyObjectProxy created with an interface argument that declared a path-like type, such as os.PathLike or pathlib.Path, did not define the __fspath__() special method on the class it generated. Because os.fspath() looks up __fspath__() on the type of the object, passing such a proxy to os.fspath(), the builtin open() or other standard library functions accepting paths raised TypeError before the factory callable had been invoked to create the wrapped object. The __fspath__() special method is now added when the declared interface provides it, in the same way as is already done for the other special methods looked up on the type, so the first path conversion triggers creation of the wrapped object and succeeds. …
43a087e53a adam py-wrapt: updated to 2.5.0
2.5.0 New Features …
0aed9a10e1 adam py-wrapt: updated to 2.4.1
2.4.1 Bugs Fixed The C extension implementation of PartialCallableObjectProxy did not expose the bound positional and keyword arguments supplied when the proxy was created, whereas the pure Python implementation makes them available as the _self_args and _self_kwargs attributes. The C extension implementation now provides read only _self_args and _self_kwargs attributes so that both implementations behave the same. …
248f3f4964 adam py-wrapt: updated to 2.4.0
2.4.0 https://wrapt.readthedocs.io/en/latest/changes.html#version-2-4-0
0b1c65a88c adam py-wrapt: updated to 2.3.0
2.3.0 https://wrapt.readthedocs.io/en/latest/changes.html#version-2-3-0