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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @proxies instead of deepcopy for mutated array helpers #3077

Merged
merged 2 commits into from
Aug 30, 2021

Conversation

honno
Copy link
Member

@honno honno commented Aug 30, 2021

In #3067 @Zac-HD commented that mutating the helper methods docstrings should not effect the original method. I had used copy.deepcopy for this and thought I had tested it... but clearly not, as Sphinx generation in #3065 demonstrates 馃う

This PR simply wraps the valid_tuple_axes and mutually_broadcastable_shapes strategies in @proxies before mutating their __doc__, replacing the use of deepcopy. I've tested this works when extra.array_api also interfaces with the array helpers.

python/typing#865 - CI fails under Python 3.10
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 馃憤

@Zac-HD Zac-HD merged commit 46cf880 into HypothesisWorks:master Aug 30, 2021
@honno honno deleted the honno/numpy-extra-proxies branch September 29, 2021 09:22
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.

None yet

2 participants