Lines Matching defs:protocol

32 /* Bump HIGHEST_PROTOCOL when new opcodes are added to the pickle protocol.
184 /* builtins.getattr, used for saving nested names with protocol < 4 */
647 int proto; /* Pickle protocol number, >= 0 */
1155 _Pickler_SetProtocol(PicklerObject *self, PyObject *protocol, int fix_imports)
1159 if (protocol == Py_None) {
1163 proto = PyLong_AsLong(protocol);
1170 PyErr_Format(PyExc_ValueError, "pickle protocol must be <= %d",
1207 "buffer_callback needs protocol >= 5");
2064 /* These aren't opcodes -- they're ways to pickle bools before protocol 2
2067 * Note that protocol 2 added direct ways to pickle bools.
2285 do not insert a protocol 4 frame opcode to make it possible to optimize
2387 "requires pickle protocol 4 or higher");
2407 objects. Therefore, we need to fake the copy protocol (i.e.,
2521 "PickleBuffer can only pickled with protocol >= 5");
2695 "requires pickle protocol 4 or higher");
3247 * Note that this currently doesn't work for protocol 0.
3771 protocol < 4, or if the object is not registered in the
3779 /* For protocol < 3 and if the user didn't request against doing
3789 only when we are using the pickle protocol newer than version
3803 "pickle protocol %i",
3822 "pickle protocol %i",
3914 "persistent IDs in protocol 0 must be "
4696 protocol: object = None
4702 The optional *protocol* argument tells the pickler to use the given
4703 protocol; supported protocols are 0, 1, 2, 3, 4 and 5. The default
4704 protocol is 4. It was introduced in Python 3.4, and is incompatible
4707 Specifying a negative protocol version selects the highest protocol
4708 version supported. The higher the protocol used, the more recent the
4716 If *fix_imports* is True and protocol is less than 3, pickle will try
4728 It is an error if *buffer_callback* is not None and *protocol*
4735 PyObject *protocol, int fix_imports,
4743 if (_Pickler_SetProtocol(self, protocol, fix_imports) < 0)
6071 "persistent IDs in protocol 0 must be "
6800 /* Just raises an error if we don't know the protocol specified. PROTO
6818 PyErr_Format(PyExc_ValueError, "unsupported pickle protocol: %d", i);
7227 The protocol version of the pickle is detected automatically, so no
7228 protocol argument is needed. Bytes past the pickled object's
7641 protocol: object = None
7648 This is equivalent to ``Pickler(file, protocol).dump(obj)``, but may
7651 The optional *protocol* argument tells the pickler to use the given
7652 protocol; supported protocols are 0, 1, 2, 3, 4 and 5. The default
7653 protocol is 4. It was introduced in Python 3.4, and is incompatible
7656 Specifying a negative protocol version selects the highest protocol
7657 version supported. The higher the protocol used, the more recent the
7665 If *fix_imports* is True and protocol is less than 3, pickle will try
7671 *buffer_callback* is not None and *protocol* is None or smaller than 5.
7677 PyObject *protocol, int fix_imports,
7686 if (_Pickler_SetProtocol(pickler, protocol, fix_imports) < 0)
7714 protocol: object = None
7721 The optional *protocol* argument tells the pickler to use the given
7722 protocol; supported protocols are 0, 1, 2, 3, 4 and 5. The default
7723 protocol is 4. It was introduced in Python 3.4, and is incompatible
7726 Specifying a negative protocol version selects the highest protocol
7727 version supported. The higher the protocol used, the more recent the
7730 If *fix_imports* is True and *protocol* is less than 3, pickle will
7736 *buffer_callback* is not None and *protocol* is None or smaller than 5.
7741 _pickle_dumps_impl(PyObject *module, PyObject *obj, PyObject *protocol,
7751 if (_Pickler_SetProtocol(pickler, protocol, fix_imports) < 0)
7785 The protocol version of the pickle is detected automatically, so no
7786 protocol argument is needed. Bytes past the pickled object's
7851 The protocol version of the pickle is detected automatically, so no
7852 protocol argument is needed. Bytes past the pickled object's