From 402881b84648b9a14c60ab2a022e58c1706faf06 Mon Sep 17 00:00:00 2001 From: Jean-Robin Date: Fri, 24 Jan 2025 17:12:18 +0100 Subject: [PATCH] Add warning message on pickle usage #390 (#2426) * add warning in the pickle data node documentation * More accurate message * Update taipy/core/data/pickle.py * formatting --- taipy/core/data/pickle.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/taipy/core/data/pickle.py b/taipy/core/data/pickle.py index b86e82d6c7..cfa4622972 100644 --- a/taipy/core/data/pickle.py +++ b/taipy/core/data/pickle.py @@ -31,6 +31,20 @@ class PickleDataNode(DataNode, _FileDataNodeMixin): data node. - *default_data*: The default data of the data node. It is used at the data node instantiation to write the data to the Pickle file. + + ??? warning "To use with pickle-able data only" + PickleDataNode should be used only for "pickle-able" data. + + Everything that's build up (recursively) from basic python types (dicts, lists, + primitives, objects, object references, even circular) can usually be pickled by default. + + Things that are usually not pickle-able are, for example, sockets, file(handler)s, + database connections, custom data structure using in-memory references to Python IDs, + and so on. + + Please refer to the + [pickle documentation](https://docs.python.org/3/library/pickle.html) for more information. + """ __STORAGE_TYPE = "pickle"