wrapt is a Python module for building decorators, function and object wrappers, and runtime monkey patching. It focuses on preserving decorator introspection and signatures, and uses a C extension for performance-critical parts with a pure Python fallback when needed.
Project status
- Actively maintained: The repo shows very recent upstream activity and a sequence of updates culminating in 2.2.2 on 2026-06-20, including multiple 2.2.2 release candidate updates in the preceding days.
- Update cadence: After 2.1.2 on 2026-03-06, there was steady progress in May 2026 (2.2.0 on 2026-05-21, 2.2.1 on 2026-05-22), followed by additional 2.2.2 updates in mid to late June 2026 (RCs on 2026-06-15/16, final on 2026-06-20).
AI summary generated
Recent updates
2.3.0rc1
This release is a release candidate tag for wrapt 2.3.0rc1, intended to become the upcoming 2.3.0 final. The provided release notes mainly describe packaging and how to install the candidate, not functional changes.
2.3.0.dev1
The provided release notes for wrapt 2.3.0.dev1 are minimal, describing this as a development snapshot for pipeline testing and showing how to install the attached wheel or source archive. They do not enumerate any functional or API changes. The repository code diff, however, includes substantive runtime and type-stub updates that are not covered by these notes.
Features2.2.2
Release 2.2.2 of wrapt was published with general installation and packaging notes, but no functional changes are described in the provided release notes excerpt. The actual code diff from 2.2.2rc3 to 2.2.2 shows only an update to version metadata in the package initializer.
2.2.2rc3
wrapt 2.2.2rc3 is published as a release candidate for the upcoming 2.2.2 final. The release notes themselves only explain how to install the RC and verify archives, without listing any functional changes.
2.2.2rc2
This release is a 2.2.2 release candidate, with the provided GitHub release notes being informational only and not listing specific code changes. The actual diff shows a targeted behavior fix in wrapt's per-instance LRU cache handling for ObjectProxy instances.
2.2.2rc1
This release candidate primarily bumps the package version to 2.2.2rc1. The actual code change is in the lru_cache implementation, where the per-instance cache attribute name was altered to prevent infinite recursion scenarios when using @wrapt.lru_cache on overridden instance methods that call super().
2.2.1
The release notes for wrapt 2.2.1 provide only general installation and distribution information, without describing specific code changes. The actual diff compared to 2.2.1rc1 shows a single change to the package version metadata.
2.2.1rc1
This release candidate primarily bumps the package version to 2.2.1rc1 and updates documentation (adding an API reference page and related docs navigation). The code change of substance is in the C extension’s descriptor handling logic for FunctionWrapper-based wrappers. It adjusts how NULL versus Py_None is handled when invoking a wrapped descriptor’s tp_descr_get, addressing a regression in class attribute access behavior.
2.2.0
The release notes for wrapt 2.2.0 are minimal and do not enumerate any functional changes. Code diff between 2.2.0rc12 and 2.2.0 shows only a version tuple adjustment in src/wrapt/__init__.py.
2.2.0rc12
The release notes for wrapt 2.2.0rc12 are minimal, describing this as a release candidate and pointing to the upcoming 2.2.0 final changes page. The provided code diff only updates the package version metadata from 2.2.0 dev1 to 2.2.0 rc12.
2.2.0.dev1
wrapt 2.2.0.dev1 is a development snapshot intended to exercise the release pipeline, with release notes pointing to the in-progress 2.2.0 changelog. The provided release notes do not enumerate any user-facing API changes, fixes, or breaking changes.
Features2.1.2
wrapt 2.1.2 makes several behavior fixes and adds regression tests. The most notable code changes adjust how weakly-referenced wrapped instance methods behave after the instance is garbage collected, and how attribute deletion for __annotations__ is propagated to the wrapped object. Build-test-release CI was also adjusted to restore riscv64 wheel coverage.
Breaking2.1.1
wrapt 2.1.1 is a small maintenance release with no runtime/library logic changes shown in the diff. The changes are focused on packaging and documentation build behavior, including fixing the Read the Docs search UI.
2.1.0
wrapt 2.1.0 updates the package version and refreshes typing support, especially the type stubs for decorator and wrapper behavior on class methods. The repo also removes Python 3.8 from the documented supported versions and adjusts CI/test matrices accordingly.
2.0.1
wrapt 2.0.1 focuses on fixing lazy_import behavior, especially around correctly presenting the proxy as callable or iterable before the target module is imported. It adds an interface keyword argument to guide LazyObjectProxy to inject the expected special methods up front.
Features2.0.0
wrapt 2.0.0 introduces a substantially reworked public API surface in `src/wrapt/__init__.py`, including new exports related to proxies (lazy loading) and a new top-level `partial()` helper. The release notes provided for 2.0.0 are effectively empty (they link only to the PyPI page), so the code diff suggests multiple meaningful changes that are not documented there.
BreakingFeatures1.14.2
wrapt 1.14.2 includes a C-extension bug fix related to reference counting for the PartialCallableObjectProxy type during module initialization. The code diff also shows packaging and CI metadata changes that materially affect supported Python versions, which are not covered by the release notes displayed in the prompt.
Breaking1.17.3
wrapt 1.17.3 introduces a new module layout, including a conditional C-extension import path (via the WRAPT_DISABLE_EXTENSIONS environment variable), plus newly added pure-Python modules for patching and weak references. The core ObjectProxy C implementation also gained/changed special methods, and the post-import hook mechanism was refactored for locking and proxying behavior.
BreakingFeatures1.17.2
wrapt 1.17.2 primarily updates build and packaging outputs, specifically adding universal macOS wheels. It also bumps the library version metadata from 1.17.1 to 1.17.2 and refreshes documentation build configuration to match the new release.
Features1.17.1
wrapt 1.17.1 primarily fixes two issues: packaging wheel availability on macOS after GitHub Actions runner changes, and an incorrect NotImplementedError message related to pickling on ObjectProxy. The code change updates the error text raised by __reduce__ (and the corresponding C implementation) to reference the correct method name.