With `dill`, you can serialize almost anything in python, even an entire interpreter session. If you encounter any pickling failures, `dill` also has some good tools to help you discover why your object fails to pickle.
`dill` installs with `pip`:
`$ pip install dill`
`dill` requires:
`- python or pypy, >=3.7`
Optional requirements:
`- pyreadline, >=1.7.1` (install with `$ pip install dill[readline]`)
`- objgraph, >=1.7.2` (install with `$ pip install dill[graph]`)
`dill` is licensed under 3-clause BSD:
>>> import dill
>>> print (dill.license())
To cite `dill`:
>>> import dill
>>> print (dill.citation())
What's Changed
* adjust save_code and _create_code for co_lnotab in PEP626 by mmckerns in https://github.com/uqfoundation/dill/pull/495
* Remove unused variable by albertvillanova in https://github.com/uqfoundation/dill/pull/484
* Lookup __qualname__ instead of __name__ in Python 3 by anivegesana in https://github.com/uqfoundation/dill/pull/486
* Support PyCapsule by anivegesana in https://github.com/uqfoundation/dill/pull/477
* tests: fix a test for session saving by leogama in https://github.com/uqfoundation/dill/pull/492
* Fix `dill._dill` submodule being saved as `GLOBAL "dill._shims" "_dill"` by leogama in https://github.com/uqfoundation/dill/pull/490
* Create a soft_def shim to combine move_to and Getattr by anivegesana in https://github.com/uqfoundation/dill/pull/473
* Incidental implementation specific types by anivegesana in https://github.com/uqfoundation/dill/pull/472
* Fix bug in pickling MappingProxyType in PyPy 3.7+ by anivegesana in https://github.com/uqfoundation/dill/pull/506
* Bring back old method pickling function by anivegesana in https://github.com/uqfoundation/dill/pull/511
* correct failures, registered, and succeeds by mmckerns in https://github.com/uqfoundation/dill/pull/519
* Add detailed trace mode showing saved object size and visual depth level by leogama in https://github.com/uqfoundation/dill/pull/471
* Kickstart support drop for Python < 3.7 by leogama in https://github.com/uqfoundation/dill/pull/499
* Rewrite _create_code() with Structural Pattern Matching (limited to tuples) by leogama in https://github.com/uqfoundation/dill/pull/496
* Fix tox tests so they will actually fail by AdamWill in https://github.com/uqfoundation/dill/pull/524
* Fix load_session() and restrict loading a session in a different module by leogama in https://github.com/uqfoundation/dill/pull/507
* fix dump_module() bugs and rename parameter 'main' to 'module' by leogama in https://github.com/uqfoundation/dill/pull/526
* A temporary quick fix for dataclass serialization (500) by anivegesana in https://github.com/uqfoundation/dill/pull/503
* Move session-related code to new session module by leogama in https://github.com/uqfoundation/dill/pull/530
* Temporary quick fix for getsource() on IPython interpreter (fixes 346) by leogama in https://github.com/uqfoundation/dill/pull/531
* Fix pickling errors thrown when saving some Stdlib modules by leogama in https://github.com/uqfoundation/dill/pull/529
* Fix `pickles()` flagging `__builtins__` as unpickleable due to the `all()` function by leogama in https://github.com/uqfoundation/dill/pull/538
* Use proper SPDX identifier for License by Shortfinga in https://github.com/uqfoundation/dill/pull/539
* Disable logging propagation, use current stderr as output by leogama in https://github.com/uqfoundation/dill/pull/541
* Optimize the numpy hook by leogama in https://github.com/uqfoundation/dill/pull/542
* Minor type fix by victorcwai in https://github.com/uqfoundation/dill/pull/535
New Contributors
* albertvillanova made their first contribution in https://github.com/uqfoundation/dill/pull/484
* AdamWill made their first contribution in https://github.com/uqfoundation/dill/pull/524
* Shortfinga made their first contribution in https://github.com/uqfoundation/dill/pull/539
* victorcwai made their first contribution in https://github.com/uqfoundation/dill/pull/535
**Full Changelog**: https://github.com/uqfoundation/dill/compare/dill-0.3.5.1...dill-0.3.6