Skip to content

Sync with CPython 3.11 #376

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 8 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 5 additions & 4 deletions copyright.po
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# Copyright (C) 2001-2023, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Adrian Liaw <adrianliaw2000@gmail.com>, 2015
# Ching-Lung Chuang, 2015
# Liang-Bo Wang <me@liang2.tw>, 2016
# meowmeowcat <meowmeowcat1211@gmail.com>, 2021
msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-03 00:10+0000\n"
"POT-Creation-Date: 2023-01-10 00:17+0000\n"
"PO-Revision-Date: 2021-06-25 20:17+0800\n"
"Last-Translator: meowmeowcat <meowmeowcat1211@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand All @@ -31,8 +32,8 @@ msgid "Python and this documentation is:"
msgstr "Python 和這份說明文件的版權:"

#: ../../copyright.rst:7
msgid "Copyright © 2001-2022 Python Software Foundation. All rights reserved."
msgstr "Copyright © 2001-2022 Python Software Foundation 保留一切權利。"
msgid "Copyright © 2001-2023 Python Software Foundation. All rights reserved."
msgstr "Copyright © 2001-2023 Python Software Foundation 保留一切權利。"

#: ../../copyright.rst:9
msgid "Copyright © 2000 BeOpen.com. All rights reserved."
Expand Down
19 changes: 8 additions & 11 deletions library/asyncio-eventloop.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-17 00:14+0000\n"
"POT-Creation-Date: 2023-01-11 00:15+0000\n"
"PO-Revision-Date: 2022-02-20 12:36+0800\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -86,7 +86,7 @@ msgstr ""
#: ../../library/asyncio-eventloop.rst:50
msgid ""
"If there is no running event loop set, the function will return the result "
"of ``get_event_loop_policy().get_event_loop()`` call."
"of the ``get_event_loop_policy().get_event_loop()`` call."
msgstr ""

#: ../../library/asyncio-eventloop.rst:53
Expand All @@ -103,17 +103,14 @@ msgid ""
"and close an event loop."
msgstr ""

#: ../../library/asyncio-eventloop.rst:62
msgid ""
"Deprecation warning is emitted if there is no current event loop. In Python "
"3.12 it will be an error."
msgstr ""

#: ../../library/asyncio-eventloop.rst:67
#: ../../library/asyncio-eventloop.rst:63
msgid ""
"In Python versions 3.10.0--3.10.8 and 3.11.0 this function (and other "
"functions which used it implicitly) emitted a :exc:`DeprecationWarning` if "
"there was no running event loop, even if the current loop was set."
"functions which use it implicitly) emitted a :exc:`DeprecationWarning` if "
"there was no running event loop, even if the current loop was set on the "
"policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit a :exc:"
"`DeprecationWarning` if there is no running event loop and no current loop "
"is set. In some future Python release this will become an error."
msgstr ""

#: ../../library/asyncio-eventloop.rst:74
Expand Down
90 changes: 45 additions & 45 deletions library/asyncio-policy.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-07 00:17+0000\n"
"POT-Creation-Date: 2023-01-11 00:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -145,47 +145,47 @@ msgstr ""
msgid "On Windows, :class:`ProactorEventLoop` is now used by default."
msgstr ""

#: ../../library/asyncio-policy.rst:115
#: ../../library/asyncio-policy.rst:116
msgid ""
":meth:`get_event_loop` now emits a :exc:`DeprecationWarning` if there is no "
"current event loop set and a new event loop has been implicitly created. In "
"Python 3.12 it will be an error."
"In Python versions 3.10.9, 3.11.1 and 3.12 this function emits a :exc:"
"`DeprecationWarning` if there is no running event loop and no current loop "
"is set. In some future Python release this will become an error."
msgstr ""

#: ../../library/asyncio-policy.rst:123
#: ../../library/asyncio-policy.rst:124
msgid ""
"An alternative event loop policy that uses the :class:`SelectorEventLoop` "
"event loop implementation."
msgstr ""

#: ../../library/asyncio-policy.rst:126 ../../library/asyncio-policy.rst:134
#: ../../library/asyncio-policy.rst:127 ../../library/asyncio-policy.rst:135
msgid ":ref:`Availability <availability>`: Windows."
msgstr ":ref:`適用 <availability>`:Windows。"

#: ../../library/asyncio-policy.rst:131
#: ../../library/asyncio-policy.rst:132
msgid ""
"An alternative event loop policy that uses the :class:`ProactorEventLoop` "
"event loop implementation."
msgstr ""

#: ../../library/asyncio-policy.rst:140
#: ../../library/asyncio-policy.rst:141
msgid "Process Watchers"
msgstr ""

