<div dir="auto">I agree with Stephan, but even 3 seems dangerous to me. Any code that wraps a numpy function and accepts a `copy` parameter (especially `__array_function__`) is likely to contain `if copy` somewhere, which would result in entirely (but likely silently) the wrong behavior for `copy="never"`. An important reason for the original `np.never_copy` suggestion the first time this was discussed is that it can overload `__bool__` to raise or return `False` and warn, which would make silent bad behavior visible one way or another.<div dir="auto"><br></div><div dir="auto">I think a short NEP might be in order here, just so we can make sure we've addressed everything that came up the previous time this was discussed.<br><div dir="auto"><br></div><div dir="auto">Eric.<br><div dir="auto"><br></div><div dir="auto"><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 16, 2021, 23:00 Stephan Hoyer <<a href="mailto:shoyer@gmail.com">shoyer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">On Wed, Jun 16, 2021 at 1:01 PM Sebastian Berg <<a href="mailto:sebastian@sipsolutions.net" target="_blank" rel="noreferrer">sebastian@sipsolutions.net</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2. We introduce `copy="never"`, `copy="if_needed"` and `copy="always"`<br>
   as strings (all other strings will be a `TypeError`):<br>
<br>
   * Problem: `copy="never"` currently means `copy=True` (the opposite)<br>
               Which means new code has to take care when it may run on<br>
               older NumPy versions.  And in theory could make old code<br>
               return the wrong thing.<br></blockquote><div><br></div><div>To me, this seems like a big problem.</div><div><br></div><div>People try to use newer NumPy features on old versions of NumPy all the time. This works out OK if they get error messages, but we shouldn't add new features that silently do something else on old versions -- especially for recent old versions.</div><div><br></div><div>In particular, both copy='if_needed' and copy='never' would mean copy='always' on old versions of NumPy. This seems bad -- basically the exact opposite of what the user explicitly requested. These sort of bugs can be quite challenging to track down.</div><div><br></div><div>So in my opinion (1) and (3) are the only real options.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3. Same as 2. But we take it very slow: Make strings an error right now<br>
   and only introduce the new options after two releases as per typical<br>
   deprecation policy.<br>
<br>
<br>
## Discussion<br>
<br>
We discussed it briefly today in the triage call and we were leaning<br>
towards strings.  <br>
<br>
I was honestly expecting to converge to option 3 to avoid compatibility<br>
issues (mainly surprises with `copy="never"` on older versions).<br>
But considering how weird it is to currently pass `copy="never"`, the<br>
question was whether we should not change it with a release note.<br>
<br>
The probability of someone currently passing exactly one of those three<br>
(and no other) strings seems exceedingly small.<br>
<br>
Personally, I don't have a much of an opinion.  But if *nobody* voices<br>
any concern about just changing the meaning of the string inputs, I<br>
think the current default may be to just do it.<br>
<br>
Cheers,<br>
<br>
Sebastian<br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank" rel="noreferrer">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank" rel="noreferrer">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div>