/third_party/python/Doc/library/ |
D | pickletools.rst | 1 :mod:`pickletools` --- Tools for pickle developers 5 :synopsis: Contains extensive comments about the pickle protocols and 6 pickle-machine opcodes, as well as some useful functions. 14 :mod:`pickle` module, some lengthy comments about the implementation, and a 16 are useful for Python core developers who are working on the :mod:`pickle`; 17 ordinary users of the :mod:`pickle` module probably won't find the 26 disassemble the contents of one or more pickle files. Note that if 27 you want to see the Python object stored in the pickle rather than the 28 details of pickle format, you may want to use ``-m pickle`` instead. 29 However, when the pickle file that you want to examine comes from an [all …]
|
D | copyreg.rst | 1 :mod:`copyreg` --- Register :mod:`pickle` support functions 5 :synopsis: Register pickle support functions. 10 module: pickle 16 specific objects. The :mod:`pickle` and :mod:`copy` modules use those functions 28 .. function:: pickle(type, function, constructor=None) 39 See the :mod:`pickle` module for more details on the interface 41 :attr:`~pickle.Pickler.dispatch_table` attribute of a pickler 42 object or subclass of :class:`pickle.Pickler` can also be used for 48 The example below would like to show how to register a pickle function and how 51 >>> import copyreg, copy, pickle [all …]
|
D | pickle.rst | 1 :mod:`pickle` --- Python object serialization 4 .. module:: pickle 10 **Source code:** :source:`Lib/pickle.py` 22 The :mod:`pickle` module implements binary protocols for serializing and 33 The ``pickle`` module **is not secure**. Only unpickle data you trust. 35 It is possible to construct malicious pickle data which will **execute 53 general :mod:`pickle` should always be the preferred way to serialize Python 57 The :mod:`pickle` module differs from :mod:`marshal` in several significant ways: 59 * The :mod:`pickle` module keeps track of the objects it has already serialized, 68 serialized. :mod:`pickle` stores such objects only once, and ensures that all [all …]
|
D | security_warnings.rst | 20 * :mod:`multiprocessing`: :ref:`Connection.recv() uses pickle 21 <multiprocessing-recv-pickle-security>` 22 * :mod:`pickle`: :ref:`Restricting globals in pickle <pickle-restrict>` 25 * :mod:`shelve`: :ref:`shelve is based on pickle and thus unsuitable for
|
D | shelve.rst | 9 .. index:: module: pickle 15 arbitrary Python objects --- anything that the :mod:`pickle` module can handle. 28 By default, pickles created with :data:`pickle.DEFAULT_PROTOCOL` are used 29 to serialize values. The version of the pickle protocol can be specified 45 :data:`pickle.DEFAULT_PROTOCOL` is now used as the default pickle 61 Because the :mod:`shelve` module is backed by :mod:`pickle`, it is insecure 62 to load a shelf from an untrusted source. Like with pickle, loading a shelf 119 By default, pickles created with :data:`pickle.DEFAULT_PROTOCOL` are used 120 to serialize values. The version of the pickle protocol can be specified 121 with the *protocol* parameter. See the :mod:`pickle` documentation for a [all …]
|
/third_party/python/Lib/test/ |
D | test_pickletools.py | 1 import pickle 11 return pickletools.optimize(pickle.dumps(arg, proto, **kwargs)) 14 return pickle.loads(buf, **kwds) 25 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 26 pickled = pickle.dumps(data, proto) 27 unpickled = pickle.loads(pickled) 32 unpickled2 = pickle.loads(pickled2) 35 self.assertNotIn(pickle.LONG_BINGET, pickled2) 36 self.assertNotIn(pickle.LONG_BINPUT, pickled2) 53 self.assertIn(pickle.BINPUT, pickled) [all …]
|
D | test_pickle.py | 4 import pickle 36 dump = staticmethod(pickle._dump) 37 dumps = staticmethod(pickle._dumps) 38 load = staticmethod(pickle._load) 39 loads = staticmethod(pickle._loads) 40 Pickler = pickle._Pickler 41 Unpickler = pickle._Unpickler 46 unpickler = pickle._Unpickler 48 truncated_errors = (pickle.UnpicklingError, EOFError, 60 pickler = pickle._Pickler [all …]
|
D | test_list.py | 4 import pickle 84 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 87 d = pickle.dumps((itorig, orig), proto) 88 it, a = pickle.loads(d) 95 d = pickle.dumps((itorig, orig), proto) 96 it, a = pickle.loads(d) 104 d = pickle.dumps((itorig, orig), proto) 105 it, a = pickle.loads(d) 112 d = pickle.dumps((itorig, orig), proto) 113 it, a = pickle.loads(d) [all …]
|
D | pickletester.py | 8 import pickle 35 from pickle import bytes_types 53 protocols = range(pickle.HIGHEST_PROTOCOL + 1) 57 def opcode_in_pickle(code, pickle): argument 58 for op, dummy, dummy in pickletools.genops(pickle): 64 def count_opcode(code, pickle): argument 66 for op, dummy, dummy in pickletools.genops(pickle): 207 return type(self)._reconstruct, (pickle.PickleBuffer(self),), None 235 return type(self)._reconstruct, (pickle.PickleBuffer(self),), None 312 pb = pickle.PickleBuffer(self.array) [all …]
|
D | test_sndhdr.py | 2 import pickle 31 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 32 dump = pickle.dumps(what, proto) 33 self.assertEqual(pickle.loads(dump), what)
|
D | test_xml_dom_minicompat.py | 4 import pickle 88 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 91 pickled = pickle.dumps(node_list, proto) 92 unpickled = pickle.loads(pickled) 99 pickled = pickle.dumps(node_list, proto) 100 unpickled = pickle.loads(pickled)
|
D | test_iter.py | 8 import pickle 89 def check_iterator(self, it, seq, pickle=True): argument 90 if pickle: 102 def check_for_loop(self, expr, seq, pickle=True): argument 103 if pickle: 112 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 113 d = pickle.dumps(itorg, proto) 114 it = pickle.loads(d) 121 it = pickle.loads(d) 126 d = pickle.dumps(it, proto) [all …]
|
D | test_tuple.py | 5 import pickle 350 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 352 d = pickle.dumps(itorg, proto) 353 it = pickle.loads(d) 357 it = pickle.loads(d) 359 d = pickle.dumps(it, proto) 364 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 366 d = pickle.dumps(itorg, proto) 367 it = pickle.loads(d) 371 it = pickle.loads(d) [all …]
|
D | test_configparser.py | 1702 import pickle 1704 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 1705 pickled = pickle.dumps(e1, proto) 1706 e2 = pickle.loads(pickled) 1711 import pickle 1713 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 1714 pickled = pickle.dumps(e1, proto) 1715 e2 = pickle.loads(pickled) 1722 import pickle 1724 for proto in range(pickle.HIGHEST_PROTOCOL + 1): [all …]
|
D | test_dict.py | 4 import pickle 1108 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 1111 d = pickle.dumps(it, proto) 1112 it = pickle.loads(d) 1115 it = pickle.loads(d) 1120 d = pickle.dumps(it, proto) 1121 it = pickle.loads(d) 1126 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 1130 d = pickle.dumps(itorg, proto) 1131 it = pickle.loads(d) [all …]
|
D | test_itertools.py | 10 import pickle 79 picklecopiers = [lambda s, proto=proto: pickle.loads(pickle.dumps(s, proto)) 80 for proto in range(pickle.HIGHEST_PROTOCOL + 1)] 99 dump = pickle.dumps(it, protocol) 100 i2 = pickle.loads(dump) 109 i3 = pickle.loads(dump) 117 dump = pickle.dumps(i3, protocol) 118 i4 = pickle.loads(dump) 151 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 192 for proto in range(pickle.HIGHEST_PROTOCOL + 1): [all …]
|
D | test_bool.py | 270 import pickle 271 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 272 self.assertIs(pickle.loads(pickle.dumps(True, proto)), True) 273 self.assertIs(pickle.loads(pickle.dumps(False, proto)), False) 277 import pickle 278 self.assertEqual(pickle.dumps(True, protocol=0), b"I01\n.") 279 self.assertEqual(pickle.dumps(False, protocol=0), b"I00\n.") 280 self.assertEqual(pickle.dumps(True, protocol=1), b"I01\n.") 281 self.assertEqual(pickle.dumps(False, protocol=1), b"I00\n.") 282 self.assertEqual(pickle.dumps(True, protocol=2), b'\x80\x02\x88.') [all …]
|
D | test_deque.py | 7 import pickle 613 for i in range(pickle.HIGHEST_PROTOCOL + 1): 614 s = pickle.dumps(d, i) 615 e = pickle.loads(s) 623 for i in range(pickle.HIGHEST_PROTOCOL + 1): 624 e = pickle.loads(pickle.dumps(d, i)) 632 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 635 dump = pickle.dumps((itorg, orig), proto) 636 it, d = pickle.loads(dump) 644 dump = pickle.dumps((itorg, orig), proto) [all …]
|
/third_party/python/Lib/test/test_email/ |
D | test_pickleable.py | 4 import pickle 33 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 34 p = pickle.dumps(header, proto) 35 h = pickle.loads(p) 69 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 70 p = pickle.dumps(msg, proto) 71 msg2 = pickle.loads(p)
|
/third_party/python/Lib/lib2to3/pgen2/ |
D | grammar.py | 16 import pickle 90 pickle.dump(self.__dict__, f, pickle.HIGHEST_PROTOCOL) 95 d = pickle.load(f) 100 self.__dict__.update(pickle.loads(pkl))
|
/third_party/python/Lib/unittest/test/testmock/ |
D | testsentinel.py | 3 import pickle 29 for proto in range(pickle.HIGHEST_PROTOCOL+1): 31 pickled = pickle.dumps(sentinel.whatever, proto) 32 unpickled = pickle.loads(pickled)
|
/third_party/python/Doc/includes/ |
D | dbpickle.py | 4 import pickle 11 class DBPickler(pickle.Pickler): 26 class DBUnpickler(pickle.Unpickler): 46 raise pickle.UnpicklingError("unsupported persistent object")
|
/third_party/python/Tools/scripts/ |
D | db2pickle.py | 41 import pickle as pickle namespace 43 import pickle 127 pickle.dump((k, db[k]), pfile, 1==1)
|
D | pickle2db.py | 46 import pickle as pickle namespace 48 import pickle 136 (key, val) = pickle.load(pfile)
|
/third_party/python/Lib/ctypes/test/ |
D | test_pickling.py | 2 import pickle 19 return pickle.dumps(item, self.proto) 22 return pickle.loads(item) 74 for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|