On Mon, 9 Oct 2023 at 22:30, Nathan <nathan.goldb...@gmail.com> wrote: > > On Mon, Oct 9, 2023 at 3:12 PM Oscar Benjamin <oscar.j.benja...@gmail.com> > wrote: >> >> On Mon, 9 Oct 2023 at 21:57, Nathan <nathan.goldb...@gmail.com> wrote: >> > >> > On Mon, Oct 9, 2023 at 2:44 PM Oscar Benjamin <oscar.j.benja...@gmail.com> >> > wrote: >> >> Suppose that there is NumPy v1 and that in future there will be NumPy >> >> v2. Also suppose that there will be two NumPy pickle formats fmtA and >> >> a future fmtB. One possibility is that NumPy v1 only reads and writes >> >> fmtA and then NumPy v2 only reads and writes fmtB. One problem with >> >> this is that when NumPy v2 comes out there is no easy way to convert >> >> pickles from fmtA to fmtB for compatibility with NumPy v2. Another >> >> problem with this is that it does not make a nice transition during >> >> any period of time when both NumPy v1 and v2 might be used in >> >> different parts of a software stack. >> > >> > Doesn't NumpyUnpickler solve this? It will be present in both v1 and v2 >> > and will allow loading files either np.core or np._core in either version. >> >> I guess that makes it possible in some way to convert formats in >> either version. I presume though that this still means that a plain >> pickle.loads() (and any code built on top of such) would fail in v2. > > In Numpy2.0 you would see a deprecation warning about the path in the pickle > file but no crash. Eventually, when we finally remove the stub np.core, you > would see a crash.
Okay, that makes sense. What happens in the reverse scenario: loading a pickle generated by NumPy 2.0 using NumPy 1.x? -- Oscar _______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com