Skip to content

Sync with CPython 3.10 #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 36 additions & 34 deletions library/asynchat.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
"POT-Creation-Date: 2022-03-21 00:13+0000\n"
"PO-Revision-Date: 2018-05-23 14:38+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand All @@ -22,21 +22,23 @@ msgstr ""
msgid ":mod:`asynchat` --- Asynchronous socket command/response handler"
msgstr ""

#: ../../library/asynchat.rst:10
#: ../../library/asynchat.rst:11
msgid "**Source code:** :source:`Lib/asynchat.py`"
msgstr "**原始碼:**\\ :source:`Lib/asynchat.py`"

#: ../../library/asynchat.rst:12
msgid "Please use :mod:`asyncio` instead."
#: ../../library/asynchat.rst:13
msgid ""
":mod:`asynchat` will be removed in Python 3.12 (:pep:`594`). Please use :mod:"
"`asyncio` instead."
msgstr ""

#: ../../library/asynchat.rst:19
#: ../../library/asynchat.rst:21
msgid ""
"This module exists for backwards compatibility only. For new code we "
"recommend using :mod:`asyncio`."
msgstr ""

#: ../../library/asynchat.rst:22
#: ../../library/asynchat.rst:24
msgid ""
"This module builds on the :mod:`asyncore` infrastructure, simplifying "
"asynchronous clients and servers and making it easier to handle protocols "
Expand All @@ -51,7 +53,7 @@ msgid ""
"connection requests."
msgstr ""

#: ../../library/asynchat.rst:37
#: ../../library/asynchat.rst:39
msgid ""
"This class is an abstract subclass of :class:`asyncore.dispatcher`. To make "
"practical use of the code you must subclass :class:`async_chat`, providing "
Expand All @@ -60,7 +62,7 @@ msgid ""
"all make sense in a message/response context."
msgstr ""

#: ../../library/asynchat.rst:44
#: ../../library/asynchat.rst:46
msgid ""
"Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of "
"events that are generated by an analysis of socket conditions after a :c:"
Expand All @@ -69,21 +71,21 @@ msgid ""
"with no action on the part of the programmer."
msgstr ""

#: ../../library/asynchat.rst:50
#: ../../library/asynchat.rst:52
msgid ""
"Two class attributes can be modified, to improve performance, or possibly "
"even to conserve memory."
msgstr ""

#: ../../library/asynchat.rst:56
#: ../../library/asynchat.rst:58
msgid "The asynchronous input buffer size (default ``4096``)."
msgstr ""

#: ../../library/asynchat.rst:61
#: ../../library/asynchat.rst:63
msgid "The asynchronous output buffer size (default ``4096``)."
msgstr ""

#: ../../library/asynchat.rst:63
#: ../../library/asynchat.rst:65
msgid ""
"Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to "
"define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer "
Expand All @@ -98,115 +100,115 @@ msgid ""
"transmission from the remote endpoint."
msgstr ""

#: ../../library/asynchat.rst:76
#: ../../library/asynchat.rst:78
msgid ""
"To build a functioning :class:`async_chat` subclass your input methods :"
"meth:`collect_incoming_data` and :meth:`found_terminator` must handle the "
"data that the channel receives asynchronously. The methods are described "
"below."
msgstr ""

#: ../../library/asynchat.rst:84
#: ../../library/asynchat.rst:86
msgid ""
"Pushes a ``None`` on to the producer queue. When this producer is popped off "
"the queue it causes the channel to be closed."
msgstr ""

#: ../../library/asynchat.rst:90
#: ../../library/asynchat.rst:92
msgid ""
"Called with *data* holding an arbitrary amount of received data. The "
"default method, which must be overridden, raises a :exc:"
"`NotImplementedError` exception."
msgstr ""

#: ../../library/asynchat.rst:97
#: ../../library/asynchat.rst:99
msgid ""
"In emergencies this method will discard any data held in the input and/or "
"output buffers and the producer queue."
msgstr ""

