Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
950204df
Kaydet (Commit)
950204df
authored
May 16, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
docs: Update asyncio docs & whatsnew
üst
7661db62
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
0 deletions
+86
-0
asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+21
-0
asyncio-stream.rst
Doc/library/asyncio-stream.rst
+36
-0
asyncio-task.rst
Doc/library/asyncio-task.rst
+2
-0
3.5.rst
Doc/whatsnew/3.5.rst
+27
-0
No files found.
Doc/library/asyncio-eventloop.rst
Dosyayı görüntüle @
950204df
...
...
@@ -179,6 +179,20 @@ a different clock than :func:`time.time`.
The :func:`asyncio.sleep` function.
Futures
-------
.. method:: BaseEventLoop.create_future()
Create an :class:`asyncio.Future` object attached to the loop.
This is a preferred way to create futures in asyncio, as event
loop implementations can provide alternative implementations
of the Future class (with better performance or instrumentation).
.. versionadded:: 3.5.2
Tasks
-----
...
...
@@ -669,6 +683,13 @@ Allows customizing how exceptions are handled in the event loop.
will be a ``dict`` object (see :meth:`call_exception_handler`
documentation for details about context).
.. method:: BaseEventLoop.get_exception_handler()
Return the exception handler, or ``None`` if the default one
is in use.
.. versionadded:: 3.5.2
.. method:: BaseEventLoop.default_exception_handler(context)
Default exception handler.
...
...
Doc/library/asyncio-stream.rst
Dosyayı görüntüle @
950204df
...
...
@@ -142,6 +142,30 @@ StreamReader
This method is a :ref:`coroutine <coroutine>`.
.. coroutinemethod:: readuntil(separator=b'\n')
Read data from the stream until ``separator`` is found.
On success, the data and separator will be removed from the
internal buffer (consumed). Returned data will include the
separator at the end.
Configured stream limit is used to check result. Limit sets the
maximal length of data that can be returned, not counting the
separator.
If an EOF occurs and the complete separator is still not found,
an :exc:`IncompleteReadError` exception will be
raised, and the internal buffer will be reset. The
:attr:`IncompleteReadError.partial` attribute may contain the
separator partially.
If the data cannot be read because of over limit, a
:exc:`LimitOverrunError` exception will be raised, and the data
will be left in the internal buffer, so it can be read again.
.. versionadded:: 3.5.2
.. method:: at_eof()
Return ``True`` if the buffer is empty and :meth:`feed_eof` was called.
...
...
@@ -251,6 +275,18 @@ IncompleteReadError
Read bytes string before the end of stream was reached (:class:`bytes`).
LimitOverrunError
=================
.. exception:: LimitOverrunError
Reached the buffer limit while looking for a separator.
.. attribute:: consumed
Total number of to be consumed bytes.
Stream examples
===============
...
...
Doc/library/asyncio-task.rst
Dosyayı görüntüle @
950204df
...
...
@@ -677,6 +677,8 @@ Task functions
Passing ``None`` as *timeout* argument disables the manager logic.
.. versionadded:: 3.5.2
.. coroutinefunction:: wait(futures, \*, loop=None, timeout=None,\
return_when=ALL_COMPLETED)
...
...
Doc/whatsnew/3.5.rst
Dosyayı görüntüle @
950204df
...
...
@@ -822,6 +822,33 @@ Updates in 3.5.1:
method can now accept a list of hosts.
(Contributed by Yann Sionneau.)
Updates in 3.5.2:
* New :meth:`loop.create_future() <asyncio.BaseEventLoop.create_future>`
method to create Future objects. This allows alternative event
loop implementations, such as
`uvloop <https://github.com/MagicStack/uvloop>`_, to provide a faster
:class:`asyncio.Future` implementation.
(Contributed by Yury Selivanov.)
* New :meth:`loop.get_exception_handler() <asyncio.BaseEventLoop.get_exception_handler>`
method to get the current exception handler.
(Contributed by Yury Selivanov.)
* New :func:`~asyncio.timeout` context manager to simplify timeouts
handling code.
(Contributed by Andrew Svetlov.)
* New :meth:`StreamReader.readuntil() <asyncio.StreamReader.readuntil>`
method to read data from the stream until a separator bytes
sequence appears.
(Contributed by Mark Korenberg.)
* The :meth:`loop.getaddrinfo() <asyncio.BaseEventLoop.getaddrinfo>`
method is optimized to avoid calling the system ``getaddrinfo``
function if the address is already resolved.
(Contributed by A. Jesse Jiryu Davis.)
bz2
---
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment