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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eda32dfe-637a-495b-9383-d227b1ec77ed | CPython Docs | file://datasets/cpython/Doc/library/email.headerregistry.rst | unknown | 5c691935-22e6-42e2-9bf8-a183751b9d22 | 33,981 | supabase-export-v2 | b175fe880fb5ec9e | assume that *string* may contain content-transfer-encoded parts, but should correctly handle all valid unicode characters as well so that it can parse un-encoded header values.
``BaseHeader``'s ``__new__`` then creates the header instance, and calls its
``init`` method. The specialized class only needs to provide an `... | trusted_official_docs | CPython Docs | assume that *string* may contain content-transfer-encoded parts, but should correctly handle all valid unicode characters as well so that it can parse un-encoded header values.
``BaseHeader``'s ``__new__`` then creates the header instance, and calls its
``init`` method. The specialized class only needs to provide an `... | assume that *string* may contain content-transfer-encoded parts, but should correctly handle all valid unicode characters as well so that it can parse un-encoded header values.
``BaseHeader``'s ``__new__`` then creates the header instance, and calls its
``init`` method. The specialized class only needs to provide an `... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f33aab6c-da1e-4c68-9dae-aec585939059 | CPython Docs | file://datasets/cpython/Doc/library/email.headerregistry.rst | unknown | 5c691935-22e6-42e2-9bf8-a183751b9d22 | 33,990 | supabase-export-v2 | 7deee22f2ceeba7b | email headers. The ``DateHeader`` parser recognizes that date format, as well as recognizing a number of variant forms that are sometimes found "in the wild".
This header type provides the following additional attributes: | trusted_official_docs | CPython Docs | email headers. The ``DateHeader`` parser recognizes that date format, as well as recognizing a number of variant forms that are sometimes found "in the wild".
This header type provides the following additional attributes: | email headers. The ``DateHeader`` parser recognizes that date format, as well as recognizing a number of variant forms that are sometimes found "in the wild".
This header type provides the following additional attributes: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fb266856-4649-49d2-a5c9-00ad5df8aa64 | CPython Docs | file://datasets/cpython/Doc/library/email.headerregistry.rst | unknown | 5c691935-22e6-42e2-9bf8-a183751b9d22 | 33,993 | supabase-export-v2 | c38fe7a2db6e627a | :class:`~datetime.datetime`. If a specific timezone offset is found (including ``+0000``), then :attr:`.datetime` will contain an aware ``datetime`` that uses :class:`datetime.timezone` to record the timezone offset.
The ``decoded`` value of the header is determined by formatting the
``datetime`` according to the :rfc... | trusted_official_docs | CPython Docs | :class:`~datetime.datetime`. If a specific timezone offset is found (including ``+0000``), then :attr:`.datetime` will contain an aware ``datetime`` that uses :class:`datetime.timezone` to record the timezone offset.
The ``decoded`` value of the header is determined by formatting the
``datetime`` according to the :rfc... | :class:`~datetime.datetime`. If a specific timezone offset is found (including ``+0000``), then :attr:`.datetime` will contain an aware ``datetime`` that uses :class:`datetime.timezone` to record the timezone offset.
The ``decoded`` value of the header is determined by formatting the
``datetime`` according to the :rfc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff7b9933-e81e-4177-8e6b-b3505d64c5a0 | CPython Docs | file://datasets/cpython/Doc/library/email.headerregistry.rst | unknown | 5c691935-22e6-42e2-9bf8-a183751b9d22 | 33,964 | supabase-export-v2 | e7a9486b77f83edb | not only provides customized header objects for various header types, but also provides an extension mechanism for applications to add their own custom header types.
When using any of the policy objects derived from
:data:`~email.policy.EmailPolicy`, all headers are produced by
:class:`.HeaderRegistry` and have :class:... | trusted_official_docs | CPython Docs | not only provides customized header objects for various header types, but also provides an extension mechanism for applications to add their own custom header types.
When using any of the policy objects derived from
:data:`~email.policy.EmailPolicy`, all headers are produced by
:class:`.HeaderRegistry` and have :class:... | not only provides customized header objects for various header types, but also provides an extension mechanism for applications to add their own custom header types.
When using any of the policy objects derived from
:data:`~email.policy.EmailPolicy`, all headers are produced by
:class:`.HeaderRegistry` and have :class:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
00a7967f-5397-43c5-b80b-27d3bae4bc16 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,090 | supabase-export-v2 | e505fe2dab6a866b | Yet another view is the transport and protocol interfaces together define an abstract interface for using network I/O and interprocess I/O.
There is always a 1:1 relationship between transport and protocol
objects: the protocol calls transport methods to send data,
while the transport calls protocol methods to pass it ... | trusted_official_docs | CPython Docs | Yet another view is the transport and protocol interfaces together define an abstract interface for using network I/O and interprocess I/O.
There is always a 1:1 relationship between transport and protocol
objects: the protocol calls transport methods to send data,
while the transport calls protocol methods to pass it ... | Yet another view is the transport and protocol interfaces together define an abstract interface for using network I/O and interprocess I/O.
There is always a 1:1 relationship between transport and protocol
objects: the protocol calls transport methods to send data,
while the transport calls protocol methods to pass it ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
09580f56-e795-4c4a-832e-95a124532194 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,268 | supabase-export-v2 | 20408d8fb4fc9cd3 | Buffered Protocols can be used with any event loop method that supports `Streaming Protocols`_.
``BufferedProtocol`` implementations allow explicit manual allocation
and control of the receive buffer. Event loops can then use the buffer
provided by the protocol to avoid unnecessary data copies. This
can result in notic... | trusted_official_docs | CPython Docs | Buffered Protocols can be used with any event loop method that supports `Streaming Protocols`_.
``BufferedProtocol`` implementations allow explicit manual allocation
and control of the receive buffer. Event loops can then use the buffer
provided by the protocol to avoid unnecessary data copies. This
can result in notic... | Buffered Protocols can be used with any event loop method that supports `Streaming Protocols`_.
``BufferedProtocol`` implementations allow explicit manual allocation
and control of the receive buffer. Event loops can then use the buffer
provided by the protocol to avoid unnecessary data copies. This
can result in notic... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0b478a84-4153-40f0-8891-e3806b9fe0d5 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,251 | supabase-export-v2 | 57db36376d75085d | If the buffer size equals the high watermark, :meth:`~BaseProtocol.pause_writing` is not called: the buffer size must go strictly over.
Conversely, :meth:`~BaseProtocol.resume_writing` is called when the
buffer size is equal or lower than the low watermark. These end
conditions are important to ensure that things go as... | trusted_official_docs | CPython Docs | If the buffer size equals the high watermark, :meth:`~BaseProtocol.pause_writing` is not called: the buffer size must go strictly over.
Conversely, :meth:`~BaseProtocol.resume_writing` is called when the
buffer size is equal or lower than the low watermark. These end
conditions are important to ensure that things go as... | If the buffer size equals the high watermark, :meth:`~BaseProtocol.pause_writing` is not called: the buffer size must go strictly over.
Conversely, :meth:`~BaseProtocol.resume_writing` is called when the
buffer size is equal or lower than the low watermark. These end
conditions are important to ensure that things go as... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0c9f4b70-c3f2-4624-ba59-7bf953df780b | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,176 | supabase-export-v2 | d2144fb491d71c5d | Set the *high* and *low* watermarks for write flow control.
These two values (measured in number of
bytes) control when the protocol's
:meth:`protocol.pause_writing() <BaseProtocol.pause_writing>`
and :meth:`protocol.resume_writing() <BaseProtocol.resume_writing>`
methods are called. If specified, the low watermark... | trusted_official_docs | CPython Docs | Set the *high* and *low* watermarks for write flow control.
These two values (measured in number of
bytes) control when the protocol's
:meth:`protocol.pause_writing() <BaseProtocol.pause_writing>`
and :meth:`protocol.resume_writing() <BaseProtocol.resume_writing>`
methods are called. If specified, the low watermark... | Set the *high* and *low* watermarks for write flow control.
These two values (measured in number of
bytes) control when the protocol's
:meth:`protocol.pause_writing() <BaseProtocol.pause_writing>`
and :meth:`protocol.resume_writing() <BaseProtocol.resume_writing>`
methods are called. If specified, the low watermark... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f483c58-84a5-4211-8e74-3560307323c9 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,162 | supabase-export-v2 | 560cea61ef388157 | Resume the receiving end. The protocol's :meth:`protocol.data_received() <Protocol.data_received>` method will be called once again if some data is available for reading.
.. versionchanged:: 3.7
The method is idempotent, i.e. it can be called when the
transport is already reading. | trusted_official_docs | CPython Docs | Resume the receiving end. The protocol's :meth:`protocol.data_received() <Protocol.data_received>` method will be called once again if some data is available for reading.
.. versionchanged:: 3.7
The method is idempotent, i.e. it can be called when the
transport is already reading. | Resume the receiving end. The protocol's :meth:`protocol.data_received() <Protocol.data_received>` method will be called once again if some data is available for reading.
.. versionchanged:: 3.7
The method is idempotent, i.e. it can be called when the
transport is already reading. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1fea0371-a9bb-4bbd-8d8d-8aa7c161785e | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,327 | supabase-export-v2 | b5e30418f97eea74 | def connection_lost(self, exc): print('The server closed the connection') self.on_con_lost.set_result(True)
async def main():
# Get a reference to the event loop as we plan to use
# low-level APIs. loop = asyncio.get_running_loop() | trusted_official_docs | CPython Docs | def connection_lost(self, exc): print('The server closed the connection') self.on_con_lost.set_result(True)
async def main():
# Get a reference to the event loop as we plan to use
# low-level APIs. loop = asyncio.get_running_loop() | def connection_lost(self, exc): print('The server closed the connection') self.on_con_lost.set_result(True)
async def main():
# Get a reference to the event loop as we plan to use
# low-level APIs. loop = asyncio.get_running_loop() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
231edc12-8457-446e-9da1-6efaff751035 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,370 | supabase-export-v2 | df518c8fc612dbcb | async def main(): # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop() on_con_lost = loop.create_future()
# Create a pair of connected sockets
rsock, wsock = socket.socketpair() | trusted_official_docs | CPython Docs | async def main(): # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop() on_con_lost = loop.create_future()
# Create a pair of connected sockets
rsock, wsock = socket.socketpair() | async def main(): # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop() on_con_lost = loop.create_future()
# Create a pair of connected sockets
rsock, wsock = socket.socketpair() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
238f2633-6043-4e88-bc90-0754c87b3e98 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,279 | supabase-export-v2 | b675bd15658024c0 | See the documentation of the :meth:`protocol.eof_received() <Protocol.eof_received>` method.
:meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number
of times during a connection. However, :meth:`protocol.eof_received()
<Protocol.eof_received>` is called at most once
and, if called, :meth:`~BufferedProtoc... | trusted_official_docs | CPython Docs | See the documentation of the :meth:`protocol.eof_received() <Protocol.eof_received>` method.
:meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number
of times during a connection. However, :meth:`protocol.eof_received()
<Protocol.eof_received>` is called at most once
and, if called, :meth:`~BufferedProtoc... | See the documentation of the :meth:`protocol.eof_received() <Protocol.eof_received>` method.
:meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number
of times during a connection. However, :meth:`protocol.eof_received()
<Protocol.eof_received>` is called at most once
and, if called, :meth:`~BufferedProtoc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
245c79c8-7fd6-4ee1-8934-11b14bede271 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,342 | supabase-export-v2 | ebfddfefacea405d | # One protocol instance will be created to serve all # client requests. transport, protocol = await loop.create_datagram_endpoint( EchoServerProtocol, local_addr=('127.0.0.1', 9999))
try:
await asyncio.sleep(3600) # Serve for 1 hour. finally:
transport.close() | trusted_official_docs | CPython Docs | # One protocol instance will be created to serve all # client requests. transport, protocol = await loop.create_datagram_endpoint( EchoServerProtocol, local_addr=('127.0.0.1', 9999))
try:
await asyncio.sleep(3600) # Serve for 1 hour. finally:
transport.close() | # One protocol instance will be created to serve all # client requests. transport, protocol = await loop.create_datagram_endpoint( EchoServerProtocol, local_addr=('127.0.0.1', 9999))
try:
await asyncio.sleep(3600) # Serve for 1 hour. finally:
transport.close() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2613f509-c572-40c7-9ef5-5c39a48f613c | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,201 | supabase-export-v2 | 78016f06af002c27 | Return the transport for the communication pipe corresponding to the integer file descriptor *fd*:
* ``0``: writable streaming transport of the standard input (*stdin*),
or :const:`None` if the subprocess was not created with ``stdin=PIPE``
* ``1``: readable streaming transport of the standard output (*stdout*),
or ... | trusted_official_docs | CPython Docs | Return the transport for the communication pipe corresponding to the integer file descriptor *fd*:
* ``0``: writable streaming transport of the standard input (*stdin*),
or :const:`None` if the subprocess was not created with ``stdin=PIPE``
* ``1``: readable streaming transport of the standard output (*stdout*),
or ... | Return the transport for the communication pipe corresponding to the integer file descriptor *fd*:
* ``0``: writable streaming transport of the standard input (*stdin*),
or :const:`None` if the subprocess was not created with ``stdin=PIPE``
* ``1``: readable streaming transport of the standard output (*stdout*),
or ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
263ff056-cd56-4f31-8f57-3f971cedcad7 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,172 | supabase-export-v2 | 0a000dd048aa4a1c | Get the *high* and *low* watermarks for write flow control. Return a tuple ``(low, high)`` where *low* and *high* are positive number of bytes.
Use :meth:`set_write_buffer_limits` to set the limits. | trusted_official_docs | CPython Docs | Get the *high* and *low* watermarks for write flow control. Return a tuple ``(low, high)`` where *low* and *high* are positive number of bytes.
Use :meth:`set_write_buffer_limits` to set the limits. | Get the *high* and *low* watermarks for write flow control. Return a tuple ``(low, high)`` where *low* and *high* are positive number of bytes.
Use :meth:`set_write_buffer_limits` to set the limits. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
277601e8-6651-4dcf-8970-66b0995fa043 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,088 | supabase-export-v2 | 4315086b8c2e0324 | the highest level, the transport is concerned with *how* bytes are transmitted, while the protocol determines *which* bytes to transmit (and to some extent when).
A different way of saying the same thing: a transport is an
abstraction for a socket (or similar I/O endpoint) while a protocol
is an abstraction for an appl... | trusted_official_docs | CPython Docs | the highest level, the transport is concerned with *how* bytes are transmitted, while the protocol determines *which* bytes to transmit (and to some extent when).
A different way of saying the same thing: a transport is an
abstraction for a socket (or similar I/O endpoint) while a protocol
is an abstraction for an appl... | the highest level, the transport is concerned with *how* bytes are transmitted, while the protocol determines *which* bytes to transmit (and to some extent when).
A different way of saying the same thing: a transport is an
abstraction for a socket (or similar I/O endpoint) while a protocol
is an abstraction for an appl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2a5d3d49-7bd3-4598-bea5-c026de72f541 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,142 | supabase-export-v2 | 4e02f2bf7d7d23da | - ``'compression'``: the compression algorithm being used as a string, or ``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket.compression`
- ``'cipher'``: a three-value tuple containing the name of the
cipher being used, the version of the SSL protocol that defines
its use, and the number of s... | trusted_official_docs | CPython Docs | - ``'compression'``: the compression algorithm being used as a string, or ``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket.compression`
- ``'cipher'``: a three-value tuple containing the name of the
cipher being used, the version of the SSL protocol that defines
its use, and the number of s... | - ``'compression'``: the compression algorithm being used as a string, or ``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket.compression`
- ``'cipher'``: a three-value tuple containing the name of the
cipher being used, the version of the SSL protocol that defines
its use, and the number of s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2bb24e93-0359-483a-8178-e0dc3db22f6d | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,126 | supabase-export-v2 | be914f460b72a372 | Close the transport.
If the transport has a buffer for outgoing
data, buffered data will be flushed asynchronously. No more data
will be received. After all buffered data is flushed, the
protocol's :meth:`protocol.connection_lost()
<BaseProtocol.connection_lost>` method will be called with
:const:`None` as its arg... | trusted_official_docs | CPython Docs | Close the transport.
If the transport has a buffer for outgoing
data, buffered data will be flushed asynchronously. No more data
will be received. After all buffered data is flushed, the
protocol's :meth:`protocol.connection_lost()
<BaseProtocol.connection_lost>` method will be called with
:const:`None` as its arg... | Close the transport.
If the transport has a buffer for outgoing
data, buffered data will be flushed asynchronously. No more data
will be received. After all buffered data is flushed, the
protocol's :meth:`protocol.connection_lost()
<BaseProtocol.connection_lost>` method will be called with
:const:`None` as its arg... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2eefb331-06a8-41b9-a611-1782fda93e9b | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,194 | supabase-export-v2 | 3ff417c7670bbfb0 | .. method:: DatagramTransport.abort()
Close the transport immediately, without waiting for pending
operations to complete. Buffered data will be lost. No more data will be received. The protocol's
:meth:`protocol.connection_lost() <BaseProtocol.connection_lost>`
method will eventually be called with :const:`None` as... | trusted_official_docs | CPython Docs | .. method:: DatagramTransport.abort()
Close the transport immediately, without waiting for pending
operations to complete. Buffered data will be lost. No more data will be received. The protocol's
:meth:`protocol.connection_lost() <BaseProtocol.connection_lost>`
method will eventually be called with :const:`None` as... | .. method:: DatagramTransport.abort()
Close the transport immediately, without waiting for pending
operations to complete. Buffered data will be lost. No more data will be received. The protocol's
:meth:`protocol.connection_lost() <BaseProtocol.connection_lost>`
method will eventually be called with :const:`None` as... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
318cb900-4cc1-46f4-8ffc-ccc5c1eea419 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,256 | supabase-export-v2 | 3ea9c5ae46441024 | Called when some data is received. *data* is a non-empty bytes object containing the incoming data.
Whether the data is buffered, chunked or reassembled depends on
the transport. In general, you shouldn't rely on specific semantics
and instead make your parsing generic and flexible. However,
data is always received ... | trusted_official_docs | CPython Docs | Called when some data is received. *data* is a non-empty bytes object containing the incoming data.
Whether the data is buffered, chunked or reassembled depends on
the transport. In general, you shouldn't rely on specific semantics
and instead make your parsing generic and flexible. However,
data is always received ... | Called when some data is received. *data* is a non-empty bytes object containing the incoming data.
Whether the data is buffered, chunked or reassembled depends on
the transport. In general, you shouldn't rely on specific semantics
and instead make your parsing generic and flexible. However,
data is always received ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
41350637-0e7f-40d9-bc8c-deb72be2abd4 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,269 | supabase-export-v2 | 9fd55adbfc05c33f | can result in noticeable performance improvement for protocols that receive big amounts of data. Sophisticated protocol implementations can significantly reduce the number of buffer allocations.
The following callbacks are called on :class:`BufferedProtocol`
instances: | trusted_official_docs | CPython Docs | can result in noticeable performance improvement for protocols that receive big amounts of data. Sophisticated protocol implementations can significantly reduce the number of buffer allocations.
The following callbacks are called on :class:`BufferedProtocol`
instances: | can result in noticeable performance improvement for protocols that receive big amounts of data. Sophisticated protocol implementations can significantly reduce the number of buffer allocations.
The following callbacks are called on :class:`BufferedProtocol`
instances: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4328bd8d-44be-458d-b888-6299fd3b70d3 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,242 | supabase-export-v2 | 009537740f8ee072 | Called when the connection is lost or closed.
The argument is either an exception object or :const:`None`. The latter means a regular EOF is received, or the connection was
aborted or closed by this side of the connection. | trusted_official_docs | CPython Docs | Called when the connection is lost or closed.
The argument is either an exception object or :const:`None`. The latter means a regular EOF is received, or the connection was
aborted or closed by this side of the connection. | Called when the connection is lost or closed.
The argument is either an exception object or :const:`None`. The latter means a regular EOF is received, or the connection was
aborted or closed by this side of the connection. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
446118bb-49b0-49a8-91da-8a2d11253f5d | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,288 | supabase-export-v2 | 0a155423f21879c8 | Called when a previous send or receive operation raises an :class:`OSError`. *exc* is the :class:`OSError` instance.
This method is called in rare conditions, when the transport (e.g. UDP)
detects that a datagram could not be delivered to its recipient. In many conditions though, undeliverable datagrams will be silent... | trusted_official_docs | CPython Docs | Called when a previous send or receive operation raises an :class:`OSError`. *exc* is the :class:`OSError` instance.
This method is called in rare conditions, when the transport (e.g. UDP)
detects that a datagram could not be delivered to its recipient. In many conditions though, undeliverable datagrams will be silent... | Called when a previous send or receive operation raises an :class:`OSError`. *exc* is the :class:`OSError` instance.
This method is called in rare conditions, when the transport (e.g. UDP)
detects that a datagram could not be delivered to its recipient. In many conditions though, undeliverable datagrams will be silent... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4494f445-2b62-41f4-9ffb-9d3bd534f720 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,390 | supabase-export-v2 | 93be2bdf735017b5 | the subprocess controlled by DateProtocol; # redirect the standard output into a pipe. transport, protocol = await loop.subprocess_exec( lambda: DateProtocol(exit_future), sys.executable, '-c', code, stdin=None, stderr=None)
# Wait for the subprocess exit using the process_exited()
# method of the protocol. await exit... | trusted_official_docs | CPython Docs | the subprocess controlled by DateProtocol; # redirect the standard output into a pipe. transport, protocol = await loop.subprocess_exec( lambda: DateProtocol(exit_future), sys.executable, '-c', code, stdin=None, stderr=None)
# Wait for the subprocess exit using the process_exited()
# method of the protocol. await exit... | the subprocess controlled by DateProtocol; # redirect the standard output into a pipe. transport, protocol = await loop.subprocess_exec( lambda: DateProtocol(exit_future), sys.executable, '-c', code, stdin=None, stderr=None)
# Wait for the subprocess exit using the process_exited()
# method of the protocol. await exit... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4e0fd80f-ccf4-471b-91a3-6dc92d16ab7b | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,091 | supabase-export-v2 | 1c19d4cac7125992 | and protocol objects: the protocol calls transport methods to send data, while the transport calls protocol methods to pass it data that has been received.
Most of connection oriented event loop methods
(such as :meth:`loop.create_connection`) usually accept a
*protocol_factory* argument used to create a *Protocol* obj... | trusted_official_docs | CPython Docs | and protocol objects: the protocol calls transport methods to send data, while the transport calls protocol methods to pass it data that has been received.
Most of connection oriented event loop methods
(such as :meth:`loop.create_connection`) usually accept a
*protocol_factory* argument used to create a *Protocol* obj... | and protocol objects: the protocol calls transport methods to send data, while the transport calls protocol methods to pass it data that has been received.
Most of connection oriented event loop methods
(such as :meth:`loop.create_connection`) usually accept a
*protocol_factory* argument used to create a *Protocol* obj... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4e6192f5-562d-49a8-abe9-461ca40a11c9 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,376 | supabase-export-v2 | 2322133facc5b28f | The :ref:`watch a file descriptor for read events <asyncio_example_watch_fd>` example uses the low-level :meth:`loop.add_reader` method to register an FD.
The :ref:`register an open socket to wait for data using streams
<asyncio_example_create_connection-streams>` example uses high-level streams
created by the :func:... | trusted_official_docs | CPython Docs | The :ref:`watch a file descriptor for read events <asyncio_example_watch_fd>` example uses the low-level :meth:`loop.add_reader` method to register an FD.
The :ref:`register an open socket to wait for data using streams
<asyncio_example_create_connection-streams>` example uses high-level streams
created by the :func:... | The :ref:`watch a file descriptor for read events <asyncio_example_watch_fd>` example uses the low-level :meth:`loop.add_reader` method to register an FD.
The :ref:`register an open socket to wait for data using streams
<asyncio_example_create_connection-streams>` example uses high-level streams
created by the :func:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4fb34a47-3f77-449f-9fc1-9a1902d4b552 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,184 | supabase-export-v2 | 941cd0db15c9298a | .. method:: WriteTransport.writelines(list_of_data)
Write a list (or any iterable) of data bytes to the transport. This is functionally equivalent to calling :meth:`write` on each
element yielded by the iterable, but may be implemented more
efficiently. | trusted_official_docs | CPython Docs | .. method:: WriteTransport.writelines(list_of_data)
Write a list (or any iterable) of data bytes to the transport. This is functionally equivalent to calling :meth:`write` on each
element yielded by the iterable, but may be implemented more
efficiently. | .. method:: WriteTransport.writelines(list_of_data)
Write a list (or any iterable) of data bytes to the transport. This is functionally equivalent to calling :meth:`write` on each
element yielded by the iterable, but may be implemented more
efficiently. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51abf0d0-8a95-4b77-9972-618fd00030bf | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,386 | supabase-export-v2 | 85bf803cc788ba64 | def process_exited(self): self.exited = True # process_exited() method can be called before # pipe_connection_lost() method: wait until both methods are # called. self.check_for_exit()
def check_for_exit(self):
if self.pipe_closed and self.exited:
self.exit_future.set_result(True) | trusted_official_docs | CPython Docs | def process_exited(self): self.exited = True # process_exited() method can be called before # pipe_connection_lost() method: wait until both methods are # called. self.check_for_exit()
def check_for_exit(self):
if self.pipe_closed and self.exited:
self.exit_future.set_result(True) | def process_exited(self): self.exited = True # process_exited() method can be called before # pipe_connection_lost() method: wait until both methods are # called. self.check_for_exit()
def check_for_exit(self):
if self.pipe_closed and self.exited:
self.exit_future.set_result(True) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5327a79a-26d4-4c4a-97e4-ffe143a0e06c | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,133 | supabase-export-v2 | 118689c4d7880bc5 | information is not available, or if the transport does not support querying it with the given third-party event loop implementation or on the current platform.
For example, the following code attempts to get the underlying
socket object of the transport:: | trusted_official_docs | CPython Docs | information is not available, or if the transport does not support querying it with the given third-party event loop implementation or on the current platform.
For example, the following code attempts to get the underlying
socket object of the transport:: | information is not available, or if the transport does not support querying it with the given third-party event loop implementation or on the current platform.
For example, the following code attempts to get the underlying
socket object of the transport:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
620f1308-a316-4552-a265-663a5b2f122f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,102 | supabase-export-v2 | 43dc99820bb772d8 | Transport objects are always instantiated by an :ref:`asyncio event loop <asyncio-event-loop>`.
asyncio implements transports for TCP, UDP, SSL, and subprocess pipes. The methods available on a transport depend on the transport's kind. | trusted_official_docs | CPython Docs | Transport objects are always instantiated by an :ref:`asyncio event loop <asyncio-event-loop>`.
asyncio implements transports for TCP, UDP, SSL, and subprocess pipes. The methods available on a transport depend on the transport's kind. | Transport objects are always instantiated by an :ref:`asyncio event loop <asyncio-event-loop>`.
asyncio implements transports for TCP, UDP, SSL, and subprocess pipes. The methods available on a transport depend on the transport's kind. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
63c8f706-461c-46cf-9038-f91fb1010f43 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,330 | supabase-export-v2 | 1a987a3c65acabea | transport, protocol = await loop.create_connection( lambda: EchoClientProtocol(message, on_con_lost), '127.0.0.1', 8888)
# Wait until the protocol signals that the connection
# is lost and close the transport. try:
await on_con_lost
finally:
transport.close() | trusted_official_docs | CPython Docs | transport, protocol = await loop.create_connection( lambda: EchoClientProtocol(message, on_con_lost), '127.0.0.1', 8888)
# Wait until the protocol signals that the connection
# is lost and close the transport. try:
await on_con_lost
finally:
transport.close() | transport, protocol = await loop.create_connection( lambda: EchoClientProtocol(message, on_con_lost), '127.0.0.1', 8888)
# Wait until the protocol signals that the connection
# is lost and close the transport. try:
await on_con_lost
finally:
transport.close() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
65edc1c0-a578-467e-96df-48b38b31e024 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,291 | supabase-export-v2 | d8a43c8f6eaf8f69 | etc.) flow control is not supported for datagram protocols, because there is no reliable way to detect send failures caused by writing too many packets.
The socket always appears 'ready' and excess packets are dropped. An
:class:`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may
or may not be raised; if it is... | trusted_official_docs | CPython Docs | etc.) flow control is not supported for datagram protocols, because there is no reliable way to detect send failures caused by writing too many packets.
The socket always appears 'ready' and excess packets are dropped. An
:class:`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may
or may not be raised; if it is... | etc.) flow control is not supported for datagram protocols, because there is no reliable way to detect send failures caused by writing too many packets.
The socket always appears 'ready' and excess packets are dropped. An
:class:`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may
or may not be raised; if it is... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
67278b55-5ee4-4fbd-a84f-f87d69b8f667 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,089 | supabase-export-v2 | 863a76d0960b6f14 | is an abstraction for a socket (or similar I/O endpoint) while a protocol is an abstraction for an application, from the transport's point of view.
Yet another view is the transport and protocol interfaces
together define an abstract interface for using network I/O and
interprocess I/O. | trusted_official_docs | CPython Docs | is an abstraction for a socket (or similar I/O endpoint) while a protocol is an abstraction for an application, from the transport's point of view.
Yet another view is the transport and protocol interfaces
together define an abstract interface for using network I/O and
interprocess I/O. | is an abstraction for a socket (or similar I/O endpoint) while a protocol is an abstraction for an application, from the transport's point of view.
Yet another view is the transport and protocol interfaces
together define an abstract interface for using network I/O and
interprocess I/O. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6e033998-c077-48f6-86b3-bc960f145745 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,178 | supabase-export-v2 | 62ef2d533b21efa8 | to the *high* value. If writing has been paused, :meth:`~BaseProtocol.resume_writing` is called when the buffer size becomes less than or equal to the *low* value.
The defaults are implementation-specific. If only the
high watermark is given, the low watermark defaults to an
implementation-specific value less than or... | trusted_official_docs | CPython Docs | to the *high* value. If writing has been paused, :meth:`~BaseProtocol.resume_writing` is called when the buffer size becomes less than or equal to the *low* value.
The defaults are implementation-specific. If only the
high watermark is given, the low watermark defaults to an
implementation-specific value less than or... | to the *high* value. If writing has been paused, :meth:`~BaseProtocol.resume_writing` is called when the buffer size becomes less than or equal to the *low* value.
The defaults are implementation-specific. If only the
high watermark is given, the low watermark defaults to an
implementation-specific value less than or... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a49d1a3-f9d1-4bb3-af68-4d7447568a59 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,084 | supabase-export-v2 | 366cb707014dc5be | by the **low-level** event loop APIs such as :meth:`loop.create_connection`. They use callback-based programming style and enable high-performance implementations of network or IPC protocols (e.g. HTTP).
Essentially, transports and protocols should only be used in
libraries and frameworks and never in high-level asynci... | trusted_official_docs | CPython Docs | by the **low-level** event loop APIs such as :meth:`loop.create_connection`. They use callback-based programming style and enable high-performance implementations of network or IPC protocols (e.g. HTTP).
Essentially, transports and protocols should only be used in
libraries and frameworks and never in high-level asynci... | by the **low-level** event loop APIs such as :meth:`loop.create_connection`. They use callback-based programming style and enable high-performance implementations of network or IPC protocols (e.g. HTTP).
Essentially, transports and protocols should only be used in
libraries and frameworks and never in high-level asynci... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
80f2a5cc-4bd0-4dcc-a37c-31f00fd08221 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,261 | supabase-export-v2 | c8f3802ff8dcfef7 | Called when the other end signals it won't send any more data (for example by calling :meth:`transport.write_eof() <WriteTransport.write_eof>`, if the other end also uses asyncio).
This method may return a false value (including ``None``), in which case
the transport will close itself. Conversely, if this method retur... | trusted_official_docs | CPython Docs | Called when the other end signals it won't send any more data (for example by calling :meth:`transport.write_eof() <WriteTransport.write_eof>`, if the other end also uses asyncio).
This method may return a false value (including ``None``), in which case
the transport will close itself. Conversely, if this method retur... | Called when the other end signals it won't send any more data (for example by calling :meth:`transport.write_eof() <WriteTransport.write_eof>`, if the other end also uses asyncio).
This method may return a false value (including ``None``), in which case
the transport will close itself. Conversely, if this method retur... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89067230-ba43-49f1-bd13-88649c2d97a1 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,159 | supabase-export-v2 | cca164a0f8ff154e | Pause the receiving end of the transport. No data will be passed to the protocol's :meth:`protocol.data_received() <Protocol.data_received>` method until :meth:`resume_reading` is called.
.. versionchanged:: 3.7
The method is idempotent, i.e. it can be called when the
transport is already paused or closed. | trusted_official_docs | CPython Docs | Pause the receiving end of the transport. No data will be passed to the protocol's :meth:`protocol.data_received() <Protocol.data_received>` method until :meth:`resume_reading` is called.
.. versionchanged:: 3.7
The method is idempotent, i.e. it can be called when the
transport is already paused or closed. | Pause the receiving end of the transport. No data will be passed to the protocol's :meth:`protocol.data_received() <Protocol.data_received>` method until :meth:`resume_reading` is called.
.. versionchanged:: 3.7
The method is idempotent, i.e. it can be called when the
transport is already paused or closed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8b377543-9a56-4f61-9c8e-3df8db2d9e78 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,221 | supabase-export-v2 | 760baaf9dc13c3f6 | a set of abstract base classes that should be used to implement network protocols. Those classes are meant to be used together with :ref:`transports <asyncio-transport>`.
Subclasses of abstract base protocol classes may implement some or
all methods. All these methods are callbacks: they are called by
transports on cer... | trusted_official_docs | CPython Docs | a set of abstract base classes that should be used to implement network protocols. Those classes are meant to be used together with :ref:`transports <asyncio-transport>`.
Subclasses of abstract base protocol classes may implement some or
all methods. All these methods are callbacks: they are called by
transports on cer... | a set of abstract base classes that should be used to implement network protocols. Those classes are meant to be used together with :ref:`transports <asyncio-transport>`.
Subclasses of abstract base protocol classes may implement some or
all methods. All these methods are callbacks: they are called by
transports on cer... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8b8416fe-a1fb-40bb-b520-42315e226703 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,243 | supabase-export-v2 | 601de4b64966814a | exception object or :const:`None`. The latter means a regular EOF is received, or the connection was aborted or closed by this side of the connection.
.. rubric:: Flow Control Callbacks | trusted_official_docs | CPython Docs | exception object or :const:`None`. The latter means a regular EOF is received, or the connection was aborted or closed by this side of the connection.
.. rubric:: Flow Control Callbacks | exception object or :const:`None`. The latter means a regular EOF is received, or the connection was aborted or closed by this side of the connection.
.. rubric:: Flow Control Callbacks | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8d5ce761-64f0-453d-835c-3ddddf3d7c2f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,115 | supabase-export-v2 | a422ee2dac296ccf | Interface representing a bidirectional transport, such as a TCP connection.
The user does not instantiate a transport directly; they call a
utility function, passing it a protocol factory and other
information necessary to create the transport and protocol. | trusted_official_docs | CPython Docs | Interface representing a bidirectional transport, such as a TCP connection.
The user does not instantiate a transport directly; they call a
utility function, passing it a protocol factory and other
information necessary to create the transport and protocol. | Interface representing a bidirectional transport, such as a TCP connection.
The user does not instantiate a transport directly; they call a
utility function, passing it a protocol factory and other
information necessary to create the transport and protocol. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
97397c9e-d23b-4dc5-b568-ecf242972d1a | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,257 | supabase-export-v2 | b8a7a72eee21891a | In general, you shouldn't rely on specific semantics and instead make your parsing generic and flexible. However, data is always received in the correct order.
The method can be called an arbitrary number of times while
a connection is open. | trusted_official_docs | CPython Docs | In general, you shouldn't rely on specific semantics and instead make your parsing generic and flexible. However, data is always received in the correct order.
The method can be called an arbitrary number of times while
a connection is open. | In general, you shouldn't rely on specific semantics and instead make your parsing generic and flexible. However, data is always received in the correct order.
The method can be called an arbitrary number of times while
a connection is open. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
99460393-2a37-407f-90c4-794565152f13 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,116 | supabase-export-v2 | 8fc77bab173ea538 | not instantiate a transport directly; they call a utility function, passing it a protocol factory and other information necessary to create the transport and protocol.
Instances of the *Transport* class are returned from or used by
event loop methods like :meth:`loop.create_connection`,
:meth:`loop.create_unix_connec... | trusted_official_docs | CPython Docs | not instantiate a transport directly; they call a utility function, passing it a protocol factory and other information necessary to create the transport and protocol.
Instances of the *Transport* class are returned from or used by
event loop methods like :meth:`loop.create_connection`,
:meth:`loop.create_unix_connec... | not instantiate a transport directly; they call a utility function, passing it a protocol factory and other information necessary to create the transport and protocol.
Instances of the *Transport* class are returned from or used by
event loop methods like :meth:`loop.create_connection`,
:meth:`loop.create_unix_connec... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aec3349b-2701-49cf-8190-46e17cb80346 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,272 | supabase-export-v2 | 7d894a65bf335019 | Called to allocate a new receive buffer.
*sizehint* is the recommended minimum size for the returned
buffer. It is acceptable to return smaller or larger buffers
than what *sizehint* suggests. When set to -1, the buffer size
can be arbitrary. It is an error to return a buffer with a zero size. | trusted_official_docs | CPython Docs | Called to allocate a new receive buffer.
*sizehint* is the recommended minimum size for the returned
buffer. It is acceptable to return smaller or larger buffers
than what *sizehint* suggests. When set to -1, the buffer size
can be arbitrary. It is an error to return a buffer with a zero size. | Called to allocate a new receive buffer.
*sizehint* is the recommended minimum size for the returned
buffer. It is acceptable to return smaller or larger buffers
than what *sizehint* suggests. When set to -1, the buffer size
can be arbitrary. It is an error to return a buffer with a zero size. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b4b6a041-d85e-4a8d-b8c7-e4b0fb97de3c | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,143 | supabase-export-v2 | c8f91ed5add4f2a9 | the cipher being used, the version of the SSL protocol that defines its use, and the number of secret bits being used; result of :meth:`ssl.SSLSocket.cipher`
- ``'peercert'``: peer certificate; result of
:meth:`ssl.SSLSocket.getpeercert` | trusted_official_docs | CPython Docs | the cipher being used, the version of the SSL protocol that defines its use, and the number of secret bits being used; result of :meth:`ssl.SSLSocket.cipher`
- ``'peercert'``: peer certificate; result of
:meth:`ssl.SSLSocket.getpeercert` | the cipher being used, the version of the SSL protocol that defines its use, and the number of secret bits being used; result of :meth:`ssl.SSLSocket.cipher`
- ``'peercert'``: peer certificate; result of
:meth:`ssl.SSLSocket.getpeercert` | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b58425f9-d5a4-4569-a52b-ff77f4b02db6 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,192 | supabase-export-v2 | 52fb8a91eb246dea | This method does not block; it buffers the data and arranges for it to be sent out asynchronously.
.. versionchanged:: 3.13
This method can be called with an empty bytes object to send a
zero-length datagram. The buffer size calculation used for flow
control is also updated to account for the datagram header. | trusted_official_docs | CPython Docs | This method does not block; it buffers the data and arranges for it to be sent out asynchronously.
.. versionchanged:: 3.13
This method can be called with an empty bytes object to send a
zero-length datagram. The buffer size calculation used for flow
control is also updated to account for the datagram header. | This method does not block; it buffers the data and arranges for it to be sent out asynchronously.
.. versionchanged:: 3.13
This method can be called with an empty bytes object to send a
zero-length datagram. The buffer size calculation used for flow
control is also updated to account for the datagram header. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c26c79da-19cc-4ac3-ae7a-3adfe21f78d9 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,191 | supabase-export-v2 | 1f6295e2d4f8cba6 | remote peer given by *addr* (a transport-dependent target address). If *addr* is :const:`None`, the data is sent to the target address given on transport creation.
This method does not block; it buffers the data and arranges
for it to be sent out asynchronously. | trusted_official_docs | CPython Docs | remote peer given by *addr* (a transport-dependent target address). If *addr* is :const:`None`, the data is sent to the target address given on transport creation.
This method does not block; it buffers the data and arranges
for it to be sent out asynchronously. | remote peer given by *addr* (a transport-dependent target address). If *addr* is :const:`None`, the data is sent to the target address given on transport creation.
This method does not block; it buffers the data and arranges
for it to be sent out asynchronously. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c6fe88bf-1bf1-43bc-82e8-0c5b688f30fd | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,132 | supabase-export-v2 | 49371fde0f739663 | *name* is a string representing the piece of transport-specific information to get.
*default* is the value to return if the information is not
available, or if the transport does not support querying it
with the given third-party event loop implementation or on the
current platform. | trusted_official_docs | CPython Docs | *name* is a string representing the piece of transport-specific information to get.
*default* is the value to return if the information is not
available, or if the transport does not support querying it
with the given third-party event loop implementation or on the
current platform. | *name* is a string representing the piece of transport-specific information to get.
*default* is the value to return if the information is not
available, or if the transport does not support querying it
with the given third-party event loop implementation or on the
current platform. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c89a7938-2097-4fc9-9798-6ce74df4b25d | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,165 | supabase-export-v2 | 64d850a1e1f230b8 | .. method:: WriteTransport.abort()
Close the transport immediately, without waiting for pending operations
to complete. Buffered data will be lost. No more data will be received. The protocol's :meth:`protocol.connection_lost()
<BaseProtocol.connection_lost>` method will eventually be
called with :const:`None` as it... | trusted_official_docs | CPython Docs | .. method:: WriteTransport.abort()
Close the transport immediately, without waiting for pending operations
to complete. Buffered data will be lost. No more data will be received. The protocol's :meth:`protocol.connection_lost()
<BaseProtocol.connection_lost>` method will eventually be
called with :const:`None` as it... | .. method:: WriteTransport.abort()
Close the transport immediately, without waiting for pending operations
to complete. Buffered data will be lost. No more data will be received. The protocol's :meth:`protocol.connection_lost()
<BaseProtocol.connection_lost>` method will eventually be
called with :const:`None` as it... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb3a9fef-4df0-44e1-a380-4c87a9d727f0 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,187 | supabase-export-v2 | f2092c76c4aa5de9 | Close the write end of the transport after flushing all buffered data. Data may still be received.
This method can raise :exc:`NotImplementedError` if the transport
(e.g. SSL) doesn't support half-closed connections. | trusted_official_docs | CPython Docs | Close the write end of the transport after flushing all buffered data. Data may still be received.
This method can raise :exc:`NotImplementedError` if the transport
(e.g. SSL) doesn't support half-closed connections. | Close the write end of the transport after flushing all buffered data. Data may still be received.
This method can raise :exc:`NotImplementedError` if the transport
(e.g. SSL) doesn't support half-closed connections. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb6edc8e-037d-4047-acfc-4cb93714f39f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,369 | supabase-export-v2 | 12eca4e7ef4f394e | def connection_lost(self, exc): # The socket has been closed self.on_con_lost.set_result(True)
async def main():
# Get a reference to the event loop as we plan to use
# low-level APIs. loop = asyncio.get_running_loop()
on_con_lost = loop.create_future() | trusted_official_docs | CPython Docs | def connection_lost(self, exc): # The socket has been closed self.on_con_lost.set_result(True)
async def main():
# Get a reference to the event loop as we plan to use
# low-level APIs. loop = asyncio.get_running_loop()
on_con_lost = loop.create_future() | def connection_lost(self, exc): # The socket has been closed self.on_con_lost.set_result(True)
async def main():
# Get a reference to the event loop as we plan to use
# low-level APIs. loop = asyncio.get_running_loop()
on_con_lost = loop.create_future() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cc0045c8-bc20-4fe7-a46e-60b12d9c7f48 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,177 | supabase-export-v2 | b3812e7c7fbb14d2 | methods are called. If specified, the low watermark must be less than or equal to the high watermark. Neither *high* nor *low* can be negative.
:meth:`~BaseProtocol.pause_writing` is called when the buffer size
becomes greater than or equal to the *high* value. If writing has
been paused, :meth:`~BaseProtocol.resume_... | trusted_official_docs | CPython Docs | methods are called. If specified, the low watermark must be less than or equal to the high watermark. Neither *high* nor *low* can be negative.
:meth:`~BaseProtocol.pause_writing` is called when the buffer size
becomes greater than or equal to the *high* value. If writing has
been paused, :meth:`~BaseProtocol.resume_... | methods are called. If specified, the low watermark must be less than or equal to the high watermark. Neither *high* nor *low* can be negative.
:meth:`~BaseProtocol.pause_writing` is called when the buffer size
becomes greater than or equal to the *high* value. If writing has
been paused, :meth:`~BaseProtocol.resume_... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d128c057-7a8e-4252-8715-49e6f0531c03 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,389 | supabase-export-v2 | 58c83d3a7d95efb5 | code = 'import datetime as dt; print(dt.datetime.now())' exit_future = asyncio.Future(loop=loop)
# Create the subprocess controlled by DateProtocol;
# redirect the standard output into a pipe. transport, protocol = await loop.subprocess_exec(
lambda: DateProtocol(exit_future),
sys.executable, '-c', code,
stdin=None... | trusted_official_docs | CPython Docs | code = 'import datetime as dt; print(dt.datetime.now())' exit_future = asyncio.Future(loop=loop)
# Create the subprocess controlled by DateProtocol;
# redirect the standard output into a pipe. transport, protocol = await loop.subprocess_exec(
lambda: DateProtocol(exit_future),
sys.executable, '-c', code,
stdin=None... | code = 'import datetime as dt; print(dt.datetime.now())' exit_future = asyncio.Future(loop=loop)
# Create the subprocess controlled by DateProtocol;
# redirect the standard output into a pipe. transport, protocol = await loop.subprocess_exec(
lambda: DateProtocol(exit_future),
sys.executable, '-c', code,
stdin=None... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d2405005-6951-4870-a185-abb8706ff875 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,273 | supabase-export-v2 | c64cdfadfcf0f4ac | what *sizehint* suggests. When set to -1, the buffer size can be arbitrary. It is an error to return a buffer with a zero size.
``get_buffer()`` must return an object implementing the
:ref:`buffer protocol <bufferobjects>`. | trusted_official_docs | CPython Docs | what *sizehint* suggests. When set to -1, the buffer size can be arbitrary. It is an error to return a buffer with a zero size.
``get_buffer()`` must return an object implementing the
:ref:`buffer protocol <bufferobjects>`. | what *sizehint* suggests. When set to -1, the buffer size can be arbitrary. It is an error to return a buffer with a zero size.
``get_buffer()`` must return an object implementing the
:ref:`buffer protocol <bufferobjects>`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d4653b41-42f7-4ffc-9ea4-6a89a08c394a | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,179 | supabase-export-v2 | f61b4f0fe3ff3590 | only once the buffer is empty. Use of zero for either limit is generally sub-optimal as it reduces opportunities for doing I/O and computation concurrently.
Use :meth:`~WriteTransport.get_write_buffer_limits`
to get the limits. | trusted_official_docs | CPython Docs | only once the buffer is empty. Use of zero for either limit is generally sub-optimal as it reduces opportunities for doing I/O and computation concurrently.
Use :meth:`~WriteTransport.get_write_buffer_limits`
to get the limits. | only once the buffer is empty. Use of zero for either limit is generally sub-optimal as it reduces opportunities for doing I/O and computation concurrently.
Use :meth:`~WriteTransport.get_write_buffer_limits`
to get the limits. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
db30088f-9e95-4f94-9713-1116fe7cae77 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,290 | supabase-export-v2 | 59398ba1071cf08b | .. note::
On BSD systems (macOS, FreeBSD, etc.) flow control is not supported
for datagram protocols, because there is no reliable way to detect send
failures caused by writing too many packets. | trusted_official_docs | CPython Docs | .. note::
On BSD systems (macOS, FreeBSD, etc.) flow control is not supported
for datagram protocols, because there is no reliable way to detect send
failures caused by writing too many packets. | .. note::
On BSD systems (macOS, FreeBSD, etc.) flow control is not supported
for datagram protocols, because there is no reliable way to detect send
failures caused by writing too many packets. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dba3b336-998a-43b1-b359-87633609dd1f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,258 | supabase-export-v2 | e9d91423f2abb208 | The method can be called an arbitrary number of times while a connection is open.
However, :meth:`protocol.eof_received() <Protocol.eof_received>`
is called at most once. Once ``eof_received()`` is called,
``data_received()`` is not called anymore. | trusted_official_docs | CPython Docs | The method can be called an arbitrary number of times while a connection is open.
However, :meth:`protocol.eof_received() <Protocol.eof_received>`
is called at most once. Once ``eof_received()`` is called,
``data_received()`` is not called anymore. | The method can be called an arbitrary number of times while a connection is open.
However, :meth:`protocol.eof_received() <Protocol.eof_received>`
is called at most once. Once ``eof_received()`` is called,
``data_received()`` is not called anymore. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dfe3a747-4586-4a2b-9766-700f349d6f0f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,190 | supabase-export-v2 | 2572c6aa7ea26c1e | .. method:: DatagramTransport.sendto(data, addr=None)
Send the *data* bytes to the remote peer given by *addr* (a
transport-dependent target address). If *addr* is :const:`None`,
the data is sent to the target address given on transport
creation. | trusted_official_docs | CPython Docs | .. method:: DatagramTransport.sendto(data, addr=None)
Send the *data* bytes to the remote peer given by *addr* (a
transport-dependent target address). If *addr* is :const:`None`,
the data is sent to the target address given on transport
creation. | .. method:: DatagramTransport.sendto(data, addr=None)
Send the *data* bytes to the remote peer given by *addr* (a
transport-dependent target address). If *addr* is :const:`None`,
the data is sent to the target address given on transport
creation. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e36e3282-3cf3-43de-9e17-b72e641e3369 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,285 | supabase-export-v2 | e2b8d65988214d3d | .. method:: DatagramProtocol.datagram_received(data, addr)
Called when a datagram is received. *data* is a bytes object containing
the incoming data. *addr* is the address of the peer sending the data;
the exact format depends on the transport. | trusted_official_docs | CPython Docs | .. method:: DatagramProtocol.datagram_received(data, addr)
Called when a datagram is received. *data* is a bytes object containing
the incoming data. *addr* is the address of the peer sending the data;
the exact format depends on the transport. | .. method:: DatagramProtocol.datagram_received(data, addr)
Called when a datagram is received. *data* is a bytes object containing
the incoming data. *addr* is the address of the peer sending the data;
the exact format depends on the transport. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e705531e-7843-4d88-8fd5-f9135a1718ee | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,341 | supabase-export-v2 | d32c421a1643fbef | # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop()
# One protocol instance will be created to serve all
# client requests. transport, protocol = await loop.create_datagram_endpoint(
EchoServerProtocol,
local_addr=('127.0.0.1', 9999)) | trusted_official_docs | CPython Docs | # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop()
# One protocol instance will be created to serve all
# client requests. transport, protocol = await loop.create_datagram_endpoint(
EchoServerProtocol,
local_addr=('127.0.0.1', 9999)) | # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop()
# One protocol instance will be created to serve all
# client requests. transport, protocol = await loop.create_datagram_endpoint(
EchoServerProtocol,
local_addr=('127.0.0.1', 9999)) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f41360ae-c681-4212-8904-0bd2be2aba2b | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,083 | supabase-export-v2 | cda50a4e696b2e2b | .. rubric:: Preface
Transports and Protocols are used by the **low-level** event loop
APIs such as :meth:`loop.create_connection`. They use
callback-based programming style and enable high-performance
implementations of network or IPC protocols (e.g. HTTP). | trusted_official_docs | CPython Docs | .. rubric:: Preface
Transports and Protocols are used by the **low-level** event loop
APIs such as :meth:`loop.create_connection`. They use
callback-based programming style and enable high-performance
implementations of network or IPC protocols (e.g. HTTP). | .. rubric:: Preface
Transports and Protocols are used by the **low-level** event loop
APIs such as :meth:`loop.create_connection`. They use
callback-based programming style and enable high-performance
implementations of network or IPC protocols (e.g. HTTP). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8d6222d-ab81-4263-8183-69e4608dd6c2 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,388 | supabase-export-v2 | d5f57e0f9f190e38 | async def get_date(): # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop()
code = 'import datetime as dt; print(dt.datetime.now())'
exit_future = asyncio.Future(loop=loop) | trusted_official_docs | CPython Docs | async def get_date(): # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop()
code = 'import datetime as dt; print(dt.datetime.now())'
exit_future = asyncio.Future(loop=loop) | async def get_date(): # Get a reference to the event loop as we plan to use # low-level APIs. loop = asyncio.get_running_loop()
code = 'import datetime as dt; print(dt.datetime.now())'
exit_future = asyncio.Future(loop=loop) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa5331f8-5a4f-48ff-8f7e-1edc7296f159 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,338 | supabase-export-v2 | e34474e649cc2eed | class EchoServerProtocol: def connection_made(self, transport): self.transport = transport
def datagram_received(self, data, addr):
message = data.decode()
print('Received %r from %s' % (message, addr))
print('Send %r to %s' % (message, addr))
self.transport.sendto(data, addr) | trusted_official_docs | CPython Docs | class EchoServerProtocol: def connection_made(self, transport): self.transport = transport
def datagram_received(self, data, addr):
message = data.decode()
print('Received %r from %s' % (message, addr))
print('Send %r to %s' % (message, addr))
self.transport.sendto(data, addr) | class EchoServerProtocol: def connection_made(self, transport): self.transport = transport
def datagram_received(self, data, addr):
message = data.decode()
print('Received %r from %s' % (message, addr))
print('Send %r to %s' % (message, addr))
self.transport.sendto(data, addr) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fe9031de-2339-47cd-9f9e-9e9a640797a2 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-protocol.rst | unknown | 85614b93-598f-45b6-bfc5-67a6d1dcf459 | 34,262 | supabase-export-v2 | 51c043e2f8c8576c | method returns a true value, the protocol used determines whether to close the transport. Since the default implementation returns ``None``, it implicitly closes the connection.
Some transports, including SSL, don't support half-closed connections,
in which case returning true from this method will result in the conne... | trusted_official_docs | CPython Docs | method returns a true value, the protocol used determines whether to close the transport. Since the default implementation returns ``None``, it implicitly closes the connection.
Some transports, including SSL, don't support half-closed connections,
in which case returning true from this method will result in the conne... | method returns a true value, the protocol used determines whether to close the transport. Since the default implementation returns ``None``, it implicitly closes the connection.
Some transports, including SSL, don't support half-closed connections,
in which case returning true from this method will result in the conne... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
074f52b7-6f66-4498-962c-a8d1b1594712 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,402 | supabase-export-v2 | 6e11b758939746cd | .. class:: scheduler(timefunc=time.monotonic, delayfunc=time.sleep)
The :class:`scheduler` class defines a generic interface to scheduling events. It needs two functions to actually deal with the "outside world" --- *timefunc*
should be callable without arguments, and return a number (the "time", in any
units whatsoe... | trusted_official_docs | CPython Docs | .. class:: scheduler(timefunc=time.monotonic, delayfunc=time.sleep)
The :class:`scheduler` class defines a generic interface to scheduling events. It needs two functions to actually deal with the "outside world" --- *timefunc*
should be callable without arguments, and return a number (the "time", in any
units whatsoe... | .. class:: scheduler(timefunc=time.monotonic, delayfunc=time.sleep)
The :class:`scheduler` class defines a generic interface to scheduling events. It needs two functions to actually deal with the "outside world" --- *timefunc*
should be callable without arguments, and return a number (the "time", in any
units whatsoe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
07ba3aa1-4604-4ab5-84f0-00a2cef2c0cf | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,432 | supabase-export-v2 | 49364640b782d4a1 | .. attribute:: scheduler.queue
Read-only attribute returning a list of upcoming events in the order they
will be run. Each event is shown as a :term:`named tuple` with the
following fields: time, priority, action, argument, kwargs. | trusted_official_docs | CPython Docs | .. attribute:: scheduler.queue
Read-only attribute returning a list of upcoming events in the order they
will be run. Each event is shown as a :term:`named tuple` with the
following fields: time, priority, action, argument, kwargs. | .. attribute:: scheduler.queue
Read-only attribute returning a list of upcoming events in the order they
will be run. Each event is shown as a :term:`named tuple` with the
following fields: time, priority, action, argument, kwargs. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2cad3192-0852-414b-b7e1-516ed333c4b6 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,430 | supabase-export-v2 | 1eb414b9cbc05e5d | event, the scheduler will simply fall behind. No events will be dropped; the calling code is responsible for canceling events which are no longer pertinent.
.. versionchanged:: 3.3
*blocking* parameter was added. | trusted_official_docs | CPython Docs | event, the scheduler will simply fall behind. No events will be dropped; the calling code is responsible for canceling events which are no longer pertinent.
.. versionchanged:: 3.3
*blocking* parameter was added. | event, the scheduler will simply fall behind. No events will be dropped; the calling code is responsible for canceling events which are no longer pertinent.
.. versionchanged:: 3.3
*blocking* parameter was added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2dd9037a-9eba-458e-a389-586f5f1483ce | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,414 | supabase-export-v2 | e6f45521dc24cffd | event means executing ``action(*argument, **kwargs)``. *argument* is a sequence holding the positional arguments for *action*. *kwargs* is a dictionary holding the keyword arguments for *action*.
Return value is an event which may be used for later cancellation of the event
(see :meth:`cancel`). | trusted_official_docs | CPython Docs | event means executing ``action(*argument, **kwargs)``. *argument* is a sequence holding the positional arguments for *action*. *kwargs* is a dictionary holding the keyword arguments for *action*.
Return value is an event which may be used for later cancellation of the event
(see :meth:`cancel`). | event means executing ``action(*argument, **kwargs)``. *argument* is a sequence holding the positional arguments for *action*. *kwargs* is a dictionary holding the keyword arguments for *action*.
Return value is an event which may be used for later cancellation of the event
(see :meth:`cancel`). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
40dc1cdd-e360-4fb3-ad71-78fc521275e9 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,429 | supabase-export-v2 | 2e57086cd2197510 | a consistent state and propagate the exception. If an exception is raised by *action*, the event will not be attempted in future calls to :meth:`run`.
If a sequence of events takes longer to run than the time available before the
next event, the scheduler will simply fall behind. No events will be dropped;
the callin... | trusted_official_docs | CPython Docs | a consistent state and propagate the exception. If an exception is raised by *action*, the event will not be attempted in future calls to :meth:`run`.
If a sequence of events takes longer to run than the time available before the
next event, the scheduler will simply fall behind. No events will be dropped;
the callin... | a consistent state and propagate the exception. If an exception is raised by *action*, the event will not be attempted in future calls to :meth:`run`.
If a sequence of events takes longer to run than the time available before the
next event, the scheduler will simply fall behind. No events will be dropped;
the callin... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
786e5f19-e032-4346-a5a7-4ab8fd1df02e | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,428 | supabase-export-v2 | 7c055bf7f8d97205 | executes the scheduled events due to expire soonest (if any) and then return the deadline of the next scheduled call in the scheduler (if any).
Either *action* or *delayfunc* can raise an exception. In either case, the
scheduler will maintain a consistent state and propagate the exception. If an
exception is raised b... | trusted_official_docs | CPython Docs | executes the scheduled events due to expire soonest (if any) and then return the deadline of the next scheduled call in the scheduler (if any).
Either *action* or *delayfunc* can raise an exception. In either case, the
scheduler will maintain a consistent state and propagate the exception. If an
exception is raised b... | executes the scheduled events due to expire soonest (if any) and then return the deadline of the next scheduled call in the scheduler (if any).
Either *action* or *delayfunc* can raise an exception. In either case, the
scheduler will maintain a consistent state and propagate the exception. If an
exception is raised b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89fbd391-f782-4bfd-9a10-bea5c5816957 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,427 | supabase-export-v2 | 971318ddc58d1520 | (using the *delayfunc* function passed to the constructor) for the next event, then execute it and so on until there are no more scheduled events.
If *blocking* is false executes the scheduled events due to expire soonest
(if any) and then return the deadline of the next scheduled call in the
scheduler (if any). | trusted_official_docs | CPython Docs | (using the *delayfunc* function passed to the constructor) for the next event, then execute it and so on until there are no more scheduled events.
If *blocking* is false executes the scheduled events due to expire soonest
(if any) and then return the deadline of the next scheduled call in the
scheduler (if any). | (using the *delayfunc* function passed to the constructor) for the next event, then execute it and so on until there are no more scheduled events.
If *blocking* is false executes the scheduled events due to expire soonest
(if any) and then return the deadline of the next scheduled call in the
scheduler (if any). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9c892489-7e63-481c-b395-8f035493648c | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,413 | supabase-export-v2 | b2d3b108f0b99bf3 | to the constructor. Events scheduled for the same *time* will be executed in the order of their *priority*. A lower number represents a higher priority.
Executing the event means executing ``action(*argument, **kwargs)``. *argument* is a sequence holding the positional arguments for *action*. *kwargs* is a dictionary h... | trusted_official_docs | CPython Docs | to the constructor. Events scheduled for the same *time* will be executed in the order of their *priority*. A lower number represents a higher priority.
Executing the event means executing ``action(*argument, **kwargs)``. *argument* is a sequence holding the positional arguments for *action*. *kwargs* is a dictionary h... | to the constructor. Events scheduled for the same *time* will be executed in the order of their *priority*. A lower number represents a higher priority.
Executing the event means executing ``action(*argument, **kwargs)``. *argument* is a sequence holding the positional arguments for *action*. *kwargs* is a dictionary h... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a5782125-5ba0-44ba-aa3d-4a675db974c3 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,412 | supabase-export-v2 | 800d9d25ab1de477 | .. method:: scheduler.enterabs(time, priority, action, argument=(), kwargs={})
Schedule a new event. The *time* argument should be a numeric type compatible
with the return value of the *timefunc* function passed to the constructor. Events scheduled for the same *time* will be executed in the order of their
*priority... | trusted_official_docs | CPython Docs | .. method:: scheduler.enterabs(time, priority, action, argument=(), kwargs={})
Schedule a new event. The *time* argument should be a numeric type compatible
with the return value of the *timefunc* function passed to the constructor. Events scheduled for the same *time* will be executed in the order of their
*priority... | .. method:: scheduler.enterabs(time, priority, action, argument=(), kwargs={})
Schedule a new event. The *time* argument should be a numeric type compatible
with the return value of the *timefunc* function passed to the constructor. Events scheduled for the same *time* will be executed in the order of their
*priority... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ad77978d-fc17-432d-b4ca-2804dba267b0 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,419 | supabase-export-v2 | 788bc2502383f30c | *delay* more time units. Other than the relative time, the other arguments, the effect and the return value are the same as those for :meth:`enterabs`.
.. versionchanged:: 3.3
*argument* parameter is optional. | trusted_official_docs | CPython Docs | *delay* more time units. Other than the relative time, the other arguments, the effect and the return value are the same as those for :meth:`enterabs`.
.. versionchanged:: 3.3
*argument* parameter is optional. | *delay* more time units. Other than the relative time, the other arguments, the effect and the return value are the same as those for :meth:`enterabs`.
.. versionchanged:: 3.3
*argument* parameter is optional. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c10d531d-a8d4-4fa9-9bfd-722d2beadb2d | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,407 | supabase-export-v2 | 738b210e45faff84 | is relative ... s.enter(5, 1, print_time, kwargs={'a': 'keyword'}) ... s.enterabs(1_650_000_000, 10, print_time, argument=("first enterabs",)) ... s.enterabs(1_650_000_000, 5, print_time, argument=("second enterabs",)) ... s.run() ... print(time.time()) ...
>>> print_some_times()
1652342830.3640375
From print_time 16... | trusted_official_docs | CPython Docs | is relative ... s.enter(5, 1, print_time, kwargs={'a': 'keyword'}) ... s.enterabs(1_650_000_000, 10, print_time, argument=("first enterabs",)) ... s.enterabs(1_650_000_000, 5, print_time, argument=("second enterabs",)) ... s.run() ... print(time.time()) ...
>>> print_some_times()
1652342830.3640375
From print_time 16... | is relative ... s.enter(5, 1, print_time, kwargs={'a': 'keyword'}) ... s.enterabs(1_650_000_000, 10, print_time, argument=("first enterabs",)) ... s.enterabs(1_650_000_000, 5, print_time, argument=("second enterabs",)) ... s.run() ... print(time.time()) ...
>>> print_some_times()
1652342830.3640375
From print_time 16... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cdca8c3b-a3df-4979-885e-705d895dc805 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,406 | supabase-export-v2 | 163a74f1fe4a42d5 | Example::
>>> import sched, time
>>> s = sched.scheduler(time.time, time.sleep)
>>> def print_time(a='default'):
... print("From print_time", time.time(), a)
... >>> def print_some_times():
... print(time.time())
... s.enter(10, 1, print_time)
... s.enter(5, 2, print_time, argument=('positional',))
... # despit... | trusted_official_docs | CPython Docs | Example::
>>> import sched, time
>>> s = sched.scheduler(time.time, time.sleep)
>>> def print_time(a='default'):
... print("From print_time", time.time(), a)
... >>> def print_some_times():
... print(time.time())
... s.enter(10, 1, print_time)
... s.enter(5, 2, print_time, argument=('positional',))
... # despit... | Example::
>>> import sched, time
>>> s = sched.scheduler(time.time, time.sleep)
>>> def print_time(a='default'):
... print("From print_time", time.time(), a)
... >>> def print_some_times():
... print(time.time())
... s.enter(10, 1, print_time)
... s.enter(5, 2, print_time, argument=('positional',))
... # despit... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d767418a-3dbf-4d24-a2b0-2c2f78881fc5 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,418 | supabase-export-v2 | 9bf22f6fbb7a0932 | .. method:: scheduler.enter(delay, priority, action, argument=(), kwargs={})
Schedule an event for *delay* more time units. Other than the relative time, the
other arguments, the effect and the return value are the same as those for
:meth:`enterabs`. | trusted_official_docs | CPython Docs | .. method:: scheduler.enter(delay, priority, action, argument=(), kwargs={})
Schedule an event for *delay* more time units. Other than the relative time, the
other arguments, the effect and the return value are the same as those for
:meth:`enterabs`. | .. method:: scheduler.enter(delay, priority, action, argument=(), kwargs={})
Schedule an event for *delay* more time units. Other than the relative time, the
other arguments, the effect and the return value are the same as those for
:meth:`enterabs`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d97d0f89-677a-44d1-93b5-03add24ff727 | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,403 | supabase-export-v2 | 7ff07c726b31e854 | *delayfunc* will also be called with the argument ``0`` after each event is run to allow other threads an opportunity to run in multi-threaded applications.
.. versionchanged:: 3.3
*timefunc* and *delayfunc* parameters are optional. | trusted_official_docs | CPython Docs | *delayfunc* will also be called with the argument ``0`` after each event is run to allow other threads an opportunity to run in multi-threaded applications.
.. versionchanged:: 3.3
*timefunc* and *delayfunc* parameters are optional. | *delayfunc* will also be called with the argument ``0`` after each event is run to allow other threads an opportunity to run in multi-threaded applications.
.. versionchanged:: 3.3
*timefunc* and *delayfunc* parameters are optional. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa232871-2043-4094-af86-85fe4a46b28c | CPython Docs | file://datasets/cpython/Doc/library/sched.rst | unknown | 84c68e6f-7043-49f3-9e2f-4d06edce24fc | 34,426 | supabase-export-v2 | 62b5e434b6be6cb4 | .. method:: scheduler.run(blocking=True)
Run all scheduled events. This method will wait (using the *delayfunc*
function passed to the constructor) for the next event, then execute it and so
on until there are no more scheduled events. | trusted_official_docs | CPython Docs | .. method:: scheduler.run(blocking=True)
Run all scheduled events. This method will wait (using the *delayfunc*
function passed to the constructor) for the next event, then execute it and so
on until there are no more scheduled events. | .. method:: scheduler.run(blocking=True)
Run all scheduled events. This method will wait (using the *delayfunc*
function passed to the constructor) for the next event, then execute it and so
on until there are no more scheduled events. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
19713aa3-c52a-4ca2-96ff-f5074b8ad62d | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,495 | supabase-export-v2 | d9274a619f0acb00 | A mapping of :class:`ContextVars <ContextVar>` to their values.
``Context()`` creates an empty context with no values in it. To get a copy of the current context use the
:func:`~contextvars.copy_context` function. | trusted_official_docs | CPython Docs | A mapping of :class:`ContextVars <ContextVar>` to their values.
``Context()`` creates an empty context with no values in it. To get a copy of the current context use the
:func:`~contextvars.copy_context` function. | A mapping of :class:`ContextVars <ContextVar>` to their values.
``Context()`` creates an empty context with no values in it. To get a copy of the current context use the
:func:`~contextvars.copy_context` function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1a170830-2f0b-4f97-b43a-14de95def384 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,512 | supabase-export-v2 | 166fe16c7d4996d3 | # Now, after setting 'var' to 'ham': print(var.get()) # 'ham' print(ctx[var]) # 'ham'
# Any changes that the 'main' function makes to 'var'
# will be contained in 'ctx'. ctx.run(main) | trusted_official_docs | CPython Docs | # Now, after setting 'var' to 'ham': print(var.get()) # 'ham' print(ctx[var]) # 'ham'
# Any changes that the 'main' function makes to 'var'
# will be contained in 'ctx'. ctx.run(main) | # Now, after setting 'var' to 'ham': print(var.get()) # 'ham' print(ctx[var]) # 'ham'
# Any changes that the 'main' function makes to 'var'
# will be contained in 'ctx'. ctx.run(main) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2acff6c3-d6b5-4215-b8d5-f4d853108268 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,514 | supabase-export-v2 | eee8786254a35ae8 | # The 'main()' function was run in the 'ctx' context, # so changes to 'var' are contained in it: print(ctx[var]) # 'ham'
# However, outside of 'ctx', 'var' is still set to 'spam':
print(var.get()) # 'spam' | trusted_official_docs | CPython Docs | # The 'main()' function was run in the 'ctx' context, # so changes to 'var' are contained in it: print(ctx[var]) # 'ham'
# However, outside of 'ctx', 'var' is still set to 'spam':
print(var.get()) # 'spam' | # The 'main()' function was run in the 'ctx' context, # so changes to 'var' are contained in it: print(ctx[var]) # 'ham'
# However, outside of 'ctx', 'var' is still set to 'spam':
print(var.get()) # 'spam' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3b51648f-424e-4d9f-8105-d3387c58a5a1 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,438 | supabase-export-v2 | 64b98a7dc49b9501 | that have state should use Context Variables instead of :func:`threading.local` to prevent their state from bleeding to other code unexpectedly, when used in concurrent code.
See also :pep:`567` for additional details. | trusted_official_docs | CPython Docs | that have state should use Context Variables instead of :func:`threading.local` to prevent their state from bleeding to other code unexpectedly, when used in concurrent code.
See also :pep:`567` for additional details. | that have state should use Context Variables instead of :func:`threading.local` to prevent their state from bleeding to other code unexpectedly, when used in concurrent code.
See also :pep:`567` for additional details. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
477ebd78-06cc-4c58-a152-fe6878e1f575 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,497 | supabase-export-v2 | 3926b9af90743290 | :term:`current context` is the :class:`!Context` object at the top of the current thread's stack. All :class:`!Context` objects in the stacks are considered to be *entered*.
*Entering* a context, which can be done by calling its :meth:`~Context.run`
method, makes the context the current context by pushing it onto the ... | trusted_official_docs | CPython Docs | :term:`current context` is the :class:`!Context` object at the top of the current thread's stack. All :class:`!Context` objects in the stacks are considered to be *entered*.
*Entering* a context, which can be done by calling its :meth:`~Context.run`
method, makes the context the current context by pushing it onto the ... | :term:`current context` is the :class:`!Context` object at the top of the current thread's stack. All :class:`!Context` objects in the stacks are considered to be *entered*.
*Entering* a context, which can be done by calling its :meth:`~Context.run`
method, makes the context the current context by pushing it onto the ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4b472356-9ebf-44c3-81c4-ccab6e3df2c8 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,502 | supabase-export-v2 | 12e6641d989a1581 | After exiting a context, it can later be re-entered (from any thread).
Any changes to :class:`ContextVar` values via the :meth:`ContextVar.set`
method are recorded in the current context. The :meth:`ContextVar.get`
method returns the value associated with the current context. Exiting a
context effectively reverts an... | trusted_official_docs | CPython Docs | After exiting a context, it can later be re-entered (from any thread).
Any changes to :class:`ContextVar` values via the :meth:`ContextVar.set`
method are recorded in the current context. The :meth:`ContextVar.get`
method returns the value associated with the current context. Exiting a
context effectively reverts an... | After exiting a context, it can later be re-entered (from any thread).
Any changes to :class:`ContextVar` values via the :meth:`ContextVar.set`
method are recorded in the current context. The :meth:`ContextVar.get`
method returns the value associated with the current context. Exiting a
context effectively reverts an... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4f2096f2-dfba-4fd4-945d-8ce68fc6a831 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,536 | supabase-export-v2 | c072d6c2d7b8bca8 | asyncio support ---------------
Context variables are natively supported in :mod:`asyncio` and are
ready to be used without any extra configuration. For example, here
is a simple echo server, that uses a context variable to make the
address of a remote client available in the Task that handles that
client:: | trusted_official_docs | CPython Docs | asyncio support ---------------
Context variables are natively supported in :mod:`asyncio` and are
ready to be used without any extra configuration. For example, here
is a simple echo server, that uses a context variable to make the
address of a remote client available in the Task that handles that
client:: | asyncio support ---------------
Context variables are natively supported in :mod:`asyncio` and are
ready to be used without any extra configuration. For example, here
is a simple echo server, that uses a context variable to make the
address of a remote client available in the Task that handles that
client:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
515e17db-2a41-42b3-8a83-67f190bd1369 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,437 | supabase-export-v2 | aaa463fb4014cf19 | to declare and work with *Context Variables*. The :func:`~contextvars.copy_context` function and the :class:`~contextvars.Context` class should be used to manage the current context in asynchronous frameworks.
Context managers that have state should use Context Variables
instead of :func:`threading.local` to prevent th... | trusted_official_docs | CPython Docs | to declare and work with *Context Variables*. The :func:`~contextvars.copy_context` function and the :class:`~contextvars.Context` class should be used to manage the current context in asynchronous frameworks.
Context managers that have state should use Context Variables
instead of :func:`threading.local` to prevent th... | to declare and work with *Context Variables*. The :func:`~contextvars.copy_context` function and the :class:`~contextvars.Context` class should be used to manage the current context in asynchronous frameworks.
Context managers that have state should use Context Variables
instead of :func:`threading.local` to prevent th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5dd54292-625f-41e9-90fb-8386266066bb | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,503 | supabase-export-v2 | fc4613763bc14288 | context effectively reverts any changes made to context variables while the context was entered (if needed, the values can be restored by re-entering the context).
Context implements the :class:`collections.abc.Mapping` interface. | trusted_official_docs | CPython Docs | context effectively reverts any changes made to context variables while the context was entered (if needed, the values can be restored by re-entering the context).
Context implements the :class:`collections.abc.Mapping` interface. | context effectively reverts any changes made to context variables while the context was entered (if needed, the values can be restored by re-entering the context).
Context implements the :class:`collections.abc.Mapping` interface. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6953dccc-a48e-4fcf-bb2f-3fc2a2034d0d | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,484 | supabase-export-v2 | 4b8f4a966a121b4b | .. attribute:: Token.old_value
A read-only property. Set to the value the variable had before
the :meth:`ContextVar.set` method call that created the token. It points to :attr:`Token.MISSING` if the variable was not set
before the call. | trusted_official_docs | CPython Docs | .. attribute:: Token.old_value
A read-only property. Set to the value the variable had before
the :meth:`ContextVar.set` method call that created the token. It points to :attr:`Token.MISSING` if the variable was not set
before the call. | .. attribute:: Token.old_value
A read-only property. Set to the value the variable had before
the :meth:`ContextVar.set` method call that created the token. It points to :attr:`Token.MISSING` if the variable was not set
before the call. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b431e9f-9662-4365-9e57-40540430e929 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,513 | supabase-export-v2 | 058898f8d5567faf | # Any changes that the 'main' function makes to 'var' # will be contained in 'ctx'. ctx.run(main)
# The 'main()' function was run in the 'ctx' context,
# so changes to 'var' are contained in it:
print(ctx[var]) # 'ham' | trusted_official_docs | CPython Docs | # Any changes that the 'main' function makes to 'var' # will be contained in 'ctx'. ctx.run(main)
# The 'main()' function was run in the 'ctx' context,
# so changes to 'var' are contained in it:
print(ctx[var]) # 'ham' | # Any changes that the 'main' function makes to 'var' # will be contained in 'ctx'. ctx.run(main)
# The 'main()' function was run in the 'ctx' context,
# so changes to 'var' are contained in it:
print(ctx[var]) # 'ham' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7d77602d-3048-4533-aeb1-de5e6714fde0 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,492 | supabase-export-v2 | 861a63c786fb4c63 | ctx: Context = copy_context() print(list(ctx.items()))
The function has an *O*\ (1) complexity, i.e. works equally fast for
contexts with a few context variables and for contexts that have
a lot of them. | trusted_official_docs | CPython Docs | ctx: Context = copy_context() print(list(ctx.items()))
The function has an *O*\ (1) complexity, i.e. works equally fast for
contexts with a few context variables and for contexts that have
a lot of them. | ctx: Context = copy_context() print(list(ctx.items()))
The function has an *O*\ (1) complexity, i.e. works equally fast for
contexts with a few context variables and for contexts that have
a lot of them. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8529851d-8751-4505-b268-cce838e3e61c | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,490 | supabase-export-v2 | 87e8d454c7f76fb4 | Returns a copy of the current :class:`~contextvars.Context` object.
The following snippet gets a copy of the current context and prints
all variables and their values that are set in it:: | trusted_official_docs | CPython Docs | Returns a copy of the current :class:`~contextvars.Context` object.
The following snippet gets a copy of the current context and prints
all variables and their values that are set in it:: | Returns a copy of the current :class:`~contextvars.Context` object.
The following snippet gets a copy of the current context and prints
all variables and their values that are set in it:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8a9af9f1-5ab6-4b3e-ab4b-7d28c0c08f86 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,460 | supabase-export-v2 | ea91701b7ba8fb76 | Returns a :class:`~contextvars.Token` object that can be used to restore the variable to its previous value via the :meth:`ContextVar.reset` method.
For convenience, the token object can be used as a context manager
to avoid calling :meth:`ContextVar.reset` manually:: | trusted_official_docs | CPython Docs | Returns a :class:`~contextvars.Token` object that can be used to restore the variable to its previous value via the :meth:`ContextVar.reset` method.
For convenience, the token object can be used as a context manager
to avoid calling :meth:`ContextVar.reset` manually:: | Returns a :class:`~contextvars.Token` object that can be used to restore the variable to its previous value via the :meth:`ContextVar.reset` method.
For convenience, the token object can be used as a context manager
to avoid calling :meth:`ContextVar.reset` manually:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
95b42a30-8036-45ea-b19a-0b7e9cff822b | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,500 | supabase-export-v2 | c4d8b2dc2d9ccdcc | Since each thread has its own context stack, :class:`ContextVar` objects behave in a similar fashion to :func:`threading.local` when values are assigned in different threads.
Attempting to enter an already entered context, including contexts entered in
other threads, raises a :exc:`RuntimeError`. | trusted_official_docs | CPython Docs | Since each thread has its own context stack, :class:`ContextVar` objects behave in a similar fashion to :func:`threading.local` when values are assigned in different threads.
Attempting to enter an already entered context, including contexts entered in
other threads, raises a :exc:`RuntimeError`. | Since each thread has its own context stack, :class:`ContextVar` objects behave in a similar fashion to :func:`threading.local` when values are assigned in different threads.
Attempting to enter an already entered context, including contexts entered in
other threads, raises a :exc:`RuntimeError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
97a176f8-ba77-4c8e-a343-5f2c016a82d6 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,474 | supabase-export-v2 | 1042e0a269ad9c51 | token = var.set('new value') # code that uses 'var'; var.get() returns 'new value'. var.reset(token)
# After the reset call the var has no value again, so
# var.get() would raise a LookupError. | trusted_official_docs | CPython Docs | token = var.set('new value') # code that uses 'var'; var.get() returns 'new value'. var.reset(token)
# After the reset call the var has no value again, so
# var.get() would raise a LookupError. | token = var.set('new value') # code that uses 'var'; var.get() returns 'new value'. var.reset(token)
# After the reset call the var has no value again, so
# var.get() would raise a LookupError. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9e15bd5e-019e-479c-bdf0-4d9c34c3cf22 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,496 | supabase-export-v2 | 54ca42b4101d8970 | ``Context()`` creates an empty context with no values in it. To get a copy of the current context use the :func:`~contextvars.copy_context` function.
Each thread has its own effective stack of :class:`!Context` objects. The
:term:`current context` is the :class:`!Context` object at the top of the
current thread's sta... | trusted_official_docs | CPython Docs | ``Context()`` creates an empty context with no values in it. To get a copy of the current context use the :func:`~contextvars.copy_context` function.
Each thread has its own effective stack of :class:`!Context` objects. The
:term:`current context` is the :class:`!Context` object at the top of the
current thread's sta... | ``Context()`` creates an empty context with no values in it. To get a copy of the current context use the :func:`~contextvars.copy_context` function.
Each thread has its own effective stack of :class:`!Context` objects. The
:term:`current context` is the :class:`!Context` object at the top of the
current thread's sta... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a0fb52e7-b144-4749-a95e-735b3f159cba | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,499 | supabase-export-v2 | 2d2a1dbf844218c5 | method, restores the current context to what it was before the context was entered by popping the context off the top of the context stack.
Since each thread has its own context stack, :class:`ContextVar` objects
behave in a similar fashion to :func:`threading.local` when values are
assigned in different threads. | trusted_official_docs | CPython Docs | method, restores the current context to what it was before the context was entered by popping the context off the top of the context stack.
Since each thread has its own context stack, :class:`ContextVar` objects
behave in a similar fashion to :func:`threading.local` when values are
assigned in different threads. | method, restores the current context to what it was before the context was entered by popping the context off the top of the context stack.
Since each thread has its own context stack, :class:`ContextVar` objects
behave in a similar fashion to :func:`threading.local` when values are
assigned in different threads. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a4ca5569-ff85-481e-94ed-185e537ed3f5 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,445 | supabase-export-v2 | a1cfa8609764b935 | The required *name* parameter is used for introspection and debug purposes.
The optional keyword-only *default* parameter is returned by
:meth:`ContextVar.get` when no value for the variable is found
in the current context. | trusted_official_docs | CPython Docs | The required *name* parameter is used for introspection and debug purposes.
The optional keyword-only *default* parameter is returned by
:meth:`ContextVar.get` when no value for the variable is found
in the current context. | The required *name* parameter is used for introspection and debug purposes.
The optional keyword-only *default* parameter is returned by
:meth:`ContextVar.get` when no value for the variable is found
in the current context. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bb6815ec-3e8c-46c5-b8fb-6be0b881ad78 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,436 | supabase-export-v2 | 028a850f70133dcf | --------------
This module provides APIs to manage, store, and access context-local
state. The :class:`~contextvars.ContextVar` class is used to declare
and work with *Context Variables*. The :func:`~contextvars.copy_context`
function and the :class:`~contextvars.Context` class should be used to
manage the current cont... | trusted_official_docs | CPython Docs | --------------
This module provides APIs to manage, store, and access context-local
state. The :class:`~contextvars.ContextVar` class is used to declare
and work with *Context Variables*. The :func:`~contextvars.copy_context`
function and the :class:`~contextvars.Context` class should be used to
manage the current cont... | --------------
This module provides APIs to manage, store, and access context-local
state. The :class:`~contextvars.ContextVar` class is used to declare
and work with *Context Variables*. The :func:`~contextvars.copy_context`
function and the :class:`~contextvars.Context` class should be used to
manage the current cont... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bdf2bc9d-076b-49cd-849b-8c4404db9b63 | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,454 | supabase-export-v2 | c9895d5fd51475db | * return the value of the *default* argument of the method, if provided; or
* return the default value for the context variable,
if it was created with one; or | trusted_official_docs | CPython Docs | * return the value of the *default* argument of the method, if provided; or
* return the default value for the context variable,
if it was created with one; or | * return the value of the *default* argument of the method, if provided; or
* return the default value for the context variable,
if it was created with one; or | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cac5ce19-19e9-4bfa-ba3a-5e346fca164b | CPython Docs | file://datasets/cpython/Doc/library/contextvars.rst | unknown | 2e318c60-48da-41de-a24d-537f6bd55e94 | 34,446 | supabase-export-v2 | 763fb9bc8ac0e33e | The optional keyword-only *default* parameter is returned by :meth:`ContextVar.get` when no value for the variable is found in the current context.
**Important:** Context Variables should be created at the top module
level and never in closures. :class:`Context` objects hold strong
references to context variables whi... | trusted_official_docs | CPython Docs | The optional keyword-only *default* parameter is returned by :meth:`ContextVar.get` when no value for the variable is found in the current context.
**Important:** Context Variables should be created at the top module
level and never in closures. :class:`Context` objects hold strong
references to context variables whi... | The optional keyword-only *default* parameter is returned by :meth:`ContextVar.get` when no value for the variable is found in the current context.
**Important:** Context Variables should be created at the top module
level and never in closures. :class:`Context` objects hold strong
references to context variables whi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.