#: ../../library/asyncio-policy.rst:142
#: ../../library/asyncio-policy.rst:143
msgid ""
"A process watcher allows customization of how an event loop monitors child "
"processes on Unix. Specifically, the event loop needs to know when a child "
"process has exited."
msgstr ""

#: ../../library/asyncio-policy.rst:146
#: ../../library/asyncio-policy.rst:147
msgid ""
"In asyncio, child processes are created with :func:`create_subprocess_exec` "
"and :meth:`loop.subprocess_exec` functions."
msgstr ""

#: ../../library/asyncio-policy.rst:150
#: ../../library/asyncio-policy.rst:151
msgid ""
"asyncio defines the :class:`AbstractChildWatcher` abstract base class, which "
"child watchers should implement, and has four different implementations: :"
Expand All @@ -194,176 +194,176 @@ msgid ""
"`FastChildWatcher`."
msgstr ""

#: ../../library/asyncio-policy.rst:156
#: ../../library/asyncio-policy.rst:157
msgid ""
"See also the :ref:`Subprocess and Threads <asyncio-subprocess-threads>` "
"section."
msgstr ""

#: ../../library/asyncio-policy.rst:159
#: ../../library/asyncio-policy.rst:160
msgid ""
"The following two functions can be used to customize the child process "
"watcher implementation used by the asyncio event loop:"
msgstr ""

#: ../../library/asyncio-policy.rst:164
#: ../../library/asyncio-policy.rst:165
msgid "Return the current child watcher for the current policy."
msgstr ""

#: ../../library/asyncio-policy.rst:168
#: ../../library/asyncio-policy.rst:169
msgid ""
"Set the current child watcher to *watcher* for the current policy. "
"*watcher* must implement methods defined in the :class:"
"`AbstractChildWatcher` base class."
msgstr ""

#: ../../library/asyncio-policy.rst:173
#: ../../library/asyncio-policy.rst:174
msgid ""
"Third-party event loops implementations might not support custom child "
"watchers. For such event loops, using :func:`set_child_watcher` might be "
"prohibited or have no effect."
msgstr ""

#: ../../library/asyncio-policy.rst:181
#: ../../library/asyncio-policy.rst:182
msgid "Register a new child handler."
msgstr ""

#: ../../library/asyncio-policy.rst:183
#: ../../library/asyncio-policy.rst:184
msgid ""
"Arrange for ``callback(pid, returncode, *args)`` to be called when a process "
"with PID equal to *pid* terminates. Specifying another callback for the "
"same process replaces the previous handler."
msgstr ""

#: ../../library/asyncio-policy.rst:188
#: ../../library/asyncio-policy.rst:189
msgid "The *callback* callable must be thread-safe."
msgstr ""

#: ../../library/asyncio-policy.rst:192
#: ../../library/asyncio-policy.rst:193
msgid "Removes the handler for process with PID equal to *pid*."
msgstr ""

#: ../../library/asyncio-policy.rst:194
#: ../../library/asyncio-policy.rst:195
msgid ""
"The function returns ``True`` if the handler was successfully removed, "
"``False`` if there was nothing to remove."
msgstr ""

#: ../../library/asyncio-policy.rst:199
#: ../../library/asyncio-policy.rst:200
msgid "Attach the watcher to an event loop."
msgstr ""

#: ../../library/asyncio-policy.rst:201
#: ../../library/asyncio-policy.rst:202
msgid ""
"If the watcher was previously attached to an event loop, then it is first "
"detached before attaching to the new loop."
msgstr ""

#: ../../library/asyncio-policy.rst:204
#: ../../library/asyncio-policy.rst:205
msgid "Note: loop may be ``None``."
msgstr ""

#: ../../library/asyncio-policy.rst:208
#: ../../library/asyncio-policy.rst:209
msgid "Return ``True`` if the watcher is ready to use."
msgstr ""

#: ../../library/asyncio-policy.rst:210
#: ../../library/asyncio-policy.rst:211
msgid ""
"Spawning a subprocess with *inactive* current child watcher raises :exc:"
"`RuntimeError`."
msgstr ""

#: ../../library/asyncio-policy.rst:217
#: ../../library/asyncio-policy.rst:218
msgid "Close the watcher."
msgstr ""

#: ../../library/asyncio-policy.rst:219
#: ../../library/asyncio-policy.rst:220
msgid ""
"This method has to be called to ensure that underlying resources are cleaned-"
"up."
msgstr ""

#: ../../library/asyncio-policy.rst:224
#: ../../library/asyncio-policy.rst:225
msgid ""
"This implementation starts a new waiting thread for every subprocess spawn."
msgstr ""

