Add change note and tests for omitted owner in proxy descriptor binding - #355
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #352, which made the
ownerargument of__get__()optionalon
AutoObjectProxyandLazyObjectProxy. That PR was merged assubmitted. This adds the release note for it, along with a couple of
additional tests. There are no changes to
src/wrapt/.Changes
in Allow omitted owner in proxy descriptor binding #352.
AutoObjectProxyandLazyObjectProxy, using adescriptor implemented in Python whose
__get__()requires theownerargument. The tests in Allow omitted owner in proxy descriptor binding #352 use a function and a
property, where the__get__()of the wrapped object itself acceptsownerbeing omitted.For a descriptor implemented in Python which requires it, it is the
Nonepassed on by the proxy which makes the one argument form work.The test checks that the wrapped descriptor receives
Noneforownerwhen it is omitted, and that an
ownerwhich is supplied is stillpassed through as is.
test_get_added_on_reassignmentnow also calls__get__()using theone argument form. This covers the case where
__get__()is only addedto the proxy as a result of
__wrapped__being reassigned to adescriptor, where previously the test only checked that the method
existed.
Verification
just testwas run across the full matrix (3.9 to 3.15, three variantseach) against
developafter #352 was merged, and passed. For theadditional tests in this PR,
just test-version 3.13passes in all threevariants. The full matrix was not rerun locally for this PR since only
tests and documentation are changed, and is left to CI.