Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wrapt to 1.17.1 #839

Closed
wants to merge 1 commit into from
Closed

Conversation

pyup-bot
Copy link
Collaborator

This PR updates wrapt from 1.15.0 to 1.17.1.

Changelog

1.17.1

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

**Bugs Fixed**

* Due to GitHub actions changes, binary wheels were missing for macOS Intel.

* Not implemented error for `__reduce__()` on `ObjectProxy` was incorrectly
displaying the error as being on `__reduce_ex__()`.

1.17.0

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

Note that version 1.17.0 drops support for Python 3.6 and 3.7. Python version
3.8 or later is required.

**New Features**

* Add `__format__()` method to `ObjectProxy` class to allow formatting of
wrapped object.

* Added C extension internal flag to indicate that `wrapt` should be safe for
Python 3.13 free threading mode. Releases will include free threading variants
of Python wheels. Note that as free threading is new, one should be cautious
about using it in production until it has been more widely tested.

**Bugs Fixed**

* When a normal function or builtin function which had `wrapt.decorator` or a
function wrapper applied, was assigned as a class attribute, and the function
attribute called via the class or an instance of the class, an additional
argument was being passed, inserted as the first argument, which was the class
or instance. This was not the correct behaviour and the class or instance
should not have been passed as the first argument.

* When an instance of a callable class object was wrapped which didn't not have
a `__get__()` method for binding, and it was called in context whhere binding
would be attempted, it would fail with error that `__get__()` did not exist
when instead it should have been called directly, ignoring that binding was
not possible. 

* The `__round__` hook for the object proxy didn't accept `ndigits` argument.

1.16.0

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

Note that version 1.16.0 drops support for Python 2.7 and 3.5. Python version
3.6 or later is required.

**New Features**

* The ``patch_function_wrapper()`` decorator now accepts an ``enabled``
argument, which can be a literal boolean value, object that evaluates as
boolean, or a callable object which returns a boolean. In the case of a
callable, determination of whether the wrapper is invoked will be left until
the point of the call. In the other cases, the wrapper will not be applied if
the value evaluates false at the point of applying the wrapper.

**Features Changed**

* The import hook loader and finder objects are now implemented as transparent
object proxies so they properly proxy pass access to attributes/functions of
the wrapped loader or finder.

* Code files in the implementation have been reorganized such that the pure
Python version of the ``ObjectProxy`` class is directly available even if the
C extension variant is being used. This is to allow the pure Python variant to
be used in exceptional cases where the C extension variant is not fully
compatible with the pure Python implementation and the behaviour of the pure
Python variant is what is required. This should only be relied upon if have
absolutely no choice. The pure Python variant is not as performant as the C
extension.

To access the pure Python variant use ``from wrapt.wrappers import ObjectProxy``
instead of just ``from wrapt import ObjectProxy``. Note that prior to this
version if you had used ``from wrapt.wrappers import ObjectProxy`` you would
have got the C extension variant of the class rather than the pure Python
version if the C extension variant was available.

**Bugs Fixed**

* It was not possible to update the ``__class__`` attribute through the
transparent object proxy when relying on the C implementation.
Links

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #842

@pyup-bot pyup-bot closed this Jan 14, 2025
@vEpiphyte vEpiphyte deleted the pyup-update-wrapt-1.15.0-to-1.17.1 branch January 14, 2025 12:56
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