#: ../../library/asyncio-policy.rst:226
#: ../../library/asyncio-policy.rst:227
msgid ""
"It works reliably even when the asyncio event loop is run in a non-main OS "
"thread."
msgstr ""

#: ../../library/asyncio-policy.rst:228
#: ../../library/asyncio-policy.rst:229
msgid ""
"There is no noticeable overhead when handling a big number of children "
"(*O(1)* each time a child terminates), but starting a thread per process "
"requires extra memory."
msgstr ""

#: ../../library/asyncio-policy.rst:231
#: ../../library/asyncio-policy.rst:232
msgid "This watcher is used by default."
msgstr ""

#: ../../library/asyncio-policy.rst:237
#: ../../library/asyncio-policy.rst:238
msgid ""
"This implementation registers a :py:data:`SIGCHLD` signal handler on "
"instantiation. That can break third-party code that installs a custom "
"handler for :py:data:`SIGCHLD` signal."
msgstr ""

#: ../../library/asyncio-policy.rst:241 ../../library/asyncio-policy.rst:259
#: ../../library/asyncio-policy.rst:242 ../../library/asyncio-policy.rst:260
msgid ""
"The watcher avoids disrupting other code spawning processes by polling every "
"process explicitly on a :py:data:`SIGCHLD` signal."
msgstr ""

#: ../../library/asyncio-policy.rst:244
#: ../../library/asyncio-policy.rst:245
msgid ""
"There is no limitation for running subprocesses from different threads once "
"the watcher is installed."
msgstr ""

#: ../../library/asyncio-policy.rst:247
#: ../../library/asyncio-policy.rst:248
msgid ""
"The solution is safe but it has a significant overhead when handling a big "
"number of processes (*O(n)* each time a :py:data:`SIGCHLD` is received)."
msgstr ""

#: ../../library/asyncio-policy.rst:255
#: ../../library/asyncio-policy.rst:256
msgid ""
"This implementation uses active event loop from the main thread to handle :"
"py:data:`SIGCHLD` signal. If the main thread has no running event loop "
"another thread cannot spawn a subprocess (:exc:`RuntimeError` is raised)."
msgstr ""

#: ../../library/asyncio-policy.rst:262
#: ../../library/asyncio-policy.rst:263
msgid ""
"This solution is as safe as :class:`MultiLoopChildWatcher` and has the same "
"*O(N)* complexity but requires a running event loop in the main thread to "
"work."
msgstr ""

#: ../../library/asyncio-policy.rst:267
#: ../../library/asyncio-policy.rst:268
msgid ""
"This implementation reaps every terminated processes by calling ``os."
"waitpid(-1)`` directly, possibly breaking other code spawning processes and "
"waiting for their termination."
msgstr ""

#: ../../library/asyncio-policy.rst:271
#: ../../library/asyncio-policy.rst:272
msgid ""
"There is no noticeable overhead when handling a big number of children "
"(*O(1)* each time a child terminates)."
msgstr ""

#: ../../library/asyncio-policy.rst:274
#: ../../library/asyncio-policy.rst:275
msgid ""
"This solution requires a running event loop in the main thread to work, as :"
"class:`SafeChildWatcher`."
msgstr ""

#: ../../library/asyncio-policy.rst:279
#: ../../library/asyncio-policy.rst:280
msgid ""
"This implementation polls process file descriptors (pidfds) to await child "
"process termination. In some respects, :class:`PidfdChildWatcher` is a "
Expand All @@ -374,11 +374,11 @@ msgid ""
"only work on recent (5.3+) kernels."
msgstr ""

#: ../../library/asyncio-policy.rst:293
#: ../../library/asyncio-policy.rst:294
msgid "Custom Policies"
msgstr ""

#: ../../library/asyncio-policy.rst:295
#: ../../library/asyncio-policy.rst:296
msgid ""
"To implement a new event loop policy, it is recommended to subclass :class:"
"`DefaultEventLoopPolicy` and override the methods for which custom behavior "
Expand Down
4 changes: 2 additions & 2 deletions library/ctypes.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-26 00:17+0000\n"
"POT-Creation-Date: 2023-01-10 17:25+0000\n"
"PO-Revision-Date: 2022-10-16 03:20+0800\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -512,7 +512,7 @@ msgstr ""

#: ../../library/ctypes.rst:392
msgid ""
"Because specifying the attribute does inhibit portability it is adviced to "
"Because specifying the attribute does inhibit portability it is advised to "
"always specify ``argtypes`` for all variadic functions."
msgstr ""

Expand Down
Loading