#: ../../library/asynchat.rst:103
#: ../../library/asynchat.rst:105
msgid ""
"Called when the incoming data stream matches the termination condition set "
"by :meth:`set_terminator`. The default method, which must be overridden, "
"raises a :exc:`NotImplementedError` exception. The buffered input data "
"should be available via an instance attribute."
msgstr ""

#: ../../library/asynchat.rst:111
#: ../../library/asynchat.rst:113
msgid "Returns the current terminator for the channel."
msgstr ""

#: ../../library/asynchat.rst:116
#: ../../library/asynchat.rst:118
msgid ""
"Pushes data on to the channel's queue to ensure its transmission. This is "
"all you need to do to have the channel write the data out to the network, "
"although it is possible to use your own producers in more complex schemes to "
"implement encryption and chunking, for example."
msgstr ""

#: ../../library/asynchat.rst:124
#: ../../library/asynchat.rst:126
msgid ""
"Takes a producer object and adds it to the producer queue associated with "
"the channel. When all currently-pushed producers have been exhausted the "
"channel will consume this producer's data by calling its :meth:`more` method "
"and send the data to the remote endpoint."
msgstr ""

#: ../../library/asynchat.rst:132
#: ../../library/asynchat.rst:134
msgid ""
"Sets the terminating condition to be recognized on the channel. ``term`` "
"may be any of three types of value, corresponding to three different ways to "
"handle incoming protocol data."
msgstr ""

#: ../../library/asynchat.rst:137
#: ../../library/asynchat.rst:139
msgid "term"
msgstr ""

#: ../../library/asynchat.rst:137
#: ../../library/asynchat.rst:139
msgid "Description"
msgstr "描述"

#: ../../library/asynchat.rst:139
#: ../../library/asynchat.rst:141
msgid "*string*"
msgstr ""

#: ../../library/asynchat.rst:139
#: ../../library/asynchat.rst:141
msgid ""
"Will call :meth:`found_terminator` when the string is found in the input "
"stream"
msgstr ""

#: ../../library/asynchat.rst:142
#: ../../library/asynchat.rst:144
msgid "*integer*"
msgstr ""

#: ../../library/asynchat.rst:142
#: ../../library/asynchat.rst:144
msgid ""
"Will call :meth:`found_terminator` when the indicated number of characters "
"have been received"
msgstr ""

#: ../../library/asynchat.rst:146
#: ../../library/asynchat.rst:148
msgid "``None``"
msgstr "``None``"

#: ../../library/asynchat.rst:146
#: ../../library/asynchat.rst:148
msgid "The channel continues to collect data forever"
msgstr ""

#: ../../library/asynchat.rst:150
#: ../../library/asynchat.rst:152
msgid ""
"Note that any data following the terminator will be available for reading by "
"the channel after :meth:`found_terminator` is called."
msgstr ""

#: ../../library/asynchat.rst:157
#: ../../library/asynchat.rst:159
msgid "asynchat Example"
msgstr ""

#: ../../library/asynchat.rst:159
#: ../../library/asynchat.rst:161
msgid ""
"The following partial example shows how HTTP requests can be read with :"
"class:`async_chat`. A web server might create an :class:"
Expand All @@ -216,15 +218,15 @@ msgid ""
"read."
msgstr ""

#: ../../library/asynchat.rst:166
#: ../../library/asynchat.rst:168
msgid ""
"Once the headers have been read, if the request is of type POST (indicating "
"that further data are present in the input stream) then the ``Content-Length:"
"`` header is used to set a numeric terminator to read the right amount of "
"data from the channel."
msgstr ""

#: ../../library/asynchat.rst:171
#: ../../library/asynchat.rst:173
msgid ""
"The :meth:`handle_request` method is called once all relevant input has been "
"marshalled, after setting the channel terminator to ``None`` to ensure that "
Expand Down
Loading