Browse Source

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
Jean-Robin 4 tháng trước cách đây
mục cha
commit
402881b846
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  1. 14 0
      taipy/core/data/pickle.py

+ 14 - 0
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"