Skip to content

Update wrapt to 1.13.1#284

Closed
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-wrapt-1.11.2-to-1.13.1
Closed

Update wrapt to 1.13.1#284
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-wrapt-1.11.2-to-1.13.1

Conversation

@pyup-bot
Copy link
Copy Markdown
Collaborator

@pyup-bot pyup-bot commented Oct 5, 2021

This PR updates wrapt from 1.11.2 to 1.13.1.

Changelog

1.13.1

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

**Bugs Fixed**

* Fix Python version constraint so PyPi classifier for ``pip`` requires
Python 2.7 or Python 3.5+.

1.13.0

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

**Bugs Fixed**

* When a reference to a class method was taken out of a class, and then
wrapped in a function wrapper, and called, the class type was not being
passed as the instance argument, but as the first argument in args,
with the instance being ``None``. The class type should have been passed
as the instance argument.

* If supplying an adapter function for a signature changing decorator
using input in the form of a function argument specification, name lookup
exceptions would occur where the adaptor function had annotations which
referenced non builtin Python types. Although the issues have been
addressed where using input data in the format usually returned by
``inspect.getfullargspec()`` to pass the function argument specification,
you can still have problems when supplying a function signature as
string. In the latter case only Python builtin types can be referenced
in annotations.

* When a decorator was applied on top of a data/non-data descriptor in a
class definition, the call to the special method ``__set_name__()`` to
notify the descriptor of the variable name was not being propogated. Note
that this issue has been addressed in the ``FunctionWrapper`` used by
``wrapt.decorator`` but has not been applied to the generic
``ObjectProxy`` class. If using ``ObjectProxy`` directly to construct a
custom wrapper which is applied to a descriptor, you will need to
propogate the ``__set_name__()`` call yourself if required.

* The ``issubclass()`` builtin method would give incorrect results when used
with a class which had a decorator applied to it. Note that this has only
been able to be fixed for Python 3.7+. Also, due to what is arguably a
bug (https://bugs.python.org/issue44847) in the Python standard library,
you will still have problems when the class heirarchy uses a base class
which has the ``abc.ABCMeta`` metaclass. In this later case an exception
will be raised of ``TypeError: issubclass() arg 1 must be a class``.

1.12.1

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

**Bugs Fixed**

* Applying a function wrapper to a static method of a class using the
``wrap_function_wrapper()`` function, or wrapper for the same, wasn't
being done correctly when the static method was the immediate child of
the target object. It was working when the name path had multiple name
components. A failure would subsequently occur when the static method
was called via an instance of the class, rather than the class.

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.
Links

@pyup-bot pyup-bot mentioned this pull request Oct 5, 2021
@pyup-bot
Copy link
Copy Markdown
Collaborator Author

Closing this in favor of #293

@pyup-bot pyup-bot closed this Oct 13, 2021
@matthew29tang matthew29tang deleted the pyup-update-wrapt-1.11.2-to-1.13.1 branch October 13, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant