Quellcode durchsuchen

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 vor 4 Monaten
Ursprung
Commit
402881b846
1 geänderte Dateien mit 14 neuen und 0 gelöschten Zeilen
  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.
         data node.
     - *default_data*: The default data of the data node. It is used at the data node instantiation
     - *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.
         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"
     __STORAGE_TYPE = "pickle"