chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
add763d7-f027-4e90-b43b-90e43aedb2fa
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,518
supabase-export-v2
a9c5dbd730bdf95a
as :meth:`__getnewargs_ex__`, but supports only positional arguments. It must return a tuple of arguments ``args`` which will be passed to the :meth:`__new__` method upon unpickling. :meth:`__getnewargs__` will not be called if :meth:`__getnewargs_ex__` is defined.
trusted_official_docs
CPython Docs
as :meth:`__getnewargs_ex__`, but supports only positional arguments. It must return a tuple of arguments ``args`` which will be passed to the :meth:`__new__` method upon unpickling. :meth:`__getnewargs__` will not be called if :meth:`__getnewargs_ex__` is defined.
as :meth:`__getnewargs_ex__`, but supports only positional arguments. It must return a tuple of arguments ``args`` which will be passed to the :meth:`__new__` method upon unpickling. :meth:`__getnewargs__` will not be called if :meth:`__getnewargs_ex__` is defined.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b023e497-270f-43a2-99e1-a6a952515df8
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,607
supabase-export-v2
6e5a445bafb940b4
A communications system can enable custom handling of the :class:`PickleBuffer` objects generated when serializing an object graph. On the sending side, it needs to pass a *buffer_callback* argument to :class:`Pickler` (or to the :func:`dump` or :func:`dumps` function), which will be called with each :class:`PickleBuff...
trusted_official_docs
CPython Docs
A communications system can enable custom handling of the :class:`PickleBuffer` objects generated when serializing an object graph. On the sending side, it needs to pass a *buffer_callback* argument to :class:`Pickler` (or to the :func:`dump` or :func:`dumps` function), which will be called with each :class:`PickleBuff...
A communications system can enable custom handling of the :class:`PickleBuffer` objects generated when serializing an object graph. On the sending side, it needs to pass a *buffer_callback* argument to :class:`Pickler` (or to the :func:`dump` or :func:`dumps` function), which will be called with each :class:`PickleBuff...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b81856b6-7934-4ab0-aa5c-9e3acef3a2d8
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,633
supabase-export-v2
dd40dbc757a9824d
class RestrictedUnpickler(pickle.Unpickler): def find_class(self, module, name): # Only allow safe classes from builtins. if module == "builtins" and name in safe_builtins: return getattr(builtins, name) # Forbid everything else. raise pickle.UnpicklingError("global '%s.%s' is forbidden" % (module, name))
trusted_official_docs
CPython Docs
class RestrictedUnpickler(pickle.Unpickler): def find_class(self, module, name): # Only allow safe classes from builtins. if module == "builtins" and name in safe_builtins: return getattr(builtins, name) # Forbid everything else. raise pickle.UnpicklingError("global '%s.%s' is forbidden" % (module, name))
class RestrictedUnpickler(pickle.Unpickler): def find_class(self, module, name): # Only allow safe classes from builtins. if module == "builtins" and name in safe_builtins: return getattr(builtins, name) # Forbid everything else. raise pickle.UnpicklingError("global '%s.%s' is forbidden" % (module, name))
python, official-docs, cpython, P0
Local_Trusted_Corpus
b822ba6a-1324-442a-8515-0178b09d62f6
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,640
supabase-export-v2
6695b52052dc016e
Performance ----------- Recent versions of the pickle protocol (from protocol 2 and upwards) feature efficient binary encodings for several common features and built-in types. Also, the :mod:`!pickle` module has a transparent optimizer written in C.
trusted_official_docs
CPython Docs
Performance ----------- Recent versions of the pickle protocol (from protocol 2 and upwards) feature efficient binary encodings for several common features and built-in types. Also, the :mod:`!pickle` module has a transparent optimizer written in C.
Performance ----------- Recent versions of the pickle protocol (from protocol 2 and upwards) feature efficient binary encodings for several common features and built-in types. Also, the :mod:`!pickle` module has a transparent optimizer written in C.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b8761c0b-43b0-48d0-99ef-be6211b31f6f
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,525
supabase-export-v2
5a1073b5984a8fad
consisting of two dictionaries: ``self.__dict__``, and a dictionary mapping slot names to slot values. Only slots that have a value are included in the latter. * For a class that has :attr:`~object.__slots__` and no instance :attr:`~object.__dict__`, the default state is a tuple whose first item is ``None`` and whose...
trusted_official_docs
CPython Docs
consisting of two dictionaries: ``self.__dict__``, and a dictionary mapping slot names to slot values. Only slots that have a value are included in the latter. * For a class that has :attr:`~object.__slots__` and no instance :attr:`~object.__dict__`, the default state is a tuple whose first item is ``None`` and whose...
consisting of two dictionaries: ``self.__dict__``, and a dictionary mapping slot names to slot values. Only slots that have a value are included in the latter. * For a class that has :attr:`~object.__slots__` and no instance :attr:`~object.__dict__`, the default state is a tuple whose first item is ``None`` and whose...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9351498-2724-4178-b4aa-72231c58acd2
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,652
supabase-export-v2
60dd622d9aaf323b
Command-line interface ---------------------- The :mod:`!pickle` module can be invoked as a script from the command line, it will display contents of the pickle files. However, when the pickle file that you want to examine comes from an untrusted source, ``-m pickletools`` is a safer option because it does not execute ...
trusted_official_docs
CPython Docs
Command-line interface ---------------------- The :mod:`!pickle` module can be invoked as a script from the command line, it will display contents of the pickle files. However, when the pickle file that you want to examine comes from an untrusted source, ``-m pickletools`` is a safer option because it does not execute ...
Command-line interface ---------------------- The :mod:`!pickle` module can be invoked as a script from the command line, it will display contents of the pickle files. However, when the pickle file that you want to examine comes from an untrusted source, ``-m pickletools`` is a safer option because it does not execute ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ba17b37f-2419-490a-abab-c7f4ea33c603
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,621
supabase-export-v2
978e36179fa653da
do not have this limitation, and allow use of zero-copy pickling (or making as few copies as possible) when transferring between distinct processes or systems. .. seealso:: :pep:`574` -- Pickle protocol 5 with out-of-band data
trusted_official_docs
CPython Docs
do not have this limitation, and allow use of zero-copy pickling (or making as few copies as possible) when transferring between distinct processes or systems. .. seealso:: :pep:`574` -- Pickle protocol 5 with out-of-band data
do not have this limitation, and allow use of zero-copy pickling (or making as few copies as possible) when transferring between distinct processes or systems. .. seealso:: :pep:`574` -- Pickle protocol 5 with out-of-band data
python, official-docs, cpython, P0
Local_Trusted_Corpus
bdbb90e9-53aa-4dff-ab85-529bf6fb0eaa
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,547
supabase-export-v2
8b6e3376772264d8
object using ``obj[key] = value``. This is primarily used for dictionary subclasses, but may be used by other classes as long as they implement :meth:`__setitem__`. * Optionally, a callable with a ``(obj, state)`` signature. This callable allows the user to programmatically control the state-updating behavior of a sp...
trusted_official_docs
CPython Docs
object using ``obj[key] = value``. This is primarily used for dictionary subclasses, but may be used by other classes as long as they implement :meth:`__setitem__`. * Optionally, a callable with a ``(obj, state)`` signature. This callable allows the user to programmatically control the state-updating behavior of a sp...
object using ``obj[key] = value``. This is primarily used for dictionary subclasses, but may be used by other classes as long as they implement :meth:`__setitem__`. * Optionally, a callable with a ``(obj, state)`` signature. This callable allows the user to programmatically control the state-updating behavior of a sp...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bff9c6c6-e94e-4e4f-af22-7634279a763e
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,523
supabase-export-v2
6200ef16837298e4
* For a class that has no instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``None``. * For a class that has an instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``self.__dict__``.
trusted_official_docs
CPython Docs
* For a class that has no instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``None``. * For a class that has an instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``self.__dict__``.
* For a class that has no instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``None``. * For a class that has an instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``self.__dict__``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c21ec6f9-2684-4eb8-9617-a08dc95042d3
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,531
supabase-export-v2
29d0c87382952bc6
If :meth:`__reduce__` returns a state with value ``None`` at pickling, the :meth:`__setstate__` method will not be called upon unpickling. Refer to the section :ref:`pickle-state` for more information about how to use the methods :meth:`~object.__getstate__` and :meth:`~object.__setstate__`.
trusted_official_docs
CPython Docs
If :meth:`__reduce__` returns a state with value ``None`` at pickling, the :meth:`__setstate__` method will not be called upon unpickling. Refer to the section :ref:`pickle-state` for more information about how to use the methods :meth:`~object.__getstate__` and :meth:`~object.__setstate__`.
If :meth:`__reduce__` returns a state with value ``None`` at pickling, the :meth:`__setstate__` method will not be called upon unpickling. Refer to the section :ref:`pickle-state` for more information about how to use the methods :meth:`~object.__getstate__` and :meth:`~object.__setstate__`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c423ae52-c8e6-4d73-969c-dc2a8e329a74
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,569
supabase-export-v2
196891128b619cfe
does the same but all instances of ``MyPickler`` will by default share the private dispatch table. On the other hand, the code :: copyreg.pickle(SomeClass, reduce_SomeClass) f = io.BytesIO() p = pickle.Pickler(f)
trusted_official_docs
CPython Docs
does the same but all instances of ``MyPickler`` will by default share the private dispatch table. On the other hand, the code :: copyreg.pickle(SomeClass, reduce_SomeClass) f = io.BytesIO() p = pickle.Pickler(f)
does the same but all instances of ``MyPickler`` will by default share the private dispatch table. On the other hand, the code :: copyreg.pickle(SomeClass, reduce_SomeClass) f = io.BytesIO() p = pickle.Pickler(f)
python, official-docs, cpython, P0
Local_Trusted_Corpus
c4970716-1733-47ef-a5f0-ec14d39fe8fc
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,513
supabase-export-v2
68f49ef0f4e9d316
.. method:: object.__getnewargs_ex__() In protocols 2 and newer, classes that implement the :meth:`__getnewargs_ex__` method can dictate the values passed to the :meth:`__new__` method upon unpickling. The method must return a pair ``(args, kwargs)`` where *args* is a tuple of positional arguments and *kwargs* a di...
trusted_official_docs
CPython Docs
.. method:: object.__getnewargs_ex__() In protocols 2 and newer, classes that implement the :meth:`__getnewargs_ex__` method can dictate the values passed to the :meth:`__new__` method upon unpickling. The method must return a pair ``(args, kwargs)`` where *args* is a tuple of positional arguments and *kwargs* a di...
.. method:: object.__getnewargs_ex__() In protocols 2 and newer, classes that implement the :meth:`__getnewargs_ex__` method can dictate the values passed to the :meth:`__new__` method upon unpickling. The method must return a pair ``(args, kwargs)`` where *args* is a tuple of positional arguments and *kwargs* a di...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c71ed699-be1e-43ad-9679-4cd9fd5c4612
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,521
supabase-export-v2
520d2772219a9186
.. method:: object.__getstate__() Classes can further influence how their instances are pickled by overriding the method :meth:`__getstate__`. It is called and the returned object is pickled as the contents for the instance, instead of a default state. There are several cases:
trusted_official_docs
CPython Docs
.. method:: object.__getstate__() Classes can further influence how their instances are pickled by overriding the method :meth:`__getstate__`. It is called and the returned object is pickled as the contents for the instance, instead of a default state. There are several cases:
.. method:: object.__getstate__() Classes can further influence how their instances are pickled by overriding the method :meth:`__getstate__`. It is called and the returned object is pickled as the contents for the instance, instead of a default state. There are several cases:
python, official-docs, cpython, P0
Local_Trusted_Corpus
c8ea054f-76d6-43e4-b3ce-14b313fee675
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,563
supabase-export-v2
5990af31fbbff954
customize pickling of some classes without disturbing any other code which depends on pickling, then one can create a pickler with a private dispatch table. The global dispatch table managed by the :mod:`copyreg` module is available as :data:`!copyreg.dispatch_table`. Therefore, one may choose to use a modified copy of...
trusted_official_docs
CPython Docs
customize pickling of some classes without disturbing any other code which depends on pickling, then one can create a pickler with a private dispatch table. The global dispatch table managed by the :mod:`copyreg` module is available as :data:`!copyreg.dispatch_table`. Therefore, one may choose to use a modified copy of...
customize pickling of some classes without disturbing any other code which depends on pickling, then one can create a pickler with a private dispatch table. The global dispatch table managed by the :mod:`copyreg` module is available as :data:`!copyreg.dispatch_table`. Therefore, one may choose to use a modified copy of...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cac91694-aa8a-40c3-8786-521883ae88f9
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,381
supabase-export-v2
29c1d3246f53944d
protocols which can be used for pickling. The higher the protocol used, the more recent the version of Python needed to read the pickle produced. * Protocol version 0 is the original "human-readable" protocol and is backwards compatible with earlier versions of Python.
trusted_official_docs
CPython Docs
protocols which can be used for pickling. The higher the protocol used, the more recent the version of Python needed to read the pickle produced. * Protocol version 0 is the original "human-readable" protocol and is backwards compatible with earlier versions of Python.
protocols which can be used for pickling. The higher the protocol used, the more recent the version of Python needed to read the pickle produced. * Protocol version 0 is the original "human-readable" protocol and is backwards compatible with earlier versions of Python.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cad86fb4-7e1f-4c18-b6e4-5b1997b17dcf
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,437
supabase-export-v2
f69265b3458d13e9
callback returns a false value (such as ``None``), the given buffer is :ref:`out-of-band <pickle-oob>`; otherwise the buffer is serialized in-band, i.e. inside the pickle stream. It is an error if *buffer_callback* is not ``None`` and *protocol* is ``None`` or smaller than 5.
trusted_official_docs
CPython Docs
callback returns a false value (such as ``None``), the given buffer is :ref:`out-of-band <pickle-oob>`; otherwise the buffer is serialized in-band, i.e. inside the pickle stream. It is an error if *buffer_callback* is not ``None`` and *protocol* is ``None`` or smaller than 5.
callback returns a false value (such as ``None``), the given buffer is :ref:`out-of-band <pickle-oob>`; otherwise the buffer is serialized in-band, i.e. inside the pickle stream. It is an error if *buffer_callback* is not ``None`` and *protocol* is ``None`` or smaller than 5.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cda43f0e-82a0-48d9-a62f-ea10419140fe
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,472
supabase-export-v2
7eb07445edb2f81d
Raise an :exc:`UnpicklingError` by default. If defined, :meth:`persistent_load` should return the object specified by the persistent ID *pid*. If an invalid persistent ID is encountered, an :exc:`UnpicklingError` should be raised.
trusted_official_docs
CPython Docs
Raise an :exc:`UnpicklingError` by default. If defined, :meth:`persistent_load` should return the object specified by the persistent ID *pid*. If an invalid persistent ID is encountered, an :exc:`UnpicklingError` should be raised.
Raise an :exc:`UnpicklingError` by default. If defined, :meth:`persistent_load` should return the object specified by the persistent ID *pid*. If an invalid persistent ID is encountered, an :exc:`UnpicklingError` should be raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ce50d91b-51cb-4870-9b7b-6767c284fb11
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,567
supabase-export-v2
dc7d1116d5c80933
creates an instance of :class:`pickle.Pickler` with a private dispatch table which handles the ``SomeClass`` class specially. Alternatively, the code :: class MyPickler(pickle.Pickler): dispatch_table = copyreg.dispatch_table.copy() dispatch_table[SomeClass] = reduce_SomeClass f = io.BytesIO() p = MyPickler(f)
trusted_official_docs
CPython Docs
creates an instance of :class:`pickle.Pickler` with a private dispatch table which handles the ``SomeClass`` class specially. Alternatively, the code :: class MyPickler(pickle.Pickler): dispatch_table = copyreg.dispatch_table.copy() dispatch_table[SomeClass] = reduce_SomeClass f = io.BytesIO() p = MyPickler(f)
creates an instance of :class:`pickle.Pickler` with a private dispatch table which handles the ``SomeClass`` class specially. Alternatively, the code :: class MyPickler(pickle.Pickler): dispatch_table = copyreg.dispatch_table.copy() dispatch_table[SomeClass] = reduce_SomeClass f = io.BytesIO() p = MyPickler(f)
python, official-docs, cpython, P0
Local_Trusted_Corpus
ce50f803-c3b3-4407-99da-ac2b0b1133d8
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,467
supabase-export-v2
b5423048926f9150
each time the pickle stream references an :ref:`out-of-band <pickle-oob>` buffer view. Such buffers have been given in order to the *buffer_callback* of a Pickler object. .. versionchanged:: 3.8 The *buffers* argument was added.
trusted_official_docs
CPython Docs
each time the pickle stream references an :ref:`out-of-band <pickle-oob>` buffer view. Such buffers have been given in order to the *buffer_callback* of a Pickler object. .. versionchanged:: 3.8 The *buffers* argument was added.
each time the pickle stream references an :ref:`out-of-band <pickle-oob>` buffer view. Such buffers have been given in order to the *buffer_callback* of a Pickler object. .. versionchanged:: 3.8 The *buffers* argument was added.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d08d8315-63a6-410e-8d28-561c1e1a3559
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,469
supabase-export-v2
383c5cf591f9e21e
.. method:: load() Read the pickled representation of an object from the open file object given in the constructor, and return the reconstituted object hierarchy specified therein. Bytes past the pickled representation of the object are ignored.
trusted_official_docs
CPython Docs
.. method:: load() Read the pickled representation of an object from the open file object given in the constructor, and return the reconstituted object hierarchy specified therein. Bytes past the pickled representation of the object are ignored.
.. method:: load() Read the pickled representation of an object from the open file object given in the constructor, and return the reconstituted object hierarchy specified therein. Bytes past the pickled representation of the object are ignored.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d4e0f8c1-3669-442b-bdcb-c8a7df758226
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,368
supabase-export-v2
8de042a793b3b9a7
There are fundamental differences between the pickle protocols and `JSON (JavaScript Object Notation) <https://json.org>`_: * JSON is a text serialization format (it outputs unicode text, although most of the time it is then encoded to ``utf-8``), while pickle is a binary serialization format;
trusted_official_docs
CPython Docs
There are fundamental differences between the pickle protocols and `JSON (JavaScript Object Notation) <https://json.org>`_: * JSON is a text serialization format (it outputs unicode text, although most of the time it is then encoded to ``utf-8``), while pickle is a binary serialization format;
There are fundamental differences between the pickle protocols and `JSON (JavaScript Object Notation) <https://json.org>`_: * JSON is a text serialization format (it outputs unicode text, although most of the time it is then encoded to ``utf-8``), while pickle is a binary serialization format;
python, official-docs, cpython, P0
Local_Trusted_Corpus
d51cdff5-1542-4ccc-990e-46b7c0d20996
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,434
supabase-export-v2
4748afcef9f25157
bytes argument. It can thus be an on-disk file opened for binary writing, an :class:`io.BytesIO` instance, or any other custom object that meets this interface. If *fix_imports* is true and *protocol* is less than 3, pickle will try to map the new Python 3 names to the old module names used in Python 2, so that the p...
trusted_official_docs
CPython Docs
bytes argument. It can thus be an on-disk file opened for binary writing, an :class:`io.BytesIO` instance, or any other custom object that meets this interface. If *fix_imports* is true and *protocol* is less than 3, pickle will try to map the new Python 3 names to the old module names used in Python 2, so that the p...
bytes argument. It can thus be an on-disk file opened for binary writing, an :class:`io.BytesIO` instance, or any other custom object that meets this interface. If *fix_imports* is true and *protocol* is less than 3, pickle will try to map the new Python 3 names to the old module names used in Python 2, so that the p...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d6f8f345-d88e-4580-a84f-2d8a727b1a54
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,378
supabase-export-v2
38c5734f9814b4fc
external standards such as JSON (which can't represent pointer sharing); however it means that non-Python programs may not be able to reconstruct pickled Python objects. By default, the :mod:`!pickle` data format uses a relatively compact binary representation. If you need optimal size characteristics, you can efficien...
trusted_official_docs
CPython Docs
external standards such as JSON (which can't represent pointer sharing); however it means that non-Python programs may not be able to reconstruct pickled Python objects. By default, the :mod:`!pickle` data format uses a relatively compact binary representation. If you need optimal size characteristics, you can efficien...
external standards such as JSON (which can't represent pointer sharing); however it means that non-Python programs may not be able to reconstruct pickled Python objects. By default, the :mod:`!pickle` data format uses a relatively compact binary representation. If you need optimal size characteristics, you can efficien...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d930d1c2-d06a-493b-896a-fdcc8591fa60
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,577
supabase-export-v2
d0179098998836b1
def __init__(self, filename): self.filename = filename self.file = open(filename) self.lineno = 0 def readline(self): self.lineno += 1 line = self.file.readline() if not line: return None if line.endswith('\n'): line = line[:-1] return "%i: %s" % (self.lineno, line)
trusted_official_docs
CPython Docs
def __init__(self, filename): self.filename = filename self.file = open(filename) self.lineno = 0 def readline(self): self.lineno += 1 line = self.file.readline() if not line: return None if line.endswith('\n'): line = line[:-1] return "%i: %s" % (self.lineno, line)
def __init__(self, filename): self.filename = filename self.file = open(filename) self.lineno = 0 def readline(self): self.lineno += 1 line = self.file.readline() if not line: return None if line.endswith('\n'): line = line[:-1] return "%i: %s" % (self.lineno, line)
python, official-docs, cpython, P0
Local_Trusted_Corpus
da8aa9e7-a667-4381-b228-7daed39be061
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,435
supabase-export-v2
db6ee6fe16ed5c1b
the new Python 3 names to the old module names used in Python 2, so that the pickle data stream is readable with Python 2. If *buffer_callback* is ``None`` (the default), buffer views are serialized into *file* as part of the pickle stream.
trusted_official_docs
CPython Docs
the new Python 3 names to the old module names used in Python 2, so that the pickle data stream is readable with Python 2. If *buffer_callback* is ``None`` (the default), buffer views are serialized into *file* as part of the pickle stream.
the new Python 3 names to the old module names used in Python 2, so that the pickle data stream is readable with Python 2. If *buffer_callback* is ``None`` (the default), buffer views are serialized into *file* as part of the pickle stream.
python, official-docs, cpython, P0
Local_Trusted_Corpus
dae7c967-8b9f-4ac9-87f4-603163570bd1
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,357
supabase-export-v2
3a431a81f288917a
which will **execute arbitrary code during unpickling**. Never unpickle data that could have come from an untrusted source, or that could have been tampered with. Consider signing data with :mod:`hmac` if you need to ensure that it has not been tampered with.
trusted_official_docs
CPython Docs
which will **execute arbitrary code during unpickling**. Never unpickle data that could have come from an untrusted source, or that could have been tampered with. Consider signing data with :mod:`hmac` if you need to ensure that it has not been tampered with.
which will **execute arbitrary code during unpickling**. Never unpickle data that could have come from an untrusted source, or that could have been tampered with. Consider signing data with :mod:`hmac` if you need to ensure that it has not been tampered with.
python, official-docs, cpython, P0
Local_Trusted_Corpus
db0ea6c5-7af1-4ec0-9237-88a0572620f0
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,433
supabase-export-v2
9277f40b4d697e1e
the given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If not specified, the default is :data:`DEFAULT_PROTOCOL`. If a negative number is specified, :data:`HIGHEST_PROTOCOL` is selected. The *file* argument must have a write() method that accepts a single bytes argument. It can thus be an on-disk f...
trusted_official_docs
CPython Docs
the given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If not specified, the default is :data:`DEFAULT_PROTOCOL`. If a negative number is specified, :data:`HIGHEST_PROTOCOL` is selected. The *file* argument must have a write() method that accepts a single bytes argument. It can thus be an on-disk f...
the given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If not specified, the default is :data:`DEFAULT_PROTOCOL`. If a negative number is specified, :data:`HIGHEST_PROTOCOL` is selected. The *file* argument must have a write() method that accepts a single bytes argument. It can thus be an on-disk f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e1eceeef-0d64-4f73-888b-344c70608c79
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,585
supabase-export-v2
45040fa5eace2f6b
.. versionadded:: 3.8 Sometimes, :attr:`~Pickler.dispatch_table` may not be flexible enough. In particular we may want to customize pickling based on another criterion than the object's type, or we may want to customize the pickling of functions and classes.
trusted_official_docs
CPython Docs
.. versionadded:: 3.8 Sometimes, :attr:`~Pickler.dispatch_table` may not be flexible enough. In particular we may want to customize pickling based on another criterion than the object's type, or we may want to customize the pickling of functions and classes.
.. versionadded:: 3.8 Sometimes, :attr:`~Pickler.dispatch_table` may not be flexible enough. In particular we may want to customize pickling based on another criterion than the object's type, or we may want to customize the pickling of functions and classes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e2408bbb-d904-4bb5-805b-729e926c8b9d
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,579
supabase-export-v2
3ffaf965b6334cf5
attributes. Always use the dict.copy() # method to avoid modifying the original state. state = self.__dict__.copy() # Remove the unpicklable entries. del state['file'] return state def __setstate__(self, state): # Restore instance attributes (i.e., filename and lineno). self.__dict__.update(state) # Restore the previ...
trusted_official_docs
CPython Docs
attributes. Always use the dict.copy() # method to avoid modifying the original state. state = self.__dict__.copy() # Remove the unpicklable entries. del state['file'] return state def __setstate__(self, state): # Restore instance attributes (i.e., filename and lineno). self.__dict__.update(state) # Restore the previ...
attributes. Always use the dict.copy() # method to avoid modifying the original state. state = self.__dict__.copy() # Remove the unpicklable entries. del state['file'] return state def __setstate__(self, state): # Restore instance attributes (i.e., filename and lineno). self.__dict__.update(state) # Restore the previ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e4e6f71c-80a1-42c3-a994-f3a5de82ce0d
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,558
supabase-export-v2
d2207d5c5524fed0
To unpickle external objects, the unpickler must have a custom :meth:`~Unpickler.persistent_load` method that takes a persistent ID object and returns the referenced object. Here is a comprehensive example presenting how persistent ID can be used to pickle external objects by reference.
trusted_official_docs
CPython Docs
To unpickle external objects, the unpickler must have a custom :meth:`~Unpickler.persistent_load` method that takes a persistent ID object and returns the referenced object. Here is a comprehensive example presenting how persistent ID can be used to pickle external objects by reference.
To unpickle external objects, the unpickler must have a custom :meth:`~Unpickler.persistent_load` method that takes a persistent ID object and returns the referenced object. Here is a comprehensive example presenting how persistent ID can be used to pickle external objects by reference.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e5c5592d-4fdd-41f8-b1fb-dd99b051693e
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,377
supabase-export-v2
e3e31a22fcbca442
.. index:: single: External Data Representation The data format used by :mod:`!pickle` is Python-specific. This has the advantage that there are no restrictions imposed by external standards such as JSON (which can't represent pointer sharing); however it means that non-Python programs may not be able to reconstruct pi...
trusted_official_docs
CPython Docs
.. index:: single: External Data Representation The data format used by :mod:`!pickle` is Python-specific. This has the advantage that there are no restrictions imposed by external standards such as JSON (which can't represent pointer sharing); however it means that non-Python programs may not be able to reconstruct pi...
.. index:: single: External Data Representation The data format used by :mod:`!pickle` is Python-specific. This has the advantage that there are no restrictions imposed by external standards such as JSON (which can't represent pointer sharing); however it means that non-Python programs may not be able to reconstruct pi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e687664d-dbd3-4573-b6fd-ea0d533afd44
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,546
supabase-export-v2
7906da7d397e8460
:meth:`!extend` is used depends on which pickle protocol version is used as well as the number of items to append, so both must be supported.) * Optionally, an iterator (not a sequence) yielding successive key-value pairs. These items will be stored to the object using ``obj[key] = value``. This is primarily used for...
trusted_official_docs
CPython Docs
:meth:`!extend` is used depends on which pickle protocol version is used as well as the number of items to append, so both must be supported.) * Optionally, an iterator (not a sequence) yielding successive key-value pairs. These items will be stored to the object using ``obj[key] = value``. This is primarily used for...
:meth:`!extend` is used depends on which pickle protocol version is used as well as the number of items to append, so both must be supported.) * Optionally, an iterator (not a sequence) yielding successive key-value pairs. These items will be stored to the object using ``obj[key] = value``. This is primarily used for...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e7968ffb-a8e7-4e7f-968e-a42533268655
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,459
supabase-export-v2
401b73787af44710
Clears the pickler's "memo". The memo is the data structure that remembers which objects the pickler has already seen, so that shared or recursive objects are pickled by reference and not by value. This method is useful when re-using picklers.
trusted_official_docs
CPython Docs
Clears the pickler's "memo". The memo is the data structure that remembers which objects the pickler has already seen, so that shared or recursive objects are pickled by reference and not by value. This method is useful when re-using picklers.
Clears the pickler's "memo". The memo is the data structure that remembers which objects the pickler has already seen, so that shared or recursive objects are pickled by reference and not by value. This method is useful when re-using picklers.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e8b0d35a-523f-405a-9b60-46db3e2fa670
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,364
supabase-export-v2
aa7c5cf1f24aac61
save and restore class instances transparently, however the class definition must be importable and live in the same module as when the object was stored. * The :mod:`marshal` serialization format is not guaranteed to be portable across Python versions. Because its primary job in life is to support :file:`.pyc` files...
trusted_official_docs
CPython Docs
save and restore class instances transparently, however the class definition must be importable and live in the same module as when the object was stored. * The :mod:`marshal` serialization format is not guaranteed to be portable across Python versions. Because its primary job in life is to support :file:`.pyc` files...
save and restore class instances transparently, however the class definition must be importable and live in the same module as when the object was stored. * The :mod:`marshal` serialization format is not guaranteed to be portable across Python versions. Because its primary job in life is to support :file:`.pyc` files...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e9285f4a-baa3-4fc1-9c02-f717bbfc7408
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,539
supabase-export-v2
c9f619dfc0df69e2
method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the "reduce value"). If a string is returned, the string should be interpreted as the name of a global variable. It should be the object's local name relative to its module; the pickle module s...
trusted_official_docs
CPython Docs
method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the "reduce value"). If a string is returned, the string should be interpreted as the name of a global variable. It should be the object's local name relative to its module; the pickle module s...
method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the "reduce value"). If a string is returned, the string should be interpreted as the name of a global variable. It should be the object's local name relative to its module; the pickle module s...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ead20074-d29d-48e6-9133-243d116b646d
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,603
supabase-export-v2
83652478f4501b80
Provider API ^^^^^^^^^^^^ The large data objects to be pickled must implement a :meth:`~object.__reduce_ex__` method specialized for protocol 5 and higher, which returns a :class:`PickleBuffer` instance (instead of e.g. a :class:`bytes` object) for any large data.
trusted_official_docs
CPython Docs
Provider API ^^^^^^^^^^^^ The large data objects to be pickled must implement a :meth:`~object.__reduce_ex__` method specialized for protocol 5 and higher, which returns a :class:`PickleBuffer` instance (instead of e.g. a :class:`bytes` object) for any large data.
Provider API ^^^^^^^^^^^^ The large data objects to be pickled must implement a :meth:`~object.__reduce_ex__` method specialized for protocol 5 and higher, which returns a :class:`PickleBuffer` instance (instead of e.g. a :class:`bytes` object) for any large data.
python, official-docs, cpython, P0
Local_Trusted_Corpus
eb1b1911-2074-4fbf-a805-b465a2b0bc8c
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,385
supabase-export-v2
70e904d7c6a70109
in Python 3.0. It has explicit support for :class:`bytes` objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0--3.7. * Protocol version 4 was added in Python 3.4. It adds support for very large objects, pickling more kinds of objects, and some data format optimizations. This was ...
trusted_official_docs
CPython Docs
in Python 3.0. It has explicit support for :class:`bytes` objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0--3.7. * Protocol version 4 was added in Python 3.4. It adds support for very large objects, pickling more kinds of objects, and some data format optimizations. This was ...
in Python 3.0. It has explicit support for :class:`bytes` objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0--3.7. * Protocol version 4 was added in Python 3.4. It adds support for very large objects, pickling more kinds of objects, and some data format optimizations. This was ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ebb055cd-68d8-449c-8de0-8dd0d11913e1
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,418
supabase-export-v2
d6ff677da9f0c9bc
The protocol version of the pickle is detected automatically, so no protocol argument is needed. Bytes past the pickled representation of the object are ignored. Arguments *fix_imports*, *encoding*, *errors*, *strict* and *buffers* have the same meaning as in the :class:`Unpickler` constructor.
trusted_official_docs
CPython Docs
The protocol version of the pickle is detected automatically, so no protocol argument is needed. Bytes past the pickled representation of the object are ignored. Arguments *fix_imports*, *encoding*, *errors*, *strict* and *buffers* have the same meaning as in the :class:`Unpickler` constructor.
The protocol version of the pickle is detected automatically, so no protocol argument is needed. Bytes past the pickled representation of the object are ignored. Arguments *fix_imports*, *encoding*, *errors*, *strict* and *buffers* have the same meaning as in the :class:`Unpickler` constructor.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ec542183-1963-4c81-aeb9-838c161f888a
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,363
supabase-export-v2
aeb8b84449019605
The :mod:`!pickle` module differs from :mod:`marshal` in several significant ways: * :mod:`marshal` cannot be used to serialize user-defined classes and their instances. :mod:`!pickle` can save and restore class instances transparently, however the class definition must be importable and live in the same module as w...
trusted_official_docs
CPython Docs
The :mod:`!pickle` module differs from :mod:`marshal` in several significant ways: * :mod:`marshal` cannot be used to serialize user-defined classes and their instances. :mod:`!pickle` can save and restore class instances transparently, however the class definition must be importable and live in the same module as w...
The :mod:`!pickle` module differs from :mod:`marshal` in several significant ways: * :mod:`marshal` cannot be used to serialize user-defined classes and their instances. :mod:`!pickle` can save and restore class instances transparently, however the class definition must be importable and live in the same module as w...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f24f168b-24c1-40bd-8e38-ddab81f04e72
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,463
supabase-export-v2
d53e37107b2767f8
The protocol version of the pickle is detected automatically, so no protocol argument is needed. The argument *file* must have three methods, a read() method that takes an integer argument, a readinto() method that takes a buffer argument and a readline() method that requires no arguments, as in the :class:`io.Buffe...
trusted_official_docs
CPython Docs
The protocol version of the pickle is detected automatically, so no protocol argument is needed. The argument *file* must have three methods, a read() method that takes an integer argument, a readinto() method that takes a buffer argument and a readline() method that requires no arguments, as in the :class:`io.Buffe...
The protocol version of the pickle is detected automatically, so no protocol argument is needed. The argument *file* must have three methods, a read() method that takes an integer argument, a readinto() method that takes a buffer argument and a readline() method that requires no arguments, as in the :class:`io.Buffe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f29804d3-f4ec-4e9a-ba14-aa13cd136d87
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,668
supabase-export-v2
035740ed5288db9c
.. [#] The exception raised will likely be an :exc:`ImportError` or an :exc:`AttributeError` but it could be something else. .. [#] The :mod:`copy` module uses this protocol for shallow and deep copying operations.
trusted_official_docs
CPython Docs
.. [#] The exception raised will likely be an :exc:`ImportError` or an :exc:`AttributeError` but it could be something else. .. [#] The :mod:`copy` module uses this protocol for shallow and deep copying operations.
.. [#] The exception raised will likely be an :exc:`ImportError` or an :exc:`AttributeError` but it could be something else. .. [#] The :mod:`copy` module uses this protocol for shallow and deep copying operations.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f3701f72-6d23-416d-967c-20cd3c9e48bb
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,452
supabase-export-v2
ead497c5b8931d99
.. method:: reducer_override(obj) Special reducer that can be defined in :class:`Pickler` subclasses. This method has priority over any reducer in the :attr:`dispatch_table`. It should conform to the same interface as a :meth:`~object.__reduce__` method, and can optionally return :data:`NotImplemented` to fallback o...
trusted_official_docs
CPython Docs
.. method:: reducer_override(obj) Special reducer that can be defined in :class:`Pickler` subclasses. This method has priority over any reducer in the :attr:`dispatch_table`. It should conform to the same interface as a :meth:`~object.__reduce__` method, and can optionally return :data:`NotImplemented` to fallback o...
.. method:: reducer_override(obj) Special reducer that can be defined in :class:`Pickler` subclasses. This method has priority over any reducer in the :attr:`dispatch_table`. It should conform to the same interface as a :meth:`~object.__reduce__` method, and can optionally return :data:`NotImplemented` to fallback o...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f4b89af5-11f5-4ff5-8b16-961a893206b9
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,575
supabase-export-v2
5adc988df7010dcb
is unpickled, the file is reopened, and reading resumes from the last location. The :meth:`!__setstate__` and :meth:`!__getstate__` methods are used to implement this behavior. :: class TextReader: """Print and number lines in a text file."""
trusted_official_docs
CPython Docs
is unpickled, the file is reopened, and reading resumes from the last location. The :meth:`!__setstate__` and :meth:`!__getstate__` methods are used to implement this behavior. :: class TextReader: """Print and number lines in a text file."""
is unpickled, the file is reopened, and reading resumes from the last location. The :meth:`!__setstate__` and :meth:`!__getstate__` methods are used to implement this behavior. :: class TextReader: """Print and number lines in a text file."""
python, official-docs, cpython, P0
Local_Trusted_Corpus
f9a97d93-5626-4bb2-8baf-9d072ed4b487
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,383
supabase-export-v2
cd65343f502d196c
* Protocol version 1 is an old binary format which is also compatible with earlier versions of Python. * Protocol version 2 was introduced in Python 2.3. It provides much more efficient pickling of :term:`new-style classes <new-style class>`. Refer to :pep:`307` for information about improvements brought by protocol ...
trusted_official_docs
CPython Docs
* Protocol version 1 is an old binary format which is also compatible with earlier versions of Python. * Protocol version 2 was introduced in Python 2.3. It provides much more efficient pickling of :term:`new-style classes <new-style class>`. Refer to :pep:`307` for information about improvements brought by protocol ...
* Protocol version 1 is an old binary format which is also compatible with earlier versions of Python. * Protocol version 2 was introduced in Python 2.3. It provides much more efficient pickling of :term:`new-style classes <new-style class>`. Refer to :pep:`307` for information about improvements brought by protocol ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fa017fe9-5454-44df-a62a-0993d3ca8331
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,508
supabase-export-v2
c1721bf71d987c97
In this section, we describe the general mechanisms available to you to define, customize, and control how class instances are pickled and unpickled. In most cases, no additional code is needed to make instances picklable. By default, pickle will retrieve the class and the attributes of an instance via introspection. W...
trusted_official_docs
CPython Docs
In this section, we describe the general mechanisms available to you to define, customize, and control how class instances are pickled and unpickled. In most cases, no additional code is needed to make instances picklable. By default, pickle will retrieve the class and the attributes of an instance via introspection. W...
In this section, we describe the general mechanisms available to you to define, customize, and control how class instances are pickled and unpickled. In most cases, no additional code is needed to make instances picklable. By default, pickle will retrieve the class and the attributes of an instance via introspection. W...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fa1dc69b-621d-419a-bd4d-c6ef26cb5dcc
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,574
supabase-export-v2
ce2328e9020dfa66
.. index:: single: __getstate__() (copy protocol) single: __setstate__() (copy protocol) Here's an example that shows how to modify pickling behavior for a class. The :class:`!TextReader` class below opens a text file, and returns the line number and line contents each time its :meth:`!readline` method is called. If a ...
trusted_official_docs
CPython Docs
.. index:: single: __getstate__() (copy protocol) single: __setstate__() (copy protocol) Here's an example that shows how to modify pickling behavior for a class. The :class:`!TextReader` class below opens a text file, and returns the line number and line contents each time its :meth:`!readline` method is called. If a ...
.. index:: single: __getstate__() (copy protocol) single: __setstate__() (copy protocol) Here's an example that shows how to modify pickling behavior for a class. The :class:`!TextReader` class below opens a text file, and returns the line number and line contents each time its :meth:`!readline` method is called. If a ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fa84d9fa-3106-475c-ad68-f91229fba911
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,432
supabase-export-v2
f49f12c76dc1027a
This takes a binary file for writing a pickle data stream. The optional *protocol* argument, an integer, tells the pickler to use the given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If not specified, the default is :data:`DEFAULT_PROTOCOL`. If a negative number is specified, :data:`HIGHEST_PROT...
trusted_official_docs
CPython Docs
This takes a binary file for writing a pickle data stream. The optional *protocol* argument, an integer, tells the pickler to use the given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If not specified, the default is :data:`DEFAULT_PROTOCOL`. If a negative number is specified, :data:`HIGHEST_PROT...
This takes a binary file for writing a pickle data stream. The optional *protocol* argument, an integer, tells the pickler to use the given protocol; supported protocols are 0 to :data:`HIGHEST_PROTOCOL`. If not specified, the default is :data:`DEFAULT_PROTOCOL`. If a negative number is specified, :data:`HIGHEST_PROT...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcd18df3-564e-4183-b62d-8660e7fa4f8d
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,481
supabase-export-v2
26726869c13d0ab4
A wrapper for a buffer representing picklable data. *buffer* must be a :ref:`buffer-providing <bufferobjects>` object, such as a :term:`bytes-like object` or a N-dimensional array. :class:`PickleBuffer` is itself a buffer provider, therefore it is possible to pass it to other APIs expecting a buffer-providing object, ...
trusted_official_docs
CPython Docs
A wrapper for a buffer representing picklable data. *buffer* must be a :ref:`buffer-providing <bufferobjects>` object, such as a :term:`bytes-like object` or a N-dimensional array. :class:`PickleBuffer` is itself a buffer provider, therefore it is possible to pass it to other APIs expecting a buffer-providing object, ...
A wrapper for a buffer representing picklable data. *buffer* must be a :ref:`buffer-providing <bufferobjects>` object, such as a :term:`bytes-like object` or a N-dimensional array. :class:`PickleBuffer` is itself a buffer provider, therefore it is possible to pass it to other APIs expecting a buffer-providing object, ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcfc9f13-e9fe-411f-b7d9-c8c60aa124b3
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,473
supabase-export-v2
20f52824d5922380
If defined, :meth:`persistent_load` should return the object specified by the persistent ID *pid*. If an invalid persistent ID is encountered, an :exc:`UnpicklingError` should be raised. See :ref:`pickle-persistent` for details and examples of uses.
trusted_official_docs
CPython Docs
If defined, :meth:`persistent_load` should return the object specified by the persistent ID *pid*. If an invalid persistent ID is encountered, an :exc:`UnpicklingError` should be raised. See :ref:`pickle-persistent` for details and examples of uses.
If defined, :meth:`persistent_load` should return the object specified by the persistent ID *pid*. If an invalid persistent ID is encountered, an :exc:`UnpicklingError` should be raised. See :ref:`pickle-persistent` for details and examples of uses.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fd85f020-0a4b-4e6e-a93e-f6ac1d62340f
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,524
supabase-export-v2
0d0d8bab9cdec1b6
* For a class that has an instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``self.__dict__``. * For a class that has an instance :attr:`~object.__dict__` and :attr:`~object.__slots__`, the default state is a tuple consisting of two dictionaries: ``self.__dict__``, and a diction...
trusted_official_docs
CPython Docs
* For a class that has an instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``self.__dict__``. * For a class that has an instance :attr:`~object.__dict__` and :attr:`~object.__slots__`, the default state is a tuple consisting of two dictionaries: ``self.__dict__``, and a diction...
* For a class that has an instance :attr:`~object.__dict__` and no :attr:`~object.__slots__`, the default state is ``self.__dict__``. * For a class that has an instance :attr:`~object.__dict__` and :attr:`~object.__slots__`, the default state is a tuple consisting of two dictionaries: ``self.__dict__``, and a diction...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fda05ada-400e-4375-a932-cd4569ed5cf2
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,538
supabase-export-v2
03cba69046fbc8a0
.. method:: object.__reduce__() The interface is currently defined as follows. The :meth:`__reduce__` method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the "reduce value").
trusted_official_docs
CPython Docs
.. method:: object.__reduce__() The interface is currently defined as follows. The :meth:`__reduce__` method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the "reduce value").
.. method:: object.__reduce__() The interface is currently defined as follows. The :meth:`__reduce__` method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the "reduce value").
python, official-docs, cpython, P0
Local_Trusted_Corpus
feb88356-8c73-4ec7-82ca-c16844e651ae
CPython Docs
file://datasets/cpython/Doc/library/pickle.rst
unknown
d611e6ff-74a7-41e7-8f39-27f844eb2f66
32,477
supabase-export-v2
06b0ab96d024c4d5
called *name* from it, where the *module* and *name* arguments are :class:`str` objects. Note, unlike its name suggests, :meth:`find_class` is also used for finding functions. Subclasses may override this to gain control over what type of objects and how they can be loaded, potentially reducing security risks. Refer t...
trusted_official_docs
CPython Docs
called *name* from it, where the *module* and *name* arguments are :class:`str` objects. Note, unlike its name suggests, :meth:`find_class` is also used for finding functions. Subclasses may override this to gain control over what type of objects and how they can be loaded, potentially reducing security risks. Refer t...
called *name* from it, where the *module* and *name* arguments are :class:`str` objects. Note, unlike its name suggests, :meth:`find_class` is also used for finding functions. Subclasses may override this to gain control over what type of objects and how they can be loaded, potentially reducing security risks. Refer t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
002527d5-3e57-4a09-a440-67718c6c268c
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,335
supabase-export-v2
aca511bdf8ddc69c
Another common practice is to generate a self-signed certificate. The simplest way to do this is with the OpenSSL package, using something like the following:: % openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem Generating a 1024 bit RSA private key .......++++++ .............................+++...
trusted_official_docs
CPython Docs
Another common practice is to generate a self-signed certificate. The simplest way to do this is with the OpenSSL package, using something like the following:: % openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem Generating a 1024 bit RSA private key .......++++++ .............................+++...
Another common practice is to generate a self-signed certificate. The simplest way to do this is with the OpenSSL package, using something like the following:: % openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem Generating a 1024 bit RSA private key .......++++++ .............................+++...
python, official-docs, cpython, P0
Local_Trusted_Corpus
018cd35b-0d34-4a64-a617-1eaf0efd3dd1
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,185
supabase-export-v2
49d1fffbf30b8861
protocol will happen during the handshake, and will play out according to :rfc:`7301`. After a successful handshake, the :meth:`SSLSocket.selected_alpn_protocol` method will return the agreed-upon protocol. This method will raise :exc:`NotImplementedError` if :data:`HAS_ALPN` is ``False``.
trusted_official_docs
CPython Docs
protocol will happen during the handshake, and will play out according to :rfc:`7301`. After a successful handshake, the :meth:`SSLSocket.selected_alpn_protocol` method will return the agreed-upon protocol. This method will raise :exc:`NotImplementedError` if :data:`HAS_ALPN` is ``False``.
protocol will happen during the handshake, and will play out according to :rfc:`7301`. After a successful handshake, the :meth:`SSLSocket.selected_alpn_protocol` method will return the agreed-upon protocol. This method will raise :exc:`NotImplementedError` if :data:`HAS_ALPN` is ``False``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
02b73efc-806c-4cc4-98b4-d1631504ad98
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,005
supabase-export-v2
dab5ec702533325c
``SSL_write_ex`` internally. The functions support reading and writing of data larger than 2 GB. Writing zero-length data no longer fails with a protocol violation error. .. versionchanged:: 3.15 Python now uses ``SSL_sendfile`` internally when possible. The function sends a file more efficiently because it performs ...
trusted_official_docs
CPython Docs
``SSL_write_ex`` internally. The functions support reading and writing of data larger than 2 GB. Writing zero-length data no longer fails with a protocol violation error. .. versionchanged:: 3.15 Python now uses ``SSL_sendfile`` internally when possible. The function sends a file more efficiently because it performs ...
``SSL_write_ex`` internally. The functions support reading and writing of data larger than 2 GB. Writing zero-length data no longer fails with a protocol violation error. .. versionchanged:: 3.15 Python now uses ``SSL_sendfile`` internally when possible. The function sends a file more efficiently because it performs ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
02ec80fe-a8be-48f6-9246-3097e05a77b4
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,436
supabase-export-v2
18e3a11d1ab51849
>>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) >>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3 >>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3 The SSL context created above will only allow TLSv1.3 and later (if supported by your system) connections to a server. :const:`PROTOCOL_TLS...
trusted_official_docs
CPython Docs
>>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) >>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3 >>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3 The SSL context created above will only allow TLSv1.3 and later (if supported by your system) connections to a server. :const:`PROTOCOL_TLS...
>>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) >>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3 >>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3 The SSL context created above will only allow TLSv1.3 and later (if supported by your system) connections to a server. :const:`PROTOCOL_TLS...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0346e340-ae64-4f7c-bc2b-48dbf17e1df6
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,348
supabase-export-v2
3a32745bdb900623
assumes your operating system places a bundle of all CA certificates in ``/etc/ssl/certs/ca-bundle.crt``; if not, you'll get an error and have to adjust the location) The :data:`PROTOCOL_TLS_CLIENT` protocol configures the context for cert validation and hostname verification. :attr:`~SSLContext.verify_mode` is set to ...
trusted_official_docs
CPython Docs
assumes your operating system places a bundle of all CA certificates in ``/etc/ssl/certs/ca-bundle.crt``; if not, you'll get an error and have to adjust the location) The :data:`PROTOCOL_TLS_CLIENT` protocol configures the context for cert validation and hostname verification. :attr:`~SSLContext.verify_mode` is set to ...
assumes your operating system places a bundle of all CA certificates in ``/etc/ssl/certs/ca-bundle.crt``; if not, you'll get an error and have to adjust the location) The :data:`PROTOCOL_TLS_CLIENT` protocol configures the context for cert validation and hostname verification. :attr:`~SSLContext.verify_mode` is set to ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
04d8f96e-af93-47c6-9a1a-f099f6582ef6
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,078
supabase-export-v2
763e0e57bd5deb6f
.. method:: SSLSocket.verify_client_post_handshake() Requests post-handshake authentication (PHA) from a TLS 1.3 client. PHA can only be initiated for a TLS 1.3 connection from a server-side socket, after the initial TLS handshake and with PHA enabled on both sides, see :attr:`SSLContext.post_handshake_auth`.
trusted_official_docs
CPython Docs
.. method:: SSLSocket.verify_client_post_handshake() Requests post-handshake authentication (PHA) from a TLS 1.3 client. PHA can only be initiated for a TLS 1.3 connection from a server-side socket, after the initial TLS handshake and with PHA enabled on both sides, see :attr:`SSLContext.post_handshake_auth`.
.. method:: SSLSocket.verify_client_post_handshake() Requests post-handshake authentication (PHA) from a TLS 1.3 client. PHA can only be initiated for a TLS 1.3 connection from a server-side socket, after the initial TLS handshake and with PHA enabled on both sides, see :attr:`SSLContext.post_handshake_auth`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
072c2583-c8bc-47ec-b620-875623132efe
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,139
supabase-export-v2
c4ec9d4ccd5642e8
authority" (CA) certificates used to validate other peers' certificates when :data:`verify_mode` is other than :data:`CERT_NONE`. At least one of *cafile* or *capath* must be specified. This method can also load certification revocation lists (CRLs) in PEM or DER format. In order to make use of CRLs, :attr:`SSLContext...
trusted_official_docs
CPython Docs
authority" (CA) certificates used to validate other peers' certificates when :data:`verify_mode` is other than :data:`CERT_NONE`. At least one of *cafile* or *capath* must be specified. This method can also load certification revocation lists (CRLs) in PEM or DER format. In order to make use of CRLs, :attr:`SSLContext...
authority" (CA) certificates used to validate other peers' certificates when :data:`verify_mode` is other than :data:`CERT_NONE`. At least one of *cafile* or *capath* must be specified. This method can also load certification revocation lists (CRLs) in PEM or DER format. In order to make use of CRLs, :attr:`SSLContext...
python, official-docs, cpython, P0
Local_Trusted_Corpus
089e5949-fd17-49cb-b063-a6fa2bd9bd19
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,980
supabase-export-v2
a416fcf2a6a70ba7
.. data:: Purpose.SERVER_AUTH Option for :func:`create_default_context` and :meth:`SSLContext.load_default_certs`. This value indicates that the context may be used to authenticate web servers (therefore, it will be used to create client-side sockets).
trusted_official_docs
CPython Docs
.. data:: Purpose.SERVER_AUTH Option for :func:`create_default_context` and :meth:`SSLContext.load_default_certs`. This value indicates that the context may be used to authenticate web servers (therefore, it will be used to create client-side sockets).
.. data:: Purpose.SERVER_AUTH Option for :func:`create_default_context` and :meth:`SSLContext.load_default_certs`. This value indicates that the context may be used to authenticate web servers (therefore, it will be used to create client-side sockets).
python, official-docs, cpython, P0
Local_Trusted_Corpus
0abf2310-b748-4475-a05a-7ab68cd763e4
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,424
supabase-export-v2
37f9632e204fe48f
For example, here is how you would use the :class:`smtplib.SMTP` class to create a trusted, secure connection to a SMTP server:: >>> import ssl, smtplib >>> smtp = smtplib.SMTP("mail.python.org", port=587) >>> context = ssl.create_default_context() >>> smtp.starttls(context=context) (220, b'2.0.0 Ready to start TLS...
trusted_official_docs
CPython Docs
For example, here is how you would use the :class:`smtplib.SMTP` class to create a trusted, secure connection to a SMTP server:: >>> import ssl, smtplib >>> smtp = smtplib.SMTP("mail.python.org", port=587) >>> context = ssl.create_default_context() >>> smtp.starttls(context=context) (220, b'2.0.0 Ready to start TLS...
For example, here is how you would use the :class:`smtplib.SMTP` class to create a trusted, secure connection to a SMTP server:: >>> import ssl, smtplib >>> smtp = smtplib.SMTP("mail.python.org", port=587) >>> context = ssl.create_default_context() >>> smtp.starttls(context=context) (220, b'2.0.0 Ready to start TLS...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ba3a527-4586-46e6-9cd2-428727a693fe
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,398
supabase-export-v2
75b1879370a89a72
- The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike for an SSL socket where it returns the underlying socket. - The *server_name_callback* callback passed to :meth:`SSLContext.set_servername_callback` will get an :class:`SSLObject` instance instead of a :class:`SSLSocket` instance as its firs...
trusted_official_docs
CPython Docs
- The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike for an SSL socket where it returns the underlying socket. - The *server_name_callback* callback passed to :meth:`SSLContext.set_servername_callback` will get an :class:`SSLObject` instance instead of a :class:`SSLSocket` instance as its firs...
- The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike for an SSL socket where it returns the underlying socket. - The *server_name_callback* callback passed to :meth:`SSLContext.set_servername_callback` will get an :class:`SSLObject` instance instead of a :class:`SSLSocket` instance as its firs...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0d2c5cf6-e09e-466b-920b-f7e52d8131ff
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,008
supabase-export-v2
d3a6f18257a9ba43
.. method:: SSLSocket.read(len=1024, buffer=None) Read up to *len* bytes of data from the SSL socket and return the result as a ``bytes`` instance. If *buffer* is specified, then read into the buffer instead, and return the number of bytes read.
trusted_official_docs
CPython Docs
.. method:: SSLSocket.read(len=1024, buffer=None) Read up to *len* bytes of data from the SSL socket and return the result as a ``bytes`` instance. If *buffer* is specified, then read into the buffer instead, and return the number of bytes read.
.. method:: SSLSocket.read(len=1024, buffer=None) Read up to *len* bytes of data from the SSL socket and return the result as a ``bytes`` instance. If *buffer* is specified, then read into the buffer instead, and return the number of bytes read.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0e1b4d60-80fc-420f-8ba5-39f6091ce038
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,768
supabase-export-v2
331a7e6041733a5b
by the current RAND method. :func:`RAND_status` can be used to check the status of the PRNG and :func:`RAND_add` can be used to seed the PRNG. For almost all applications :func:`os.urandom` is preferable.
trusted_official_docs
CPython Docs
by the current RAND method. :func:`RAND_status` can be used to check the status of the PRNG and :func:`RAND_add` can be used to seed the PRNG. For almost all applications :func:`os.urandom` is preferable.
by the current RAND method. :func:`RAND_status` can be used to check the status of the PRNG and :func:`RAND_add` can be used to seed the PRNG. For almost all applications :func:`os.urandom` is preferable.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0e8d18c2-deb5-41a9-a209-d5098a3a2b46
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,263
supabase-export-v2
9450827247928a15
.. attribute:: SSLContext.options An integer representing the set of SSL options enabled on this context. The default value is :data:`OP_ALL`, but you can specify other options such as :data:`OP_NO_SSLv2` by ORing them together.
trusted_official_docs
CPython Docs
.. attribute:: SSLContext.options An integer representing the set of SSL options enabled on this context. The default value is :data:`OP_ALL`, but you can specify other options such as :data:`OP_NO_SSLv2` by ORing them together.
.. attribute:: SSLContext.options An integer representing the set of SSL options enabled on this context. The default value is :data:`OP_ALL`, but you can specify other options such as :data:`OP_NO_SSLv2` by ORing them together.
python, official-docs, cpython, P0
Local_Trusted_Corpus
103cad7a-48a2-4071-87a0-cd42b1874a55
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,321
supabase-export-v2
08a0b94c9ed7c818
that if you encrypt a message with one of the parts, you can decrypt it with the other part, and **only** with the other part. A certificate contains information about two principals. It contains the name of a *subject*, and the subject's public key. It also contains a statement by a second principal, the *issuer*, tha...
trusted_official_docs
CPython Docs
that if you encrypt a message with one of the parts, you can decrypt it with the other part, and **only** with the other part. A certificate contains information about two principals. It contains the name of a *subject*, and the subject's public key. It also contains a statement by a second principal, the *issuer*, tha...
that if you encrypt a message with one of the parts, you can decrypt it with the other part, and **only** with the other part. A certificate contains information about two principals. It contains the name of a *subject*, and the subject's public key. It also contains a statement by a second principal, the *issuer*, tha...
python, official-docs, cpython, P0
Local_Trusted_Corpus
116d8468-3789-4d6b-bcb7-42ac9a861d23
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,983
supabase-export-v2
b9cb3507b4b90b6c
.. data:: Purpose.CLIENT_AUTH Option for :func:`create_default_context` and :meth:`SSLContext.load_default_certs`. This value indicates that the context may be used to authenticate web clients (therefore, it will be used to create server-side sockets).
trusted_official_docs
CPython Docs
.. data:: Purpose.CLIENT_AUTH Option for :func:`create_default_context` and :meth:`SSLContext.load_default_certs`. This value indicates that the context may be used to authenticate web clients (therefore, it will be used to create server-side sockets).
.. data:: Purpose.CLIENT_AUTH Option for :func:`create_default_context` and :meth:`SSLContext.load_default_certs`. This value indicates that the context may be used to authenticate web clients (therefore, it will be used to create server-side sockets).
python, official-docs, cpython, P0
Local_Trusted_Corpus
12f5ec8a-84c3-4c8a-9539-6d64ca7d4b9c
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,894
supabase-export-v2
136c3d1a9c2c0605
.. data:: OP_NO_TLSv1_3 Prevents a TLSv1.3 connection. This option is only applicable in conjunction with :const:`PROTOCOL_TLS`. It prevents the peers from choosing TLSv1.3 as the protocol version. TLS 1.3 is available with OpenSSL 1.1.1 or later. When Python has been compiled against an older version of OpenSSL, the...
trusted_official_docs
CPython Docs
.. data:: OP_NO_TLSv1_3 Prevents a TLSv1.3 connection. This option is only applicable in conjunction with :const:`PROTOCOL_TLS`. It prevents the peers from choosing TLSv1.3 as the protocol version. TLS 1.3 is available with OpenSSL 1.1.1 or later. When Python has been compiled against an older version of OpenSSL, the...
.. data:: OP_NO_TLSv1_3 Prevents a TLSv1.3 connection. This option is only applicable in conjunction with :const:`PROTOCOL_TLS`. It prevents the peers from choosing TLSv1.3 as the protocol version. TLS 1.3 is available with OpenSSL 1.1.1 or later. When Python has been compiled against an older version of OpenSSL, the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
139bb163-c8af-419a-a773-f0150f5e0296
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,780
supabase-export-v2
53bb557966cfddcc
.. doctest:: newcontext >>> import ssl >>> import datetime as dt >>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT") >>> timestamp # doctest: +SKIP 1515144883 >>> print(dt.datetime.fromtimestamp(timestamp, dt.UTC)) # doctest: +SKIP 2018-01-05 09:34:43+00:00
trusted_official_docs
CPython Docs
.. doctest:: newcontext >>> import ssl >>> import datetime as dt >>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT") >>> timestamp # doctest: +SKIP 1515144883 >>> print(dt.datetime.fromtimestamp(timestamp, dt.UTC)) # doctest: +SKIP 2018-01-05 09:34:43+00:00
.. doctest:: newcontext >>> import ssl >>> import datetime as dt >>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT") >>> timestamp # doctest: +SKIP 1515144883 >>> print(dt.datetime.fromtimestamp(timestamp, dt.UTC)) # doctest: +SKIP 2018-01-05 09:34:43+00:00
python, official-docs, cpython, P0
Local_Trusted_Corpus
1440fa24-388a-4a48-85a6-1ace3620e290
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,991
supabase-export-v2
e227320dccad10a3
The minimum or maximum supported SSL or TLS version. These are magic constants. Their values don't reflect the lowest and highest available TLS/SSL versions. .. attribute:: TLSVersion.SSLv3 .. attribute:: TLSVersion.TLSv1 .. attribute:: TLSVersion.TLSv1_1 .. attribute:: TLSVersion.TLSv1_2 .. attribute:: TLSVersion.TLSv...
trusted_official_docs
CPython Docs
The minimum or maximum supported SSL or TLS version. These are magic constants. Their values don't reflect the lowest and highest available TLS/SSL versions. .. attribute:: TLSVersion.SSLv3 .. attribute:: TLSVersion.TLSv1 .. attribute:: TLSVersion.TLSv1_1 .. attribute:: TLSVersion.TLSv1_2 .. attribute:: TLSVersion.TLSv...
The minimum or maximum supported SSL or TLS version. These are magic constants. Their values don't reflect the lowest and highest available TLS/SSL versions. .. attribute:: TLSVersion.SSLv3 .. attribute:: TLSVersion.TLSv1 .. attribute:: TLSVersion.TLSv1_1 .. attribute:: TLSVersion.TLSv1_2 .. attribute:: TLSVersion.TLSv...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1519c5f8-aa77-4ebe-bbaf-114afcd8c8d0
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,003
supabase-export-v2
5c70f5837d63284d
.. deprecated:: 3.6 It is deprecated to create a :class:`SSLSocket` instance directly, use :meth:`SSLContext.wrap_socket` to wrap a socket. .. versionchanged:: 3.7 :class:`SSLSocket` instances must to created with :meth:`~SSLContext.wrap_socket`. In earlier versions, it was possible to create instances directly. Thi...
trusted_official_docs
CPython Docs
.. deprecated:: 3.6 It is deprecated to create a :class:`SSLSocket` instance directly, use :meth:`SSLContext.wrap_socket` to wrap a socket. .. versionchanged:: 3.7 :class:`SSLSocket` instances must to created with :meth:`~SSLContext.wrap_socket`. In earlier versions, it was possible to create instances directly. Thi...
.. deprecated:: 3.6 It is deprecated to create a :class:`SSLSocket` instance directly, use :meth:`SSLContext.wrap_socket` to wrap a socket. .. versionchanged:: 3.7 :class:`SSLSocket` instances must to created with :meth:`~SSLContext.wrap_socket`. In earlier versions, it was possible to create instances directly. Thi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
15d62e72-3be2-4097-ad73-b9a636c18535
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,271
supabase-export-v2
d809a8504002ace3
When enabled on client-side sockets, the client signals the server that it supports post-handshake authentication. When enabled on server-side sockets, :attr:`SSLContext.verify_mode` must be set to :data:`CERT_OPTIONAL` or :data:`CERT_REQUIRED`, too. The actual client cert exchange is delayed until :meth:`SSLSocket....
trusted_official_docs
CPython Docs
When enabled on client-side sockets, the client signals the server that it supports post-handshake authentication. When enabled on server-side sockets, :attr:`SSLContext.verify_mode` must be set to :data:`CERT_OPTIONAL` or :data:`CERT_REQUIRED`, too. The actual client cert exchange is delayed until :meth:`SSLSocket....
When enabled on client-side sockets, the client signals the server that it supports post-handshake authentication. When enabled on server-side sockets, :attr:`SSLContext.verify_mode` must be set to :data:`CERT_OPTIONAL` or :data:`CERT_REQUIRED`, too. The actual client cert exchange is delayed until :meth:`SSLSocket....
python, official-docs, cpython, P0
Local_Trusted_Corpus
16749b4f-e0fc-4714-9956-42cb8b98cb17
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,161
supabase-export-v2
95146f0706cbf000
.. method:: SSLContext.set_ciphers(ciphers, /) Set the allowed ciphers for sockets created with this context when connecting using TLS 1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format <https://docs.openssl.org/master/man1/ciphers/>`_. To set allowed TLS 1.3 ciphers, use :...
trusted_official_docs
CPython Docs
.. method:: SSLContext.set_ciphers(ciphers, /) Set the allowed ciphers for sockets created with this context when connecting using TLS 1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format <https://docs.openssl.org/master/man1/ciphers/>`_. To set allowed TLS 1.3 ciphers, use :...
.. method:: SSLContext.set_ciphers(ciphers, /) Set the allowed ciphers for sockets created with this context when connecting using TLS 1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format <https://docs.openssl.org/master/man1/ciphers/>`_. To set allowed TLS 1.3 ciphers, use :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
16aac5cb-2cc5-47bd-8c6e-d52c70a0f67d
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,146
supabase-export-v2
a1fb24afa5e6d24a
a list of DER-encoded certificates. The returned list does not contain certificates from *capath* unless a certificate was requested and loaded by a SSL connection. .. note:: Certificates in a capath directory aren't loaded unless they have been used at least once.
trusted_official_docs
CPython Docs
a list of DER-encoded certificates. The returned list does not contain certificates from *capath* unless a certificate was requested and loaded by a SSL connection. .. note:: Certificates in a capath directory aren't loaded unless they have been used at least once.
a list of DER-encoded certificates. The returned list does not contain certificates from *capath* unless a certificate was requested and loaded by a SSL connection. .. note:: Certificates in a capath directory aren't loaded unless they have been used at least once.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1753453d-527e-40c4-bbbd-ecf8c22965a9
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,254
supabase-export-v2
9ddc8d0b704d1ca5
enum member representing the highest supported TLS version. The value defaults to :attr:`TLSVersion.MAXIMUM_SUPPORTED`. The attribute is read-only for protocols other than :const:`PROTOCOL_TLS`, :const:`PROTOCOL_TLS_CLIENT`, and :const:`PROTOCOL_TLS_SERVER`. The attributes :attr:`~SSLContext.maximum_version`, :attr:`~...
trusted_official_docs
CPython Docs
enum member representing the highest supported TLS version. The value defaults to :attr:`TLSVersion.MAXIMUM_SUPPORTED`. The attribute is read-only for protocols other than :const:`PROTOCOL_TLS`, :const:`PROTOCOL_TLS_CLIENT`, and :const:`PROTOCOL_TLS_SERVER`. The attributes :attr:`~SSLContext.maximum_version`, :attr:`~...
enum member representing the highest supported TLS version. The value defaults to :attr:`TLSVersion.MAXIMUM_SUPPORTED`. The attribute is read-only for protocols other than :const:`PROTOCOL_TLS`, :const:`PROTOCOL_TLS_CLIENT`, and :const:`PROTOCOL_TLS_SERVER`. The attributes :attr:`~SSLContext.maximum_version`, :attr:`~...
python, official-docs, cpython, P0
Local_Trusted_Corpus
18465def-2e30-4601-a4f5-20836cab96ee
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,924
supabase-export-v2
64ad084fe0f2416a
it, and the negotiated cipher suites and extensions must be supported by it (a list of supported ones may vary by platform and kernel version). Note that with enabled kernel TLS some cryptographic operations are performed by the kernel directly and not via any available OpenSSL Providers. This might be undesirable if...
trusted_official_docs
CPython Docs
it, and the negotiated cipher suites and extensions must be supported by it (a list of supported ones may vary by platform and kernel version). Note that with enabled kernel TLS some cryptographic operations are performed by the kernel directly and not via any available OpenSSL Providers. This might be undesirable if...
it, and the negotiated cipher suites and extensions must be supported by it (a list of supported ones may vary by platform and kernel version). Note that with enabled kernel TLS some cryptographic operations are performed by the kernel directly and not via any available OpenSSL Providers. This might be undesirable if...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1902328e-0fc2-4ab5-9c0e-636a1a90e04e
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,220
supabase-export-v2
f307e714a26bd724
be a listening socket, and the server-side SSL wrapping is automatically performed on client connections accepted via the :meth:`accept` method. The method may raise :exc:`SSLError`. On client connections, the optional parameter *server_hostname* specifies the hostname of the service which we are connecting to. This a...
trusted_official_docs
CPython Docs
be a listening socket, and the server-side SSL wrapping is automatically performed on client connections accepted via the :meth:`accept` method. The method may raise :exc:`SSLError`. On client connections, the optional parameter *server_hostname* specifies the hostname of the service which we are connecting to. This a...
be a listening socket, and the server-side SSL wrapping is automatically performed on client connections accepted via the :meth:`accept` method. The method may raise :exc:`SSLError`. On client connections, the optional parameter *server_hostname* specifies the hostname of the service which we are connecting to. This a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
19f83510-355f-4803-885a-77c132fa7171
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,376
supabase-export-v2
977893b3a3cd91ab
of it. Therefore, you should first call :meth:`SSLSocket.recv` to drain any potentially available data, and then only block on a :func:`~select.select` call if still necessary. (of course, similar provisions apply when using other primitives such as :func:`~select.poll`, or those in the :mod:`selectors` module)
trusted_official_docs
CPython Docs
of it. Therefore, you should first call :meth:`SSLSocket.recv` to drain any potentially available data, and then only block on a :func:`~select.select` call if still necessary. (of course, similar provisions apply when using other primitives such as :func:`~select.poll`, or those in the :mod:`selectors` module)
of it. Therefore, you should first call :meth:`SSLSocket.recv` to drain any potentially available data, and then only block on a :func:`~select.select` call if still necessary. (of course, similar provisions apply when using other primitives such as :func:`~select.poll`, or those in the :mod:`selectors` module)
python, official-docs, cpython, P0
Local_Trusted_Corpus
1a7128e5-d9e6-43a3-b6d1-4b79ed36e1d1
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,118
supabase-export-v2
d475eeea0b5c5d19
.. note:: :class:`SSLContext` only supports limited mutation once it has been used by a connection. Adding new certificates to the internal trust store is allowed, but changing ciphers, verification settings, or mTLS certificates may result in surprising behavior.
trusted_official_docs
CPython Docs
.. note:: :class:`SSLContext` only supports limited mutation once it has been used by a connection. Adding new certificates to the internal trust store is allowed, but changing ciphers, verification settings, or mTLS certificates may result in surprising behavior.
.. note:: :class:`SSLContext` only supports limited mutation once it has been used by a connection. Adding new certificates to the internal trust store is allowed, but changing ciphers, verification settings, or mTLS certificates may result in surprising behavior.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1a8f859e-14c0-44f9-bb28-046d3249e4fa
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,200
supabase-export-v2
10ed2d06ae05db82
If an exception is raised from the *sni_callback* function the TLS connection will terminate with a fatal TLS alert message :const:`ALERT_DESCRIPTION_HANDSHAKE_FAILURE`. This method will raise :exc:`NotImplementedError` if the OpenSSL library had OPENSSL_NO_TLSEXT defined when it was built.
trusted_official_docs
CPython Docs
If an exception is raised from the *sni_callback* function the TLS connection will terminate with a fatal TLS alert message :const:`ALERT_DESCRIPTION_HANDSHAKE_FAILURE`. This method will raise :exc:`NotImplementedError` if the OpenSSL library had OPENSSL_NO_TLSEXT defined when it was built.
If an exception is raised from the *sni_callback* function the TLS connection will terminate with a fatal TLS alert message :const:`ALERT_DESCRIPTION_HANDSHAKE_FAILURE`. This method will raise :exc:`NotImplementedError` if the OpenSSL library had OPENSSL_NO_TLSEXT defined when it was built.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1d9d1d9b-e47d-4a0a-99ff-7acfe08f9e3b
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,341
supabase-export-v2
1f6a09469b353579
To test for the presence of SSL support in a Python installation, user code should use the following idiom:: try: import ssl except ImportError: pass else: ... # do something that requires SSL support
trusted_official_docs
CPython Docs
To test for the presence of SSL support in a Python installation, user code should use the following idiom:: try: import ssl except ImportError: pass else: ... # do something that requires SSL support
To test for the presence of SSL support in a Python installation, user code should use the following idiom:: try: import ssl except ImportError: pass else: ... # do something that requires SSL support
python, official-docs, cpython, P0
Local_Trusted_Corpus
1db6e7b0-1fcd-49d4-87c5-4ce39830203d
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,752
supabase-export-v2
d2e060b2e2c337ee
.. exception:: SSLSyscallError A subclass of :exc:`SSLError` raised when a system error was encountered while trying to fulfill an operation on a SSL socket. Unfortunately, there is no easy way to inspect the original errno number.
trusted_official_docs
CPython Docs
.. exception:: SSLSyscallError A subclass of :exc:`SSLError` raised when a system error was encountered while trying to fulfill an operation on a SSL socket. Unfortunately, there is no easy way to inspect the original errno number.
.. exception:: SSLSyscallError A subclass of :exc:`SSLError` raised when a system error was encountered while trying to fulfill an operation on a SSL socket. Unfortunately, there is no easy way to inspect the original errno number.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1e06cafb-b6f3-408b-8da8-2de5b9de483c
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,388
supabase-export-v2
f63a89e067979c0c
.. class:: SSLObject A reduced-scope variant of :class:`SSLSocket` representing an SSL protocol instance that does not contain any network IO methods. This class is typically used by framework authors that want to implement asynchronous IO for SSL through memory buffers.
trusted_official_docs
CPython Docs
.. class:: SSLObject A reduced-scope variant of :class:`SSLSocket` representing an SSL protocol instance that does not contain any network IO methods. This class is typically used by framework authors that want to implement asynchronous IO for SSL through memory buffers.
.. class:: SSLObject A reduced-scope variant of :class:`SSLSocket` representing an SSL protocol instance that does not contain any network IO methods. This class is typically used by framework authors that want to implement asynchronous IO for SSL through memory buffers.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f0d8eb8-f8a6-4e70-83aa-1e18f66d1ea0
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,004
supabase-export-v2
db63deaff9ef7ef7
3.7 :class:`SSLSocket` instances must to created with :meth:`~SSLContext.wrap_socket`. In earlier versions, it was possible to create instances directly. This was never documented or officially supported. .. versionchanged:: 3.10 Python now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The functions support r...
trusted_official_docs
CPython Docs
3.7 :class:`SSLSocket` instances must to created with :meth:`~SSLContext.wrap_socket`. In earlier versions, it was possible to create instances directly. This was never documented or officially supported. .. versionchanged:: 3.10 Python now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The functions support r...
3.7 :class:`SSLSocket` instances must to created with :meth:`~SSLContext.wrap_socket`. In earlier versions, it was possible to create instances directly. This was never documented or officially supported. .. versionchanged:: 3.10 Python now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The functions support r...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f4ce567-d643-4926-b6e2-5caa71c51065
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,141
supabase-export-v2
585fd5c776e9d915
file of concatenated CA certificates in PEM format. See the discussion of :ref:`ssl-certificates` for more information about how to arrange the certificates in this file. The *capath* string, if present, is the path to a directory containing several CA certificates in PEM format, following an `OpenSSL specific layout...
trusted_official_docs
CPython Docs
file of concatenated CA certificates in PEM format. See the discussion of :ref:`ssl-certificates` for more information about how to arrange the certificates in this file. The *capath* string, if present, is the path to a directory containing several CA certificates in PEM format, following an `OpenSSL specific layout...
file of concatenated CA certificates in PEM format. See the discussion of :ref:`ssl-certificates` for more information about how to arrange the certificates in this file. The *capath* string, if present, is the path to a directory containing several CA certificates in PEM format, following an `OpenSSL specific layout...
python, official-docs, cpython, P0
Local_Trusted_Corpus
205ce77b-b225-4a20-a78a-c01172c7c68f
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,397
supabase-export-v2
7a2d006da7cfb879
- There is no handling of *suppress_ragged_eofs*. All end-of-file conditions that are in violation of the protocol are reported via the :exc:`SSLEOFError` exception. - The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike for an SSL socket where it returns the underlying socket.
trusted_official_docs
CPython Docs
- There is no handling of *suppress_ragged_eofs*. All end-of-file conditions that are in violation of the protocol are reported via the :exc:`SSLEOFError` exception. - The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike for an SSL socket where it returns the underlying socket.
- There is no handling of *suppress_ragged_eofs*. All end-of-file conditions that are in violation of the protocol are reported via the :exc:`SSLEOFError` exception. - The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike for an SSL socket where it returns the underlying socket.
python, official-docs, cpython, P0
Local_Trusted_Corpus
206166b5-288e-4821-9e15-55edc8a22e5f
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,746
supabase-export-v2
a4f8ffb680ba5e4b
.. exception:: SSLWantReadError A subclass of :exc:`SSLError` raised by a :ref:`non-blocking SSL socket <ssl-nonblocking>` when trying to read or write data, but more data needs to be received on the underlying TCP transport before the request can be fulfilled.
trusted_official_docs
CPython Docs
.. exception:: SSLWantReadError A subclass of :exc:`SSLError` raised by a :ref:`non-blocking SSL socket <ssl-nonblocking>` when trying to read or write data, but more data needs to be received on the underlying TCP transport before the request can be fulfilled.
.. exception:: SSLWantReadError A subclass of :exc:`SSLError` raised by a :ref:`non-blocking SSL socket <ssl-nonblocking>` when trying to read or write data, but more data needs to be received on the underlying TCP transport before the request can be fulfilled.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2187c323-25d8-4c38-a7d3-b7596a725ad4
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,162
supabase-export-v2
a7adfd20b65d6397
1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format <https://docs.openssl.org/master/man1/ciphers/>`_. To set allowed TLS 1.3 ciphers, use :meth:`SSLContext.set_ciphersuites`. If no cipher can be selected (because compile-time options or other configuration forbids use of all ...
trusted_official_docs
CPython Docs
1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format <https://docs.openssl.org/master/man1/ciphers/>`_. To set allowed TLS 1.3 ciphers, use :meth:`SSLContext.set_ciphersuites`. If no cipher can be selected (because compile-time options or other configuration forbids use of all ...
1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format <https://docs.openssl.org/master/man1/ciphers/>`_. To set allowed TLS 1.3 ciphers, use :meth:`SSLContext.set_ciphersuites`. If no cipher can be selected (because compile-time options or other configuration forbids use of all ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
22b27c00-251a-4711-8bb0-2245eaff85f9
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,109
supabase-export-v2
5c5776df312ce681
yes yes no no *TLSv1.1* no no yes no yes no *TLSv1.2* no no yes no no yes ======================== ============ ============ ============= ========= =========== =========== .. rubric:: Footnotes .. [1] :class:`SSLContext` disables SSLv2 with :data:`OP_NO_SSLv2` by default. .. [2] :class:`SSLContext` disables SSLv3 wit...
trusted_official_docs
CPython Docs
yes yes no no *TLSv1.1* no no yes no yes no *TLSv1.2* no no yes no no yes ======================== ============ ============ ============= ========= =========== =========== .. rubric:: Footnotes .. [1] :class:`SSLContext` disables SSLv2 with :data:`OP_NO_SSLv2` by default. .. [2] :class:`SSLContext` disables SSLv3 wit...
yes yes no no *TLSv1.1* no no yes no yes no *TLSv1.2* no no yes no no yes ======================== ============ ============ ============= ========= =========== =========== .. rubric:: Footnotes .. [1] :class:`SSLContext` disables SSLv2 with :data:`OP_NO_SSLv2` by default. .. [2] :class:`SSLContext` disables SSLv3 wit...
python, official-docs, cpython, P0
Local_Trusted_Corpus
234980bf-b738-42b7-a88b-96b3035808c0
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,825
supabase-export-v2
d34cff9eccf9c576
.. data:: VERIFY_CRL_CHECK_LEAF Possible value for :attr:`SSLContext.verify_flags`. In this mode, only the peer cert is checked but none of the intermediate CA certificates. The mode requires a valid CRL that is signed by the peer cert's issuer (its direct ancestor CA). If no proper CRL has been loaded with :attr:`...
trusted_official_docs
CPython Docs
.. data:: VERIFY_CRL_CHECK_LEAF Possible value for :attr:`SSLContext.verify_flags`. In this mode, only the peer cert is checked but none of the intermediate CA certificates. The mode requires a valid CRL that is signed by the peer cert's issuer (its direct ancestor CA). If no proper CRL has been loaded with :attr:`...
.. data:: VERIFY_CRL_CHECK_LEAF Possible value for :attr:`SSLContext.verify_flags`. In this mode, only the peer cert is checked but none of the intermediate CA certificates. The mode requires a valid CRL that is signed by the peer cert's issuer (its direct ancestor CA). If no proper CRL has been loaded with :attr:`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
23fb78e9-fb95-4927-9269-5b757711a68e
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,143
supabase-export-v2
6264ea5e888a40eb
or a :term:`bytes-like object` of DER-encoded certificates. Like with *capath* extra lines around PEM-encoded certificates are ignored but at least one certificate must be present. .. versionchanged:: 3.4 New optional argument *cadata*
trusted_official_docs
CPython Docs
or a :term:`bytes-like object` of DER-encoded certificates. Like with *capath* extra lines around PEM-encoded certificates are ignored but at least one certificate must be present. .. versionchanged:: 3.4 New optional argument *cadata*
or a :term:`bytes-like object` of DER-encoded certificates. Like with *capath* extra lines around PEM-encoded certificates are ignored but at least one certificate must be present. .. versionchanged:: 3.4 New optional argument *cadata*
python, official-docs, cpython, P0
Local_Trusted_Corpus
24cd79d1-e7a2-4a03-a0ee-39bf7e2a2c89
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,032
supabase-export-v2
62050fa19dafaee5
(RDNs) given in the certificate's data structure for the respective fields, and each RDN is a sequence of name-value pairs. Here is a real-world example:: {'issuer': ((('countryName', 'IL'),), (('organizationName', 'StartCom Ltd.'),), (('organizationalUnitName', 'Secure Digital Certificate Signing'),), (('commonNam...
trusted_official_docs
CPython Docs
(RDNs) given in the certificate's data structure for the respective fields, and each RDN is a sequence of name-value pairs. Here is a real-world example:: {'issuer': ((('countryName', 'IL'),), (('organizationName', 'StartCom Ltd.'),), (('organizationalUnitName', 'Secure Digital Certificate Signing'),), (('commonNam...
(RDNs) given in the certificate's data structure for the respective fields, and each RDN is a sequence of name-value pairs. Here is a real-world example:: {'issuer': ((('countryName', 'IL'),), (('organizationName', 'StartCom Ltd.'),), (('organizationalUnitName', 'Secure Digital Certificate Signing'),), (('commonNam...
python, official-docs, cpython, P0
Local_Trusted_Corpus
255587e0-4ddd-416d-a483-2756c253858a
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,840
supabase-export-v2
be60fb6bd128ef45
.. data:: VERIFY_X509_PARTIAL_CHAIN Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to accept intermediate CAs in the trust store to be treated as trust-anchors, in the same way as the self-signed root CA certificates. This makes it possible to trust certificates issued by an intermediate CA...
trusted_official_docs
CPython Docs
.. data:: VERIFY_X509_PARTIAL_CHAIN Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to accept intermediate CAs in the trust store to be treated as trust-anchors, in the same way as the self-signed root CA certificates. This makes it possible to trust certificates issued by an intermediate CA...
.. data:: VERIFY_X509_PARTIAL_CHAIN Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to accept intermediate CAs in the trust store to be treated as trust-anchors, in the same way as the self-signed root CA certificates. This makes it possible to trust certificates issued by an intermediate CA...
python, official-docs, cpython, P0
Local_Trusted_Corpus
25e73ddf-854f-4994-b8b3-f2e3b587c9d0
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,974
supabase-export-v2
f7a0981802abba18
.. data:: ALERT_DESCRIPTION_HANDSHAKE_FAILURE ALERT_DESCRIPTION_INTERNAL_ERROR ALERT_DESCRIPTION_* Alert Descriptions from :rfc:`5246` and others. The `IANA TLS Alert Registry <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6>`_ contains this list and references to the RFCs where th...
trusted_official_docs
CPython Docs
.. data:: ALERT_DESCRIPTION_HANDSHAKE_FAILURE ALERT_DESCRIPTION_INTERNAL_ERROR ALERT_DESCRIPTION_* Alert Descriptions from :rfc:`5246` and others. The `IANA TLS Alert Registry <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6>`_ contains this list and references to the RFCs where th...
.. data:: ALERT_DESCRIPTION_HANDSHAKE_FAILURE ALERT_DESCRIPTION_INTERNAL_ERROR ALERT_DESCRIPTION_* Alert Descriptions from :rfc:`5246` and others. The `IANA TLS Alert Registry <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6>`_ contains this list and references to the RFCs where th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
260496a2-0659-407a-9651-cf353fd587a5
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,240
supabase-export-v2
bdb8c02acdffc311
.. method:: SSLContext.session_stats() Get statistics about the SSL sessions created or managed by this context. A dictionary is returned which maps the names of each `piece of information <https://docs.openssl.org/1.1.1/man3/SSL_CTX_sess_number/>`_ to their numeric values. For example, here is the total number of hit...
trusted_official_docs
CPython Docs
.. method:: SSLContext.session_stats() Get statistics about the SSL sessions created or managed by this context. A dictionary is returned which maps the names of each `piece of information <https://docs.openssl.org/1.1.1/man3/SSL_CTX_sess_number/>`_ to their numeric values. For example, here is the total number of hit...
.. method:: SSLContext.session_stats() Get statistics about the SSL sessions created or managed by this context. A dictionary is returned which maps the names of each `piece of information <https://docs.openssl.org/1.1.1/man3/SSL_CTX_sess_number/>`_ to their numeric values. For example, here is the total number of hit...
python, official-docs, cpython, P0
Local_Trusted_Corpus
27eebe42-3c91-46fa-ae67-a952c594307d
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,116
supabase-export-v2
5e0b4ed0b027d3d3
.. versionchanged:: 3.10 The default cipher suites now include only secure AES and ChaCha20 ciphers with forward secrecy and security level 2. RSA and DH keys with less than 2048 bits and ECC keys with less than 224 bits are prohibited. :data:`PROTOCOL_TLS`, :data:`PROTOCOL_TLS_CLIENT`, and :data:`PROTOCOL_TLS_SERVE...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.10 The default cipher suites now include only secure AES and ChaCha20 ciphers with forward secrecy and security level 2. RSA and DH keys with less than 2048 bits and ECC keys with less than 224 bits are prohibited. :data:`PROTOCOL_TLS`, :data:`PROTOCOL_TLS_CLIENT`, and :data:`PROTOCOL_TLS_SERVE...
.. versionchanged:: 3.10 The default cipher suites now include only secure AES and ChaCha20 ciphers with forward secrecy and security level 2. RSA and DH keys with less than 2048 bits and ECC keys with less than 224 bits are prohibited. :data:`PROTOCOL_TLS`, :data:`PROTOCOL_TLS_CLIENT`, and :data:`PROTOCOL_TLS_SERVE...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2b93f779-121c-4df0-aa1c-46e1666f18a3
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,320
supabase-export-v2
b5ab4963723eccf7
Certificates ------------ Certificates in general are part of a public-key / private-key system. In this system, each *principal*, (which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. One part of the key is public, and is called the *public key*; the other part is kept...
trusted_official_docs
CPython Docs
Certificates ------------ Certificates in general are part of a public-key / private-key system. In this system, each *principal*, (which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. One part of the key is public, and is called the *public key*; the other part is kept...
Certificates ------------ Certificates in general are part of a public-key / private-key system. In this system, each *principal*, (which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. One part of the key is public, and is called the *public key*; the other part is kept...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2e84f303-51d4-49a0-8795-cc2f59ad34a6
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,904
supabase-export-v2
ff761cc4d3d4bde4
.. data:: OP_SINGLE_DH_USE Prevents reuse of the same DH key for distinct SSL sessions. This improves forward secrecy but requires more computational resources. This option only applies to server sockets.
trusted_official_docs
CPython Docs
.. data:: OP_SINGLE_DH_USE Prevents reuse of the same DH key for distinct SSL sessions. This improves forward secrecy but requires more computational resources. This option only applies to server sockets.
.. data:: OP_SINGLE_DH_USE Prevents reuse of the same DH key for distinct SSL sessions. This improves forward secrecy but requires more computational resources. This option only applies to server sockets.
python, official-docs, cpython, P0
Local_Trusted_Corpus
34f15f65-b725-4af2-88cf-c8f615af6e7e
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
32,709
supabase-export-v2
13f20181af92d964
to trust for certificate verification, as in :meth:`SSLContext.load_verify_locations`. If all three are :const:`None`, this function can choose to trust the system's default CA certificates instead. The settings are: :data:`PROTOCOL_TLS_CLIENT` or :data:`PROTOCOL_TLS_SERVER`, :data:`OP_NO_SSLv2`, and :data:`OP_NO_SSLv...
trusted_official_docs
CPython Docs
to trust for certificate verification, as in :meth:`SSLContext.load_verify_locations`. If all three are :const:`None`, this function can choose to trust the system's default CA certificates instead. The settings are: :data:`PROTOCOL_TLS_CLIENT` or :data:`PROTOCOL_TLS_SERVER`, :data:`OP_NO_SSLv2`, and :data:`OP_NO_SSLv...
to trust for certificate verification, as in :meth:`SSLContext.load_verify_locations`. If all three are :const:`None`, this function can choose to trust the system's default CA certificates instead. The settings are: :data:`PROTOCOL_TLS_CLIENT` or :data:`PROTOCOL_TLS_SERVER`, :data:`OP_NO_SSLv2`, and :data:`OP_NO_SSLv...
python, official-docs, cpython, P0
Local_Trusted_Corpus
377908f7-0990-4d62-a164-8eed034f78fd
CPython Docs
file://datasets/cpython/Doc/library/ssl.rst
unknown
07d79692-13ee-4262-a503-2686ca28e16e
33,363
supabase-export-v2
dd339ed9c0595a6d
bindsocket = socket.socket() bindsocket.bind(('myaddr.example.com', 10023)) bindsocket.listen(5) When a client connects, you'll call :meth:`accept` on the socket to get the new socket from the other end, and use the context's :meth:`SSLContext.wrap_socket` method to create a server-side SSL socket for the connection::
trusted_official_docs
CPython Docs
bindsocket = socket.socket() bindsocket.bind(('myaddr.example.com', 10023)) bindsocket.listen(5) When a client connects, you'll call :meth:`accept` on the socket to get the new socket from the other end, and use the context's :meth:`SSLContext.wrap_socket` method to create a server-side SSL socket for the connection::
bindsocket = socket.socket() bindsocket.bind(('myaddr.example.com', 10023)) bindsocket.listen(5) When a client connects, you'll call :meth:`accept` on the socket to get the new socket from the other end, and use the context's :meth:`SSLContext.wrap_socket` method to create a server-side SSL socket for the connection::
python, official-docs, cpython, P0
Local_Trusted_Corpus