<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">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">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div>