Wrapt

Latest version: v1.17.2

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

1.12.0

--------------

**Features Changed**

* Provided that you only want to support Python 3.7, when deriving from
a base class which has a decorator applied to it, you no longer need
to access the true type of the base class using ``__wrapped__`` in
the inherited class list of the derived class.

**Bugs Fixed**

* When using the ``synchronized`` decorator on instance methods of a
class, if the class declared special methods to override the result for
when the class instance was tested as a boolean so that it returned
``False`` all the time, the synchronized method would fail when called.

* When using an adapter function to change the signature of the decorated
function, ``inspect.signature()`` was returning the wrong signature
when an instance method was inspected by accessing the method via the
class type.

1.11.2

--------------

**Bugs Fixed**

* Fix possible crash when garbage collection kicks in when invoking a
destructor of wrapped object.

1.11.1

--------------

**Bugs Fixed**

* Fixed memory leak in C extension variant of ``PartialCallableObjectProxy``
class introduced in 1.11.0, when it was being used to perform binding,
when a call of an instance method was made through the class type, and
the self object passed explicitly as first argument.

* The C extension variant of the ``PartialCallableObjectProxy`` class
introduced in 1.11.0, which is a version of ``functools.partial``
which correctly handles binding when applied to methods of classes,
couldn't be used when no positional arguments were supplied.

* When the C extension variant of ``PartialCallableObjectProxy`` was
used and multiple positional arguments were supplied, the first
argument would be replicated and used to all arguments, instead of
correct values, when the partial was called.

* When the C extension variant of ``PartialCallableObjectProxy`` was
used and keyword arguments were supplied, it would fail as was
incorrectly using the positional arguments where the keyword arguments
should have been used.

1.11.0

--------------

**Bugs Fixed**

* When using arithmetic operations through a proxy object, checks about
the types of arguments were not being performed correctly, which could
result in an exception being raised to indicate that a proxy object had
not been initialised when in fact the argument wasn't even an instance
of a proxy object.

Because an incorrect cast in C level code was being performed and
an attribute in memory checked on the basis of it being a type different
to what it actually was, technically it may have resulted in a process
crash if the size of the object was smaller than the type being casted
to.

* The ``__complex__()`` special method wasn't implemented and using
``complex()`` on a proxy object would give wrong results or fail.

* When using the C extension, if an exception was raised when using inplace
or, ie., ``|=``, the error condition wasn't being correctly propagated
back which would result in an exception showing up as wrong location
in subsequent code.

* Type of ``long`` was used instead of ``Py_hash_t`` for Python 3.3+. This
caused compiler warnings on Windows, which depending on what locale was
set to, would cause pip to fail when installing the package.

* If calling ``Class.instancemethod`` and passing ``self`` explicitly, the
ability to access ``__name__`` and ``__module__`` on the final bound
method were not preserved. This was due to a ``partial`` being used for
this special case, and it doesn't preserve introspection.

* Fixed typo in the getter property of ``ObjectProxy`` for accessing
``__annotations__``. Appeared that it was still working as would fall back
to using generic ``__getattr__()`` to access attribute on wrapped object.

**Features Changed**

* Dropped support for Python 2.6 and 3.3.

* If ``copy.copy()`` or ``copy.deepcopy()`` is used on an instance of the
``ObjectProxy`` class, a ``NotImplementedError`` exception is raised, with
a message indicating that the object proxy must implement the
``__copy__()`` or ``__deepcopy__()`` method. This is in place of the
default ``TypeError`` exception with message indicating a pickle error.

* If ``pickle.dump()`` or ``pickle.dumps()`` is used on an instance of the
``ObjectProxy`` class, a ``NotImplementedError`` exception is raised, with
a message indicating that the object proxy must implement the
``__reduce_ex__()`` method. This is in place of the default ``TypeError``
exception with message indicating a pickle error.

1.10.11

---------------

**Bugs Fixed**

* When wrapping a ``classmethod`` in a class used as a base class, when
the method was called via the derived class type, the base class type was
being passed for the ``cls`` argument instead of the derived class type
through which the call was made.

**New Features**

* The C extension can be disabled at runtime by setting the environment
variable ``WRAPT_DISABLE_EXTENSIONS``. This may be necessary where there
is currently a difference in behaviour between pure Python implementation
and C extension and the C extension isn't having the desired result.

1.10.10

---------------

**Features Changed**

* Added back missing description and categorisations when releasing to PyPi.

Page 3 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.