Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Erik Bray
On Mon, Oct 30, 2017 at 4:33 PM, Jeroen Demeyer wrote: > On 2017-10-30 16:28, William Stein wrote: >> >> Not necessarily.Pickle is *the* canonical extensible object >> serialization system for Python. It’s of course very extensible in >> that users can define how

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Jeroen Demeyer
On 2017-10-30 16:28, William Stein wrote: Not necessarily.Pickle is *the* canonical extensible object serialization system for Python. It’s of course very extensible in that users can define how objects pickle, eg by defining a dunder reduce method. As such they can of course make that

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread William Stein
On Mon, Oct 30, 2017 at 8:17 AM Jeroen Demeyer wrote: > Another very relevant question: are pickles supposed to be > hardware/OS-independent? In other words: can I take a pickle from one > machine and unpickle it on a different machine (assuming that the > software

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Jeroen Demeyer
Another very relevant question: are pickles supposed to be hardware/OS-independent? In other words: can I take a pickle from one machine and unpickle it on a different machine (assuming that the software version is the same)? -- You received this message because you are subscribed to the

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Erik Bray
On Mon, Oct 30, 2017 at 3:35 PM, Jeroen Demeyer wrote: > On 2017-10-30 15:12, Erik Bray wrote: >> >> My point, however, is baked directly into the file format--the pickle >> format is very Python version-dependent (there are I think 5 different >> pickle formats now) > > >

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Jeroen Demeyer
On 2017-10-30 15:12, Erik Bray wrote: My point, however, is baked directly into the file format--the pickle format is very Python version-dependent (there are I think 5 different pickle formats now) It's true that the format has changed, but always in a backward-compatible way. For basic

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Jeroen Demeyer
On 2017-10-29 23:14, Travis Scrimshaw wrote: What about any object that does a TestSuite(foo).run()? This guarantees that it pickles (assuming it is not skipping that test) and is an object that someone would create. Sounds like a good idea to me. We could have TestSuite(foo).run() create a

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Jeroen Demeyer
On 2017-10-29 20:22, Simon King wrote: The m*n-fold pickle jar should not pollute the SageMath sources. In that way, a new pickle jar version wouldn't result in a new to-be-merged git commit. Instead, the jar should only be stored on some SageMath servers. I don't like this part. It should be

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Jeroen Demeyer
On 2017-10-30 08:41, Simon King wrote: would you rather have no test at all than a superficial consistency test on a wide range of objects, versions and machines? Yes. A test which doesn't actually test anything is worse than no test. That's exactly the situation that we currently have with

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-30 Thread Erik Bray
On Sun, Oct 29, 2017 at 10:04 AM, Simon King wrote: > Hi Erik, > > On 2017-10-27, Erik Bray wrote: >> Plus, while pickling has many valid runtime use-cases, particularly >> for IPC, and short-term preservation of objects between interpreter >>

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-29 Thread David Roe
I think tying it in with TestSuite(foo).run() is a good idea, but we probably don't want to store pickles for every one (since test suites can be run for multiple elements of the same type). Maybe check to see if a pickle has already been created for a given class, and if not, create one? David

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-29 Thread Travis Scrimshaw
On Monday, October 30, 2017 at 5:46:49 AM UTC+10, Jeroen Demeyer wrote: > > On 2017-10-29 20:22, Simon King wrote: > > As part of the release process of a new version of SageMath, > > a new version of the pickle jar is created by some patchbots > > on m different machines and replaces the m

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-29 Thread William Stein
On Sun, Oct 29, 2017 at 12:46 PM Jeroen Demeyer wrote: > On 2017-10-29 20:22, Simon King wrote: > > As part of the release process of a new version of SageMath, > > a new version of the pickle jar is created by some patchbots > > on m different machines and replaces the m

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-29 Thread Jeroen Demeyer
On 2017-10-29 20:22, Simon King wrote: As part of the release process of a new version of SageMath, a new version of the pickle jar is created by some patchbots on m different machines and replaces the m oldest versions of the pickle jar. That's the easy part. The hard part is deciding what to

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-29 Thread William Stein
On Sun, Oct 29, 2017 at 7:58 AM Dima Pasechnik wrote: > The conventional wisdom is to avoid pickles in favour of JSON (the latter > is a platform-independent human-parseable text, the former is some > Python-only binary stuff). Whether this is a good idea depends a lot on

Re: [sage-devel] Re: Getting rid of the pickle jar

2017-10-29 Thread David Roe
I agree that removing pickles from 6+ years ago is a good idea. I do think, however, that the idea of being able to save objects between versions of Sage is valuable. And we need some way to test it. Maybe we could move to some sort of rolling pickle jar, where we allow deprecations after a