From 953e860f31a1abdd728ad769a32ca52f3bb1581d Mon Sep 17 00:00:00 2001 From: Mike McKerns Date: Fri, 28 Jun 2013 09:42:28 -0700 Subject: [PATCH 1/4] Initial commit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..d6049265 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +dill +==== + +serialize all of python From eb9b240744ba7e78b3476b731ec5bf1ddca68112 Mon Sep 17 00:00:00 2001 From: Mike McKerns Date: Thu, 11 Jul 2013 10:26:28 -0700 Subject: [PATCH 2/4] merged changes to README.md from svn --- README.md | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d6049265..f1d7b1df 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,102 @@ dill ==== - serialize all of python + +About Dill +---------- +Dill extends python's 'pickle' module for serializing and de-serializing +python objects to the majority of the built-in python types. Serialization +is the process of converting an object to a byte stream, and the inverse +of which is converting a byte stream back to on python object hierarchy. + +Dill provides the user the same interface as the 'pickle' module, and +also includes some additional features. In addition to pickling python +objects, dill provides the ability to save the state of an interpreter +session in a single command. Hence, it would be feasable to save a +interpreter session, close the interpreter, ship the pickled file to +another computer, open a new interpreter, unpickle the session and +thus continue from the 'saved' state of the original interpreter +session. + +Dill can be used to store python objects to a file, but the primary +usage is to send python objects across the network as a byte stream. +Dill is quite flexible, and allows arbitrary user defined classes +and funcitons to be serialized. Thus dill is not intended to be +secure against erroneously or maliciously constructed data. It is +left to the user to decide whether the data they unpickle is from +a trustworthy source. + +Dill is part of pathos, a python framework for heterogenous computing. +Dill is in the early development stages, and any user feedback is +highly appreciated. Contact Mike McKerns [mmckerns at caltech dot edu] +with comments, suggestions, and any bugs you may find. A list of known +issues is maintained at http://trac.mystic.cacr.caltech.edu/project/pathos/query. + + +Major Features +-------------- +Dill can pickle the following standard types:: + * none, type, bool, int, long, float, complex, str, unicode, + * tuple, list, dict, file, buffer, builtin, + * both old and new style classes, + * instances of old and new style classes, + * set, frozenset, array, functions, exceptions + +Dill can also pickle more 'exotic' standard types:: + * functions with yields, nested functions, lambdas + * cell, method, unboundmethod, module, code, + * dictproxy, methoddescriptor, getsetdescriptor, memberdescriptor, + * wrapperdescriptor, xrange, slice, + * notimplemented, ellipsis, quit + +Dill cannot yet pickle these standard types:: + * frame, generator, traceback + +Dill also provides the capability to:: + * save and load python interpreter sessions + +Current Release +--------------- +The latest released version of dill is available from:: + http://trac.mystic.cacr.caltech.edu/project/pathos + +Dill is distributed under a modified BSD license. + +Development Release +------------------- +You can get the latest development release with all the shiny new features at:: + http://dev.danse.us/packages. + +or even better, fork us on our github mirror of the svn trunk:: + https://github.com/uqfoundation + +Citation +-------- +If you use dill to do research that leads to publication, we ask that you +acknowledge use of dill by citing the following in your publication:: + + M.M. McKerns, L. Strand, T. Sullivan, A. Fang, M.A.G. Aivazis, + "Building a framework for predictive science", Proceedings of + the 10th Python in Science Conference, 2011; + http://arxiv.org/pdf/1202.1056 + + Michael McKerns and Michael Aivazis, + "pathos: a framework for heterogeneous computing", 2010- ; + http://trac.mystic.cacr.caltech.edu/project/pathos + +More Information +---------------- +Probably the best way to get started is to look at the tests +that are provide within dill. See `dill.tests` for a set of scripts +that test dill's ability to serialize different python objects. +Since dill conforms to the 'pickle' interface, the examples and +documentation at http://docs.python.org/library/pickle.html also +apply to dill if one will `import dill as pickle`. Dill's source code is also generally well documented, +so further questions may be resolved by inspecting the code itself, or through +browsing the reference manual. For those who like to leap before +they look, you can jump right to the installation instructions. If the aforementioned documents +do not adequately address your needs, please send us feedback. + +Dill is an active research tool. There are a growing number of publications and presentations that +discuss real-world examples and new features of dill in greater detail than presented in the user's guide. +If you would like to share how you use dill in your work, please send us a link. From 3d50bce43d2234406bdf50be6c12ea85588a9b4d Mon Sep 17 00:00:00 2001 From: Mike McKerns Date: Thu, 11 Jul 2013 11:22:37 -0700 Subject: [PATCH 3/4] fixed formatting in README.md --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f1d7b1df..485fab99 100644 --- a/README.md +++ b/README.md @@ -36,24 +36,28 @@ issues is maintained at http://trac.mystic.cacr.caltech.edu/project/pathos/query Major Features -------------- Dill can pickle the following standard types:: - * none, type, bool, int, long, float, complex, str, unicode, - * tuple, list, dict, file, buffer, builtin, - * both old and new style classes, - * instances of old and new style classes, - * set, frozenset, array, functions, exceptions + +* none, type, bool, int, long, float, complex, str, unicode, +* tuple, list, dict, file, buffer, builtin, +* both old and new style classes, +* instances of old and new style classes, +* set, frozenset, array, functions, exceptions Dill can also pickle more 'exotic' standard types:: - * functions with yields, nested functions, lambdas - * cell, method, unboundmethod, module, code, - * dictproxy, methoddescriptor, getsetdescriptor, memberdescriptor, - * wrapperdescriptor, xrange, slice, - * notimplemented, ellipsis, quit + +* functions with yields, nested functions, lambdas +* cell, method, unboundmethod, module, code, +* dictproxy, methoddescriptor, getsetdescriptor, memberdescriptor, +* wrapperdescriptor, xrange, slice, +* notimplemented, ellipsis, quit Dill cannot yet pickle these standard types:: - * frame, generator, traceback + +* frame, generator, traceback Dill also provides the capability to:: - * save and load python interpreter sessions + +* save and load python interpreter sessions Current Release --------------- From d797b0be1ae67a18b0a4a1c865caef97ab714096 Mon Sep 17 00:00:00 2001 From: roryk Date: Wed, 23 Oct 2013 01:04:39 -0400 Subject: [PATCH 4/4] Fixed _IS_PY3 typo. --- dill/dill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dill/dill.py b/dill/dill.py index 429766a6..84d97025 100644 --- a/dill/dill.py +++ b/dill/dill.py @@ -434,7 +434,7 @@ def save_module_dict(pickler, obj): pickler.write('c__builtin__\n__main__\n') elif not is_dill(pickler) and obj is _main_module.__dict__: log.info("D3: